foundation_deployment_platform 0.1.1

Foundation deployment platform — VM/container orchestration, Docker runtime, guest infrastructure
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
# Move pagefile to D:\pagefile.sys so C: can be smaller. Reboot required.
if (-not (Test-Path 'D:\')) { '  D: not present, skip'; return }
try {
    $cs = Get-CimInstance -ClassName Win32_ComputerSystem -ErrorAction Stop
    if (-not $cs.AutomaticManagedPagefile) { '  already custom-managed (skip)'; return }
    Set-CimInstance -InputObject $cs -Property @{ AutomaticManagedPagefile = $false } -ErrorAction Stop
    Get-CimInstance -ClassName Win32_PageFileSetting -ErrorAction SilentlyContinue | Remove-CimInstance -ErrorAction SilentlyContinue
    New-CimInstance -ClassName Win32_PageFileSetting -Property @{
        Name = 'D:\pagefile.sys'; InitialSize = 0; MaximumSize = 0
    } -ErrorAction Stop | Out-Null
    '  set to D: (reboot required)'
} catch { '  skipped: ' + $_.Exception.Message }