Solved

Powershell remote file-out

Posted on 2013-12-05
1
1,585 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

You may have a outside contractor who comes in once a week or seasonal to do some work in your office but you only want to give him access to the programs and files he needs and keep privet all other documents and programs, can you do this on a loca…
While working, an annoying popup showing below will come and we cannot cancel or close it form the screen. The error message will come again and again.
This Micro Tutorial will teach you how to change your appearance and customize your Windows 7 interface to your unique preference. This will be demonstrated using Windows 7 operating system.
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

773 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