Difference between revisions of "Useful PowerShell Commands"
Jump to navigation
Jump to search
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Get-ComputerInfo | Get-ComputerInfo | ||
<h3>Accessing the properties of a command </h3> | |||
Get-Computerinfo -Properties csusername | |||
Get-Computerinfo -Properties csusername | Get-Member | |||
Get-ComputerInfo | Format-List OsType,osName,csusername | |||
<h3> Write output to the screen, like Echo </h3> | |||
Write-Output "Hello World" | |||
<h3> Read Text file </h3> | |||
Get-Content filename.txt | |||
Rename-Computer | Rename-Computer | ||
Restart-Computer | Restart-Computer | ||
Get-Date | Get-Date | ||
Get-TimeZone | Get-TimeZone | ||
[[Update Windows From PowerShell]] | ===[[Update Windows From PowerShell]]=== | ||
==[[Main_Page| Home]] - [[PowerShell|Category]]== | ==[[Main_Page| Home]] - [[PowerShell|Category]]== |
Latest revision as of 20:06, 17 October 2024
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