Category: Windows Server

PS: Windows Update

PS: Windows Update

Needing to run Windows Updates on your machine from PowerShell this is the module for you.

https://gallery.technet.microsoft.com/scriptcenter/2d191bcd-3308-4edd-9de2-88dff796b0bc

Download and extract the folder a place it in the following directory

%WINDIR%\System32\WindowsPowerShell\v1.0\Modules

Import the module into your PowerShell session

Import-Module PSWindowsUpdate

To download and install windows updates run the following

Get-WUInstall

Screenshot of Module In action

powershell-windows-update-screenshot

Advertisements
Licensing: Activating Servers that cannot reach the Web

Licensing: Activating Servers that cannot reach the Web

Okay, I have been working through the night to meet some deadlines on a few cloud projects at work. One of the challenges I have come across was activating my VM’s reason being they are behind a very strict firewall, therefore cannot activate in the normal sense.

To resolve this I used the Microsoft ADK it includes VAMT (Volume Activation Managment Tool) Which more importantly allows you to perform activation via proxy. It is worth checking out

You can download this from the following link

https://developer.microsoft.com/en-us/windows/hardware/windows-assessment-deployment-kit

volumeactivationforwindows81-18

PowerCLI: Rename Windows Guest OS Hostname

PowerCLI: Rename Windows Guest OS Hostname

Okay, today I had run a script but I had not taken into account the character limit of the Windows hostname. The Result was I had 14 VM’s that are all running with the same hostname and I was not prepared to go into every single VM and change the hostname manually.

So the solution, I had been fishing around the internet for a quick solution to this problem and the solution was to use PowerCli with the Invoke-VMscript command which turns out to be pretty powerful so below is an example of using Invoke-VMscript to change the Windows Hostname

Invoke-VMScript -VM VM-Windows-01 -ScriptType Powershell -ScriptText 'Rename-Computer -NewName VM-WIN-01 -Restart' -GuestUser Administrator -GuestPassword ChangeMe
Invoke-VMScript -VM VM-Windows-02 -ScriptType Powershell -ScriptText 'Rename-Computer -NewName VM-WIN-02 -Restart' -GuestUser Administrator -GuestPassword ChangeMe
Invoke-VMScript -VM VM-Windows-03 -ScriptType Powershell -ScriptText 'Rename-Computer -NewName VM-WIN-03 -Restart' -GuestUser Administrator -GuestPassword ChangeMe