troubleshooting Question

Powershell query

Avatar of leadtheway
leadthewayFlag for United States of America asked on
PowershellActive Directory
1 Comment1 Solution116 ViewsLast Modified:
Trying to run a script that will query a txt file before running the query and action against each.  I have one that does if i manually put the server name but i would like to just do a text file due to the amount of machines.

$ComputerName = @('server2012', 'vista64esxi', 'server2008')
foreach ($Computer in $ComputerName) {
    if ($Status = Get-Service -ComputerName $Computer -Name RemoteRegistry -EA SilentlyContinue |
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros