-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSelect-Object01.ps1
More file actions
20 lines (14 loc) · 1.11 KB
/
Select-Object01.ps1
File metadata and controls
20 lines (14 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Get-ComputerInfo | Select-Object CsDNSHostName, @{Name="Win version"; Expression = {$_.WindowsProductName +' '+ $_.WindowsVersion}}
Get-Process | Select-Object -Property ProcessName,@{Name="Start Day"; Expression = {$_.StartTime.DayOfWeek}}
Get-Process | Select-Object Name, CPU, @{Name="Memory (MB)";Expression={$_.PM/1MB}}
Get-Service | Select-Object DisplayName, Status, @{Name='Comments'; Expression={if ($_.Status -eq 'Running') {'All good!'} else {'Needs attention.'}}}
Get-ComputerInfo | Select-Object `
CsDNSHostName, `
@{Name="WindowsProductId"; Expression = {($_.WindowsProductId).Substring(0,10)}}
Get-ComputerInfo | Select-Object `
CsDNSHostName, `
@{label="Win version"; Expression = {$_.WindowsProductName +' '+ $_.WindowsVersion}}, `
BiosName, `
@{label="WindowsProductId"; Expression = {($_.WindowsProductId).Substring(0,10)}}
Get-AzADGroup | Where-Object DisplayName -Like *-amazing-* | Select-Object @{Name="DisplayName-------------------"; Expression={$_.DisplayName}},Id
Get-AzADGroup | Where-Object DisplayName -Like *-amazing-* | Select-Object @{Name="Groups"; Expression={"'$($_.DisplayName)':'$($_.Id)'"}}