Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

I prefer WMI over Powershell remoting.

share|improve this question

1 Answer

up vote 2 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

share|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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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