PowerShell – Find OS architecture (32 bit or 64 bit) of local or remote machines Using Powershell

Method 1: Environment Variable

PS:\>$ENV:PROCESSOR_ARCHITECTURE

Method 2: Using Win32_OperatingSystem

ps:\>$computername=’abcd’

ps:\>(Get-WmiObject Win32_OperatingSystem -computername $computername).OSArchitecture

 Method 3: Using Win32_Processor

ps:\>$computername=’abcd’

ps:\>Get-WmiObject -Class Win32_Processor -ComputerName $ComputerName| Select-Object AddressWidth

Method 4:[IntPtr]::Size – Gets the size of this instance.  The value of this property is 4 in a 32-bit process, and 8 in a 64-bit process

ps:\>[IntPtr]::Size

 

 

Advertisements

About Prashanth Jayaram

DB Technologist, Author, Blogger, Service Delivery Manager at CTS, Automation Expert, Technet WIKI Ninja, MVB and Powershell Geek My Profile: https://social.technet.microsoft.com/profile/prashanth jayaram/ http://www.sqlshack.com/author/prashanth/ http://codingsight.com/author/prashanthjayaram/ https://www.red-gate.com/simple-talk/author/prashanthjayaram/ http://www.sqlservercentral.com/blogs/powersql-by-prashanth-jayaram/ Connect Me: Twitter @prashantjayaram GMAIL powershellsql@gmail.com The articles are published in: http://www.ssas-info.com/analysis-services-articles/ http://db-pub.com/ http://www.sswug.org/sswugresearch/community/
This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

2 Responses to PowerShell – Find OS architecture (32 bit or 64 bit) of local or remote machines Using Powershell

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s