Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PS> $serviceName = Get-WmiObject Win32_service -filter "displayname = 'Security Center'" |select -expandproperty name
- PS> sc.exe start $serviceName
- PS> Get-WmiObject Win32_service -filter "displayname = 'Security Center'" |select -expandproperty name |sc.exe start "$_"
- DESCRIPTION:
- Starts a service running.
- USAGE:
- sc <server> start [service name] <arg1> <arg2> ...
- Get-WmiObject Win32_service -filter "displayname = 'Security Center'" |select -expandproperty name |ForEach-Object {
- sc.exe start "$_"
- }
Add Comment
Please, Sign In to add comment