How do I identify my Windows Server version and last boot time?
Query the operating-system CIM class from a PowerShell session running on the Windows server. This identifies the installed OS and last boot time without changing settings. On a virtual server, the results describe the guest operating system.
Instructions
1. Confirm that the shell is on the server
An SSH connection to Windows may initially open CMD. Start PowerShell there before using these cmdlets, and verify the hostname.
hostname
whoamiCheck the server identity and account before reading or changing its configuration.
2. Read selected operating-system properties
Select only the fields needed for diagnosis rather than exporting a complete system inventory.
Get-CimInstance -ClassName Win32_OperatingSystem | Select-Object Caption, Version, OSArchitecture, LastBootUpTimeCaption identifies the OS product, Version shows its version, and LastBootUpTime records the current boot’s start.
3. Match further instructions to this installation
Choose documentation for the installed Windows release and shell version. A server hostname or provider package label is not sufficient to identify its OS build or feature availability.
Check the result
- The hostname identifies the intended Windows server.
- The reported OS release, architecture and boot time are recorded for the relevant support task.
Troubleshooting
- Get-CimInstance is not recognised
- Confirm that you are in PowerShell rather than CMD or a Linux shell.
- The boot time is unexpected
- Correlate it with Windows event logs and approved maintenance; uptime alone does not establish why the server restarted.
Official references
Use the documentation for your installed version when a flag, service name or platform feature differs.
