Quantcast
Channel: Active questions tagged powershell-3.0 - Stack Overflow
Viewing all articles
Browse latest Browse all 134

"Access to the path is denied" when attempting to redirect output to a file

$
0
0

I'm trying to redirect console output from a TFS command to a file with the following command:

witadmin listfields /collection:blahblah:8080/tfs/TPC > TFSfields.txt

but I get an error:

"Access to the path 'C:\....\TFSfields.txt is denied"

and also further down:

OpenError: (:) [Out-File], UnauthorizedAccess

I'm fairly new to PowerShell, so I'm not sure how I could not have access to create a file in a directory on my own machine. I'm assuming I'm missing something simple. When I run the command without redirecting output, it outputs what I expect to the screen.


Viewing all articles
Browse latest Browse all 134

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>