Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Using Powershell to see if a computer is Windows 7, 8, or 10

$
0
0

Hi All,

 

I'm writing a logon script to install RSAT on a handful of machines. One thing though that has been challenging is having PowerShell check if a computer is Windows 7, 8, or 10. I don't really know how to code that and I've tried to see if that was done before online but I haven't found any material. My script basically would look like:

If program is installed

exit

 

If not installed

Is Windows 7

      32 bit?

            install program

      64 bit?

            install program

 

Is Windows 8

      32 bit?

            install program

      64 bit?

            install program

 

Is Windows 10

      32 bit?

            install program

      64 bit?

            install program

 

 

Any assistance on this would be great. Thanks.

 

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles