PowerShell | Session 05 | Piping, Where-Object and Select-Object |
Автор: JumpStart
Загружено: 2022-10-25
Просмотров: 9
Описание:
Discussing about Piping, Where-Object and Select-Object
#PSwithJumpStart
Session 01 - • PowerShell | Session 01 | Intro | #PSwithJ... - PowerShell Intro
Session 02 - • PowerShell | Session 02 | Find the relevan... - Find the relevant CMDLET and help
Session 03 - • PowerShell | Session 03 | Extending to hel... - Extending to help
Session 04 - • PowerShell | Session 04 | Extending to hel... - Extending to help
$Services=Get-Service
$Services | gm
$Services | Where-Object -Property Status -EQ "Stopped"
$Services | Where-Object -Property Status -EQ "Stopped"
$Services | Where-Object -Property Status -EQ "Stopped" | Where-Object -Property name -like "WM"
$Services | Where-Object -Property Status -EQ "Stopped" | Where-Object -Property name -like "WM*"
$Services | Where-Object -FilterScript {($_.Status -EQ "Stopped") -and ($_.name -like "WM*")}
Get-Service | Where-Object -FilterScript {($_.Status -EQ "Stopped") -and ($_.name -like "WM*")}
Get-Service | Where-Object -FilterScript {($_.Status -EQ "Stopped") -and ($_.name -like "WM*")} | Select-Object Status, Name, @{Name="ServiceName";E={$_.DisplayName}}
Get-Service | Where-Object -FilterScript { ($_.name -like "WM*") -and ($_.Status -EQ "Stopped") } | Select-Object Status, Name, @{Name="ServiceName";E={$_.DisplayName}}
Get-Service | Where-Object -FilterScript {($_.Status -EQ "Stopped") -and ($_.name -like "WM*")} | Select-Object Status, Name, @{Name="ServiceName";E={$_.DisplayName}}
To change the property name as per our need ;
Get-Service | ? -Property Status -EQ "Stopped" | ? -Property Displayname -Like "*Windows*"
Get-Help Where-Object -ShowWindow
Повторяем попытку...

Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: