-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdemo1.ps1
More file actions
48 lines (35 loc) · 716 Bytes
/
demo1.ps1
File metadata and controls
48 lines (35 loc) · 716 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#requires -version 5.1
Return "This is a walkthrough demo"
<#
.Synopsis
Short description
.DESCRIPTION
Long description
.EXAMPLE
Example of how to use this cmdlet
.EXAMPLE
Another example of how to use this cmdlet
.NOTES
Version: 0.0
.LINK
#>
Function Get-StartName {
[CmdletBinding()]
Param
(
[Parameter(Mandatory,ValueFromPipelineByPropertyName,ValueFromPipeline,Position=0)]
[String[]]$Name
)
Begin {
Write-Verbose "Starting $($MyInvocation.Mycommand)"
} #begin
Process {
Get-Service -name WinRM -ComputerName $name
} #process
End {
Write-Verbose "Ending $($MyInvocation.Mycommand)"
} #end
} #close function
$n = "bits","spooler","winrm"
Get-StartName $n
$n | get-startname