Hi,
I am trying to invoke commands from powershell, especially the diskpart and do some operations. I am trying to use this:
"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" Invoke-Command -ComputerName "machinename" -ScriptBlock {"select disk 2", "online disk" | diskpart}
but keep getting this:
'diskpart.exe}' is not recognized as an internal or external command...
I also tried with full path to diskpart but I get this:
'C:\windows\system32\diskpart.exe}' is not recognized as an internal or external command...
can you help me with that? I would use powershell directly but the system is Server 2008 R2 where storage modules are not present..
execution policy is set to unrestricted
Thank you.
Pete
sfs