Hi.
I am trying to set a location using PowerShell in the remote server.
I have tried the below code:
$s = New-PSSession -ComputerName $ServerName Enter-PSSession -Session $s Set-Location 'C:' Set-Location '$selectedNode.CommandPath' // CommandPath contains value as below in XML - <CommandPath>C:\Program Files\Microsoft Sql server\110\Configuration</CommandPath>
I am able to establish a session on the remote server. I am trying to set the location to path defined in CommandPath node. But I am getting error as Path not valid.
How to fix this?
Thanks