Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

how to run PS on other machines?

$
0
0

I have two questions.  The first one is driving me nuts.   I have a servers.txt file.  It has server names and driver letters.  Example:  \\Server1\d$  \\Server2\d$  and so on.  I want to read this file and then create a new Folder on each servers d: drive.  So \\Server1\d$\MyNewFolder and so on for each name in the servers.txt file.   Sounds simple but I've struggled with this.

Question 2.   Since PS is disabled on servers how do you enable it?  I need to run a PowerShell command on 200 servers and it is very CPU intensive so it needs to run on each local machine.   I think I can kick off the .PS1 script with psexec.exe but how do I run the Set-ExecutionPolicy Unrestricted on all my servers?


mqh7


Viewing all articles
Browse latest Browse all 21975

Latest Images

Trending Articles



Latest Images

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