How to extend a logical volume using Powershell
6,348
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
Related videos on Youtube
Author by
Primoz
Updated on September 17, 2022Comments
-
Primoz over 1 year
On Windows XP SP3, how can I extend a volume using Powershell on a remote computer?
I prefer WMI over Powershell remoting.
-
Primoz over 13 yearsCurrent solution: Invoke-Command -ComputerName $compName -Credential $compCred -ScriptBlock {"rescan","select volume 2","extend" | diskpart}