Shared server guidance · Question & answer

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.

BeginnerWindows Server 2022 or 2025, VPS or dedicated; commands run in PowerShell on that serverWindows PowerShell 5.1 or supported PowerShell with the required Windows modules
Go to the answer

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.

Remote Windows PowerShell
hostname
whoami

Check 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.

Remote Windows PowerShell
Get-CimInstance -ClassName Win32_OperatingSystem | Select-Object Caption, Version, OSArchitecture, LastBootUpTime

Caption 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.