i have a problem with a PowerShell Command.
When i try this command:
Invoke-Command -ComputerName ... -Credential $cred -ScriptBlock {Get-Acl -Path "..."}
i get an access denied message.
When i try to execute the command on the local machine without Invoke-Command it works. I use the same Credentials for Invoke Command and to execute it on the local machine.
The Executionpolicy on the remote server is on: RemoteSigned
Commands like New-ADuser and so on works fine.
Does someone know how can i fix this?