Another day, another quicky. A few new VMs running with additional drives that someone forgot to initialize? Considering RDPing to each of those? Or maybe mmc console (DiskMGMT.MSC) and initializing one by one? Maybe Honolulu will help?
No worries, PowerShell will do just fine. I love those quickies that can save you a few clicks here and there!
So, basically formatting a drive requires these four steps:
Now, if you’re like me and would like to be able to connect to remote machines with different credentials (LAPS!) and format drives with different labels and file systems - there’s a function for you here:
Or You can grab it as part of PPoSh (Polish PowerShell User Group) Module from GitHub or PowerShell Gallery. There’s more goodies in there.
If you’ve installed it before (
Install-Module PPoShTools), just update it (