0

I'm trying to execute remote command which echoes some text to a network share, but getting an error:

"PermissionDenied:[Add-Content] UnauthorizedAccessException". 

The actual command is:

Invoke-Command -ComputerName $MyWorkstation -ScriptBlock { Add-Content \\server\C$\Scripts\1.txt -Value "My Test"}

Tried also "Out-File" with the same result. NTFS permissions are OK.

mzv
  • 187
  • 1
  • 3
  • 11
  • Possible duplicate of [Powershell, remote script access denied to network resources](http://stackoverflow.com/questions/7794206/powershell-remote-script-access-denied-to-network-resources). [See also](https://msdn.microsoft.com/en-us/library/windows/desktop/ee309365%28v=vs.85%29.aspx). – Ansgar Wiechers Sep 16 '15 at 21:22
  • Ok, but enabling WSManCredSSP Client on every computer is too much efforts for this task. Thanks. – mzv Sep 17 '15 at 08:13

0 Answers0