Solved

Powershell remote file-out

Posted on 2013-12-05
1
1,555 Views
Last Modified: 2013-12-05
Setup:
I have a domain runing Server 2008 R2 and windows 7. I am starting to use powershell more and more. I have configued WinRM and used group policy to Allow Automatic configuration of listeners. I can now start a remote session and execute powershell commands on remote machines from Powershell ISE or Powershell on my machine (logged in as domain admin).

Problem:
After a few test commands I ran the following:
Get-ChildItem -Path C:\nso | Out-File -FilePath \\mymachine\c$\nso\test.txt
However I ran into the following error:
Access to the path '\\mymachine\c$\nso\test.txt' is denied.
    + CategoryInfo          : OpenError: (:) [Out-File], UnauthorizedAccessException
    + FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.OutFileCommand

I can't understand why such a simple command fails I am a domain admin, I started the session using domain admin credentials and I can happly read/write to both locations if I browse to them.......what am I missing? thanks in advance
0
Comment
Question by:Dead_Eyes
1 Comment
 
LVL 39

Accepted Solution

by:
footech earned 250 total points
ID: 39698975
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick guide on how to use Group Policy to create a custom power plan and set it active on Windows 7.
This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now