Skip to content

Instantly share code, notes, and snippets.

@carkrueger
carkrueger / gist:203a86efe35bdd349b34
Created January 4, 2015 12:14
Stop service, if not possible kill
1: function Kill-Service() {
2: param(
3: [Parameter(Mandatory=$true)]
4: [string]$srvcName,
5: [Parameter(Mandatory=$false)]
6: [string]$ComputerName='.',
7: [Parameter(Mandatory=$false)]
8: [string]$TimeOut='00:00:05'
9: )
10: $srvName