SQL SERVER – PowerShell Version Info

I have multiple computer systems at home. I have previously taken a picture of my home office and published it here. Also, I recently had a scenario where I was listing a PowerShell version installed in my computer systems. While searching online, I found two different commands that can determine the version of PowerShell. One of them worked fine in Version 1, while both worked on Version 2.
The commands are:

$PSVersionTable

and

$host

I have run both the commands on different PowerShell versions and found the following output. This is a call to all PowerShell experts to help me out by letting me know the reasons why these became the results. I am sure that I’m missing something very small, so I ask your help to  clarify this.

PowerShell Version 1

SQL SERVER – PowerShell Version Info powershell1

PowerShell Version 2

SQL SERVER – PowerShell Version Info powershell2

Reference : Pinal Dave (https://darkslategrey-bat-805937.hostingersite.com)

Powershell, SQL Scripts
Previous Post
SQL SERVER – Index Levels, Page Count, Record Count and DMV – sys.dm_db_index_physical_stats
Next Post
SQLAuthority News – I am Microsoft Certified Trainer (MCT)

Related Posts

Leave a Reply