On Windows XP SP3, how can I extend a volume using Powershell on a remote computer?

I prefer WMI over Powershell remoting.

link|improve this question

50% accept rate
feedback

1 Answer

up vote 1 down vote accepted

On my local computer I would do this by piping the commands to diskpart:

PS> $a = "select disk 0","select volume 0","extend" | diskpart
PS> write-host $a

Maybe you can build on this to achieve the desired result on the remote computer

link|improve this answer
Current solution: Invoke-Command -ComputerName $compName -Credential $compCred -ScriptBlock {"rescan","select volume 2","extend" | diskpart} – Primoz Jan 27 '11 at 8:35
Thanky you very much for your inspiring answer. – Primoz Jan 27 '11 at 8:36
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.