Primoz Primoz - 2 months ago 15x
PowerShell Question

How to extend volume using powershell?

How to extend volume using powershell (I prefer WMI over powershell remoting) on remote computer ?

OS is win XP sp3.


I ended up with somethin like this:

Invoke-Command -ComputerName $compName -Credential $compCred -ScriptBlock {"rescan","select volume 2","extend" | diskpart}

I'm still looking for better solution, if there is one.