Created
July 13, 2016 08:50
-
-
Save jespernohr/38a697d2da734fbbe4299a2eac1be3e4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#creates a variable | |
$SVRNAME = 'server1.contoso.com' | |
#get service status | |
gsv -ComputerName $SVRNAME -Name Spooler | |
#stop service | |
(gsv -ComputerName $SVRNAME -Name Spooler).stop() | |
#start service | |
(gsv -ComputerName $SVRNAME -Name Spooler).start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment