vSphere: Get ESX Server Serial Numbers
Apr20

vSphere: Get ESX Server Serial Numbers

KB ID 0001670 Problem A few weeks ago I needed to sort out some extended warranty for a customers servers. To do that  I needed the serial numbers of those servers, (a mixture of IBM/Lenovo and Dell Servers). As I didn’t fancy a drive to two different datacenters, I wanted to try and get them programatically. Solution After some searching I came across a post by one of my old EE buddies LucD with exactly what I needed. I’m...

Read More
Powershell: Get Folder Size ‘Quickly’
Feb25

Powershell: Get Folder Size ‘Quickly’

KB ID 0001660 Problem Right clicking a folder and selecting properties is usually how you would see how large a folder is. Which is great, but if your folder size is HUGE (i.e. many terabytes) then this takes ages! Solution If you use PowerShell you can get the figure considerably quicker! Below I want to ge the size of E:\Shared; In MegaBytes; “{0:N2}” -f ((Get-ChildItem -path E:\Shared -recurse | Measure-Object -property...

Read More
The specified module ‘MSOnline’ was not loaded.
Jan15

The specified module ‘MSOnline’ was not loaded.

KB ID 0001637 Problem I was trying to do some Azure Powershell this morning, I’d executed a Connect-MsolService command and got a; The term ‘Connect-MsolService’, function, script file, or operable program. A quick Google for that turned up ‘You need to run an Import-Module MSOnline’ command, but doing that simply gave me; PS C:\Users> Import-Module MSOnline Import-Module : The specified module...

Read More
Setup Cant Continue PowerShell Has Open Files
Jan06

Setup Cant Continue PowerShell Has Open Files

KB ID 0001633 Problem While attempting to uninstall Microsoft Exchange server; Setup can’t continue with the uninstall because the powershell (PID) has open files. Close the process, and then restart setup. Solution Seems to be a common error, and is usually caused because someone has the Exchange Web Management page open, (probably in another user session); In some cases you may need to reboot, but in my case I was simply being...

Read More
The Term ‘Uninstall-WindowsFeature’ is not Recognized
Dec16

The Term ‘Uninstall-WindowsFeature’ is not Recognized

KB ID 0001628 Problem I was removing Windows Defender from a lot of servers that had just been deployed, (while doing and AV rollout). So I had a remote session open to all the servers and issued the command on each one, and moved onto the next one. when I went back, about three or four of them had failed with the following error; PS C:\Users\Administrator> Uninstall-WindowsFeature -Name Windows-Defender Uninstall-WindowsFeature :...

Read More
PowerShell: Find Computers Last Logon Date
Oct23

PowerShell: Find Computers Last Logon Date

KB ID 0001612 Problem I had to find the last time a particular server had logged on for a client the other week, so we knew for sure it was dead! Solution The two commands you may need are; Locate Servers Last Login Time Get-ADComputer -Filter {OperatingSystem -Like ‘*SERVER’} -Properties lastlogondate,operatingsystem | Select name,laslogondate,operatingsystem Locate Clients Last Login Time Get-ADComputer -Filter...

Read More