Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Running as Administrator

$
0
0

I have a script that looks like this

add-computer -newname XXX -domainname xxxdemo.com -credential administrator

The problem I am having is when I run this as a .PS1 file it doesn't run and says access is denied. When I copy and paste it in a administrator PowerShell it works. Ideas?


Viewing all articles
Browse latest Browse all 15028

Trending Articles



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