Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function Manage-Services
- {
- Param
- (
- [Parameter(Mandatory)]
- [ValidateSet("Start", "Stop")]
- [string[]]
- $Operation
- )
- $count = $null
- Switch ($Operation)
- {
- "Start"
- {
- for ($count = $services.Length -1; $count -ge 0; $count --)
- {
- Write-Host $services[$count]
- }
- }
- "Stop"
- {
- for ($count =0;$count -lt $services.Length; $count++)
- {
- Write-Host $services[$count]
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment