This post is collection of useful PowerShell commands which will simplify your day to day desktop support administration tasks. The tasks can be performed remotely without taking remote control of the machine and without impacting user productivity. Please ensure you change the computer name used in below examples.
Check, Start and Stop Windows Services
Check status of Windows service
Get-Service -ComputerName DESKTOP-VND43IR -Name BITS
Start a Windows service
Get-Service -ComputerName DESKTOP-VND43IR -Name BITS | Start-Service
Stop a Windows service
Get-Service -ComputerName DESKTOP-VND43IR -Name BITS | Stop-Service
Get Computer Details
The WMI class win32_ComputerSystem hold information about computer system. These information can be retrieved using Get-WMIObject cmdlet.
Get all details stored in win32_computersystem WMI class
Get-WmiObject -class win32_computersystem -ComputerName DESKTOP-VND43IR | select *
Get logged on user name
Get-WmiObject -class win32_computersystem -ComputerName DESKTOP-VND43IR | select username
Get computer make and model details
Get-WmiObject -class win32_computersystem -ComputerName DESKTOP-VND43IR | select Manufacturer,model
Get physical memory size in GB
Get-WMIObject -class Win32_PhysicalMemory -ComputerName DESKTOP-VND43IR | Measure-Object -Property capacity -Sum | % {[Math]::Round(($_.sum / 1GB),2)}
Related Posts
- Windows 10 – Remote administration through PowerShell – Part 1
- Windows Administrator Basics: Managing Services from Command Line
- Windows Administrator Basics: Windows Services
- Windows Administrator Basics: Managing Windows Services from Powershell
- Windows Administrator Basics: Windows Registry
- Basic Knowledge for Windows Desktop Support Engineer
- Windows 10 /11 : Create a virtual drive with SUBST command
Subscribe to Techuisitive Newsletter
Be the first to know about our new blog posts. Get our newsletters directly in your inbox and stay up to date about Modern Desktop Management technologies & news.