{"id":4465,"date":"2012-12-15T11:59:00","date_gmt":"2012-12-15T11:59:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2012\/12\/15\/powertip-use-the-powershell-3-0-get-ciminstance-cmdlet\/"},"modified":"2012-12-15T11:59:00","modified_gmt":"2012-12-15T11:59:00","slug":"powertip-use-the-powershell-3-0-get-ciminstance-cmdlet","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/powertip-use-the-powershell-3-0-get-ciminstance-cmdlet\/","title":{"rendered":"PowerTip: Use the PowerShell 3.0 Get-CimInstance Cmdlet"},"content":{"rendered":"<p><strong>Summary:<\/strong> Use Windows PowerShell&nbsp;3.0 to connect to servers running Windows Server&nbsp;2003 with the&nbsp;<strong>Get-CimInstance<\/strong>&nbsp;cmdlet.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/q-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Question\" \/>&nbsp;How can I use&nbsp;<strong>Get-CimInstance<\/strong>&nbsp;to connect to servers running Windows Server&nbsp;2003 in my legacy environment?<\/p>\n<p style=\"padding-left: 90px\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/a-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Answer\" \/>&nbsp;Charlotte Windows PowerShell user group member Brian Wilhite says: The new&nbsp;<strong>CIM<\/strong>&nbsp;cmdlets use the&nbsp;<strong>WSMan<\/strong>&nbsp;protocol by default, which isn&rsquo;t supported on Windows Server&nbsp;2003. However, you can use the&nbsp;<strong>New-CimSessionOption<\/strong>&nbsp;cmdlet with the&nbsp;<strong>Protocol<\/strong>&nbsp;parameter and the&nbsp;<strong>New-CimSession<\/strong>&nbsp;cmdlet to create a session for use with Windows Server&nbsp;2003. Consider the following steps:<\/p>\n<p style=\"padding-left: 90px\">1.&nbsp;$SessionOption = New-CimSessionOption -Protocol Dcom<\/p>\n<p style=\"padding-left: 90px\">2.&nbsp;$CimSession = New-CimSession -SessionOption $SessionOption -ComputerName WinSrv2003<\/p>\n<p style=\"padding-left: 90px\">3.&nbsp;Get-CimInstance Win32_BIOS -CimSession $CimSession<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/7610.Dr.ScriptoForTips.jpg\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/7610.Dr.ScriptoForTips.jpg\" alt=\"\" border=\"0\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Use Windows PowerShell&nbsp;3.0 to connect to servers running Windows Server&nbsp;2003 with the&nbsp;Get-CimInstance&nbsp;cmdlet. &nbsp;How can I use&nbsp;Get-CimInstance&nbsp;to connect to servers running Windows Server&nbsp;2003 in my legacy environment? &nbsp;Charlotte Windows PowerShell user group member Brian Wilhite says: The new&nbsp;CIM&nbsp;cmdlets use the&nbsp;WSMan&nbsp;protocol by default, which isn&rsquo;t supported on Windows Server&nbsp;2003. However, you can use the&nbsp;New-CimSessionOption&nbsp;cmdlet with the&nbsp;Protocol&nbsp;parameter [&hellip;]<\/p>\n","protected":false},"author":596,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[327,56,356,3,45],"class_list":["post-4465","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-brian-wilhite","tag-guest-blogger","tag-powertip","tag-scripting-guy","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Use Windows PowerShell&nbsp;3.0 to connect to servers running Windows Server&nbsp;2003 with the&nbsp;Get-CimInstance&nbsp;cmdlet. &nbsp;How can I use&nbsp;Get-CimInstance&nbsp;to connect to servers running Windows Server&nbsp;2003 in my legacy environment? &nbsp;Charlotte Windows PowerShell user group member Brian Wilhite says: The new&nbsp;CIM&nbsp;cmdlets use the&nbsp;WSMan&nbsp;protocol by default, which isn&rsquo;t supported on Windows Server&nbsp;2003. However, you can use the&nbsp;New-CimSessionOption&nbsp;cmdlet with the&nbsp;Protocol&nbsp;parameter [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/4465","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=4465"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/4465\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=4465"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=4465"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=4465"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}