Updating Nano Server image
Daca am inceput sa ma joc cu Nano server, era si timpul sa incerc sa invat cum sa il updatez. Personal mi se pare cam peste mana tot procesul si fara tooluri specializate nu cred ca se va aventura nimeni sa faca mass deployment.
Metodele de update sunt descrise aici:
https://blogs.technet.microsoft.com/nanoserver/2016/10/07/updating-nano-server/
Toate necesita Powershell si/sau DISM.
Cea mai apropiata de modul actual de lucru cu Windows Server mi s-a parut varianta cu Windows Update (dar tot via Powershell):
-
Scan for available updates
Option 5: Download and install the cumulative update to a running Nano Server
If you have a running Nano Server VM or physical host, you can use the Windows Update WMI provider to download and install the update while the operating system is online. With this method, you don’t need to download the .msu file separately from the Microsoft Update Catalog. The WMI provider will detect, download, and install all available updates at once. After installing an update from Windows Update, you can find the log files at %ProgramData%\SoftwareDistribution\Logs\WindowsUpdate.
Enter-PSSession -ComputerName (Read-Host "Enter Nano Server IP address") -Credential (Get-Credential)
-
Install all available updates
$ci = New-CimInstance -Namespace root/Microsoft/Windows/WindowsUpdate -ClassName MSFT_WUOperationsSession $result = $ci | Invoke-CimMethod -MethodName ScanForUpdates -Arguments @{SearchCriteria="IsInstalled=0";OnlineScan=$true}$result.Updates
-
Get a list of installed updates
$ci = New-CimInstance -Namespace root/Microsoft/Windows/WindowsUpdate -ClassName MSFT_WUOperationsSessionInvoke-CimMethod -InputObject $ci -MethodName ApplyApplicableUpdatesRestart-Computer; exit
$ci = New-CimInstance -Namespace root/Microsoft/Windows/WindowsUpdate -ClassName MSFT_WUOperationsSession$result = $ci | Invoke-CimMethod -MethodName ScanForUpdates -Arguments @{SearchCriteria="IsInstalled=1";OnlineScan=$true} $result.Updates