PowerShell: Creating Domains and Domain Controllers
KB ID 0001400 Problem I needed to spin up some Windows 2016 Servers, and a domain to do some testing. I have promoted hundreds maybe thousands of domain controllers, so I wondered if this time I could do it with PowerShell. It’s actually easier than using the GUI! Solution If you were doing this in Server Manager, you would have to add the role first, and PowerShell is no different; Install-WindowsFeature AD-Domain-Services...
Hyper-V 2016 – Missing VM Hardware Versions?
KB ID 0001382 Problem I was helping a colleague with a Hyper-V upgrade this week, he asked if I would upgrade the hardware versions on the guest VM’s Get-VMHostSupportedVersionl However I could not get the cluster to accept a hardware version above version 5 (Server 2012 R2) Solution As it turns out the cluster had had all its nodes upgraded to 2016, but the cluster functional level was still at version 8 (Server 2012)...
PowerShell: Prompt Has Changed To Two Greater Than Signs
KB ID 0001380 Problem What does this mean? Well it means you’ve either got something wrong, or missed something out, and PowerShell is not sat waiting for more input. Which is fine but in most cases you simply need to fix your syntax and sort again so how do you ‘escape’ back to the normal PowerShell prompt? Solution As you can see, (below) typing quit or exist does not help. You need to press CTRL+C. Related...
PowerShell: Restart Fails ‘Other Users Logged On’
KB ID 0001374 Problem If you intend to shutdown, or restart a remote computer using PowerShell, you may see the following error message; PS C:\> Restart-Computer “Computer-name” Restart-Computer : This command cannot be run on target computer(‘Computer-name’) due to following error: The system shutdown cannot be initiated because there are other users logged on to the computer. At line:1 char:1 + REstart-Computer...
Exchange: Apply Email Address Policy to All Distribution Groups
KB ID 0001361 Problem While doing a migration I needed to update all of a clients ‘Distribution’ groups with an additional mail domain. This is not normally a problem we can do that with an Email address policy, well yes you can if all the groups have ‘update email addresses based on policy’ ticked, (which is the default!) However this client had done everything manually. So that wasn’t an option....