Primoz Primoz - 1 year ago 185
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.

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download