Useful PowerShell Commands

From rbachwiki
Jump to navigation Jump to search
Get-ComputerInfo

Accessing the properties of a command

Get-Computerinfo -Properties csusername
Get-Computerinfo -Properties csusername | Get-Member
Get-ComputerInfo | Format-List OsType,osName,csusername

Write output to the screen, like Echo

Write-Output "Hello World" 

Read Text file

Get-Content filename.txt
Rename-Computer
Restart-Computer
Get-Date
Get-TimeZone

Update Windows From PowerShell

Home - Category