• Home
  • Linux
  • Docker
  • Windows
    • PS
    • C#
    • Exchange Server
  • Other
    • Perl
    • IPV6
    • MacOS
  • DB
    • MSSQL
    • MariaDB
    • PG

RFC IPv6

Details
Written by: po3dno
Category: Uncategorised
Created: 02 December 2025
Hits: 4

RFC 8200

Internet Protocol, Version 6 (IPv6) Specification

Основной стандарт IPv6. Заменил RFC 2460 (1998). Описывает формат пакета, заголовки, принципы работы.

RFC 4291

IP Version 6 Addressing Architecture

Архитектура адресации: типы адресов (GUA, ULA, link-local), форматы, scope.

RFC 4861

Neighbor Discovery for IP version 6 (IPv6)

NDP — замена ARP, Router/Neighbor Solicitation/Advertisement, Redirect.

RFC 4862

IPv6 Stateless Address Autoconfiguration (SLAAC)

Описывает, как именно хост сам себе назначает адрес без DHCP.

RFC 8415

Dynamic Host Configuration Protocol for IPv6 (DHCPv6)

Современный стандарт DHCPv6 (заменил RFC 3315). Stateful/stateless режимы, опции.

RFC 6106

IPv6 Router Advertisement Options for DNS Configuration (RDNSS)

Передача DNS-серверов через Router Advertisement (альтернатива DHCPv6).

RFC 4193

Unique Local IPv6 Unicast Addresses (ULA)

Аналог приватных IPv4-адресов (fd00::/8). Используется во внутренних сетях.

WSUS tunning

Details
Written by: po3dno
Category: Uncategorised
Created: 15 March 2023
Hits: 4
ApplicationPoolMemory - use 0 instead of 4096

Also:

* Make the following "Advanced Settings" for WSUS Application Pool in IIS:
    - Queue Length: 25000 from 10000
    - Limit Interval (minutes): 15 from 5
    - "Service Unavailable" Response: TcpLevel from HttpLevel
* Edit the web.config ( C:\Program Files\Update Services\WebServices\ClientWebService\web.config ) for WSUS (Stop the IIS first):
    - Replace <httpRuntime maxRequestLength="4096" /> with <httpRuntime maxRequestLength="204800" executionTimeout="7200"/>

iso

Details
Written by: po3dno
Category: Uncategorised
Created: 19 February 2021
Hits: 4
function New-IsoFile 
{ 
  <# .Synopsis Creates a new .iso file .Description The New-IsoFile cmdlet creates a new .iso file containing content from chosen folders .Example New-IsoFile "c:\tools","c:Downloads\utils" This command creates a .iso file in $env:temp folder (default location) that contains c:\tools and c:\downloads\utils folders. The folders themselves are included at the root of the .iso image. .Example New-IsoFile -FromClipboard -Verbose Before running this command, select and copy (Ctrl-C) files/folders in Explorer first. .Example dir c:\WinPE | New-IsoFile -Path c:\temp\WinPE.iso -BootFile "${env:ProgramFiles(x86)}\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg\efisys.bin" -Media DVDPLUSR -Title "WinPE" This command creates a bootable .iso file containing the content from c:\WinPE folder, but the folder itself isn't included. Boot file etfsboot.com can be found in Windows ADK. Refer to IMAPI_MEDIA_PHYSICAL_TYPE enumeration for possible media types: http://msdn.microsoft.com/en-us/library/windows/desktop/aa366217(v=vs.85).aspx .Notes NAME: New-IsoFile AUTHOR: Chris Wu LASTEDIT: 03/23/2016 14:46:50 #> 
   
  [CmdletBinding(DefaultParameterSetName='Source')]Param(
    [parameter(Position=1,Mandatory=$true,ValueFromPipeline=$true, ParameterSetName='Source')]$Source, 
    [parameter(Position=2)][string]$Path = "$env:temp\$((Get-Date).ToString('yyyyMMdd-HHmmss.ffff')).iso", 
    [ValidateScript({Test-Path -LiteralPath $_ -PathType Leaf})][string]$BootFile = $null,
    [ValidateSet('CDR','CDRW','DVDRAM','DVDPLUSR','DVDPLUSRW','DVDPLUSR_DUALLAYER','DVDDASHR','DVDDASHRW','DVDDASHR_DUALLAYER','DISK','DVDPLUSRW_DUALLAYER','BDR','BDRE')][string] $Media = 'DVDPLUSRW_DUALLAYER',
    [string]$Title = (Get-Date).ToString("yyyyMMdd-HHmmss.ffff"), 
    [switch]$Force,
    [parameter(ParameterSetName='Clipboard')][switch]$FromClipboard
  )
  
  Begin { 
    ($cp = new-object System.CodeDom.Compiler.CompilerParameters).CompilerOptions = '/unsafe'
    if (!('ISOFile' -as [type])) { 
      Add-Type -CompilerParameters $cp -TypeDefinition @'
public class ISOFile 
{
  public unsafe static void Create(string Path, object Stream, int BlockSize, int TotalBlocks) 
  { 
    int bytes = 0; 
    byte[] buf = new byte[BlockSize]; 
    var ptr = (System.IntPtr)(&bytes); 
    var o = System.IO.File.OpenWrite(Path); 
    var i = Stream as System.Runtime.InteropServices.ComTypes.IStream; 
   
    if (o != null) {
      while (TotalBlocks-- > 0) { 
        i.Read(buf, BlockSize, ptr); o.Write(buf, 0, bytes); 
      } 
      o.Flush(); o.Close(); 
    }
  }
} 
'@ 
    }
   
    if ($BootFile) {
      if('BDR','BDRE' -contains $Media) { Write-Warning "Bootable image doesn't seem to work with media type $Media" }
      ($Stream = New-Object -ComObject ADODB.Stream -Property @{Type=1}).Open()  # adFileTypeBinary
      $Stream.LoadFromFile((Get-Item -LiteralPath $BootFile).Fullname)
      ($Boot = New-Object -ComObject IMAPI2FS.BootOptions).AssignBootImage($Stream)
    }
  
    $MediaType = @('UNKNOWN','CDROM','CDR','CDRW','DVDROM','DVDRAM','DVDPLUSR','DVDPLUSRW','DVDPLUSR_DUALLAYER','DVDDASHR','DVDDASHRW','DVDDASHR_DUALLAYER','DISK','DVDPLUSRW_DUALLAYER','HDDVDROM','HDDVDR','HDDVDRAM','BDROM','BDR','BDRE')
  
    Write-Verbose -Message "Selected media type is $Media with value $($MediaType.IndexOf($Media))"
    ($Image = New-Object -com IMAPI2FS.MsftFileSystemImage -Property @{VolumeName=$Title}).ChooseImageDefaultsForMediaType($MediaType.IndexOf($Media))
   
    if (!($Target = New-Item -Path $Path -ItemType File -Force:$Force -ErrorAction SilentlyContinue)) { Write-Error -Message "Cannot create file $Path. Use -Force parameter to overwrite if the target file already exists."; break }
  } 
  
  Process {
    if($FromClipboard) {
      if($PSVersionTable.PSVersion.Major -lt 5) { Write-Error -Message 'The -FromClipboard parameter is only supported on PowerShell v5 or higher'; break }
      $Source = Get-Clipboard -Format FileDropList
    }
  
    foreach($item in $Source) {
      if($item -isnot [System.IO.FileInfo] -and $item -isnot [System.IO.DirectoryInfo]) {
        $item = Get-Item -LiteralPath $item
      }
  
      if($item) {
        Write-Verbose -Message "Adding item to the target image: $($item.FullName)"
        try { $Image.Root.AddTree($item.FullName, $true) } catch { Write-Error -Message ($_.Exception.Message.Trim() + ' Try a different media type.') }
      }
    }
  }
  
  End { 
    if ($Boot) { $Image.BootImageOptions=$Boot } 
    $Result = $Image.CreateResultImage() 
    [ISOFile]::Create($Target.FullName,$Result.ImageStream,$Result.BlockSize,$Result.TotalBlocks)
    Write-Verbose -Message "Target image ($($Target.FullName)) has been created"
    $Target
  }
}
$source_dir = "Z:\Install\App123"
get-childitem "$source_dir" | New-ISOFile -path e:\iso\app123.iso

