Difference between revisions of "Useful PowerShell Commands"
Jump to navigation
Jump to search
(2 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
Get-Computerinfo -Properties csusername | Get-Computerinfo -Properties csusername | ||
Get-Computerinfo -Properties csusername | Get-Member | 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 |
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