Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Power Shell loop for each ip address

$
0
0

Hey so i have a working code(s) that needs to be run on multiple pc's from a text or csv file. By Ip address. Any help would be appreciated. I need to turn these off (wmi / F&P Sharing) to be able to run another ps file to check windows activation. I have a feeling it has to do with the variable $IP but im still in the learning process.

Powershell
ForEach($IPinGet-Content"input.txt")Invoke-Command{netshadvfirewallfirewallsetrulegroup="windows management instrumentation (wmi)"newenable=yes}

Viewing all articles
Browse latest Browse all 15370

Latest Images

Trending Articles



Latest Images

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