Hello to All.
I have very simple code
$ShowDirectory = "C:\FTP"
This code working
Invoke-Command -ComputerName $serverName -Credential $cred {Get-ChildItem -Path "C:\FTP" | select FullName, LastAccessTime }
and this is not
Invoke-Command -ComputerName $serverName -Credential $cred {Get-ChildItem -Path $ShowDirectory | select FullName, LastAccessTime }
it's not accepted path to the directory as a variable.
Thank you for help.
Konstantin