This is part of a series of quick tips and tricks I have accumulated over the year, that I think can be useful for others.
If you have similar short tips and tricks please leave a comment.
Some times you need information about the operating system and don't have direct access to the operating system, then you can use the scripts below to get some basic information about the operating system and the Sql Server version and when the server was booted.
SELECT host_distribution AS [Operating system],
@@VERSION AS [Sql Server version],
physical_memory_kb AS [Physical memory in Kb],
sqlserver_start_time AS [Last boot time],
cpu_count AS [CPU count]
FROM sys.dm_os_host_info, sys.dm_os_sys_info