I need to find all the machine on the domain to see if computer browser and Remote registry is started or not. if not I need to start them
how can i do this with powershell?
Technology Tips and News
I need to find all the machine on the domain to see if computer browser and Remote registry is started or not. if not I need to start them
how can i do this with powershell?
Get-service, start-service and invoke-command should do it.
If ((get-service -name whatever -computername Target).status -notlike 'running') { invoke-command -computername target start-service -name whatever }
Get-service, start-service and invoke-command should do it.
If ((get-service -name whatever -computername Target).status -notlike 'running') { invoke-command -computername target start-service -name whatever }
Just separate them with commas
get-service -name service1,service2 Start-Service -name service1,service2
Give srver names in server.txt file and service name in service.txt file
one server name in a line
one server name in a line
Get-Service -name (gc "C:\Users\Administrator\Desktop\service.txt") -ComputerName (gc"C:\Users\Administrator\Desktop\Server.txt")
Status Name DisplayName
------ ---- -----------
Running Schedule Task Scheduler
Running Schedule Task Scheduler
Running Themes Themes
Running Themes Themes
Home this will help you
Hi,
Just checking in to see if the suggestions were helpful. Please let us know if you would like further assistance.
If you have any feedback on our support, please click here .