Author Posts

February 15, 2016 at 10:19 am


I'm trying to execute that command below:

PS C:\> $Usuario = "E:\users\thardy"
PS C:\> Invoke-Command -ComputerName SRVAD -ScriptBlock {dirquota quota scan /path:$Usuario}
The specified path is invalid.
PS C:\>

How can I make that in a way that the variable can be used for the command, no matter what path I type on it... (E:\, E:\temp, E:\users\userabc, etc...)

February 15, 2016 at 10:21 am

See Your variable has no meaning on the remote computer.

February 15, 2016 at 10:35 am

Don Jones,

Perfect solution! Thanks a lot for the quick reply!