Схемы электропитания

Details
Written by: po3dno
Category: Uncategorised
Created: 14 January 2021
Hits: 5

Отсутствие схем электропитания вероятнее всего связано с новым режимом питания на устройствах с аккумулятором в версии 1709 . Если щелкнуть значок батареи, то можно видеть слайдер, который появится только, если выбрана схема «Сбалансированная».

 

Изображение

 

Схемы можно восстановить следующими способами: сделать схему «Высокая производительность» или «Экономия энергии» активной, при этом активная схема появится в Панели управления, или же создать дубликаты этих схем, и тогда появятся обе схемы. В Командной строке нужно выполнить команды.

 

Сделать схему активной: powercfg.exe /setactive <GUID схемы питания>

 

Создать дупликат схемы: powercfg -duplicatescheme <GUID схемы питания>

 

Вместо <GUID схемы питания> нужно вставить GUID соответствующей схемы.

 

Для схемы "Сбалансированная" - 381b4222-f694-41f0-9685-ff5bb260df2e

 

Для схемы "Экономия энергии" - a1841308-3541-4fab-bc81-f71556f20b4a

 

Для схемы "Высокая производительность" - 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c

чтение DNS лога

Details
Written by: po3dno
Category: Uncategorised
Created: 21 March 2019
Hits: 5

static long offset = 0;
//static FileStream file;
static StreamReader reader;
static void Main(string[] args)
{
if (args.Count() < 2) { Environment.Exit(0); }

string sourceFile = args[0] + "\\" + args[1];

offset = (new FileInfo(sourceFile)).Length;

while (true)
{
FileStream file = new FileStream(sourceFile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
var info = new FileInfo(sourceFile);
if (info.Length < offset)
offset = 0;
using (new StreamReader(file))
{
file.Seek(offset, SeekOrigin.Begin);
reader = new StreamReader(file);

file.Seek(offset, SeekOrigin.Begin);
if (!reader.EndOfStream)
{
do
{
string line = reader.ReadLine();
if (line.Contains("PACKET") && line.Contains("UDP"))
Console.WriteLine("{0}", line);
} while (!reader.EndOfStream);

offset = file.Position;
Console.WriteLine("{0}", offset);
}
reader.Close();
Thread.Sleep(100);
}
}

  1. чтение DNS лога
  2. SQL AG config multisubnets
  3. Windows Server 2019 TimeZone
  4. Windows 8. Установка NetFramework 3.5

Page 1 of 2

  • 1
  • 2

Login Form

  • Forgot your password?
  • Forgot your username?

Statistics

  • Users 2
  • Articles 175
  • Articles View Hits 154066