I'm trying to pass local variable to execute a command in Linux OS, it is not working. Could you help me what did I miss?
$Path = "/na/testy/vol/home_01/home/" + "$AccName"
You cannot, by design use a local variable in a remote call without ensuing the scope meets that use case.
Specifically the section on 'Using', which leads you too 'Remote Variables'
All the above comes down to, this...
USING REMOTE VARIABLES
In the following example, the $ps variable is defined in the temporary session in which the Get-WinEvent command runs.
USING LOCAL VARIABLES
Did this resolve your issue friend?
You must be logged in to reply to this topic.