Skip to main content

Featured

Health Supplements you should be taking

Hello once again! Here is a list of supplements you should likely be taking. Note that this is not medical advice, and some supplements are tolerated better by some people than others due to health / genetic factors. Generally, taking excessive amounts of supplements do not increase benefits, so stick to reasonable dosages. There is some variation between male and female in terms of requirements, I'm more familiar with male physiology and supplementing. There are some supplements I will mention that are not OTC, or are special prescription, which I may or may not take myself, and are not freely available. These supplement types are generally more expensive and less accessible, but I will discuss them also. Ideally you would start supplementing in your mid to late 20's. Most people only discover vitamins/supplements later in life when they begin to feel run-down, and by that point a lot of 'damage' has already been done to your body, which is accelerated with life

Determine or find your PowerShell version.

Sometimes it's necessary to find out which PowerShell version you are working with. This is also important for code portability as different PowerShell versions have different capabilities.

The most reliable way to do this is using $PSVersionTable as shown below:

PS C:\> $PSVersionTable



Name Value ---- ----- CLRVersion 2.0.50727.5485 BuildVersion 6.1.7601.17514 PSVersion 2.0 WSManStackVersion 2.0 PSCompatibleVersions {1.0, 2.0} SerializationVersion 1.1.0.1 PSRemotingProtocolVersion 2.1 --------

To isolate the PSVersion along with any build / revision numbers:

PS C:\> $PSVersionTable.PSVersion



Major Minor Build Revision ----- ----- ----- -------- 2 0 -1 -1 or PS C:\> $PSVersionTable.PSVersion.ToString() 2.0
--------

Here is something quite confusing that may throw people off also, and that's
the path to Powershell which you may see:

C:\Windows\System32\WindowsPowerShell\v1.0>

To the casual observer this would likely lead you to believe that you have PowerShell v1.0 installed. This is likely NOT the case, and can be easily checked by doing the same process here (PSVersionTable was first introduced into Powershell version 2.0) :

C:\Windows\System32\WindowsPowerShell\v1.0>.\powershell.exe




Windows PowerShell Copyright (C) 2009 Microsoft Corporation. All rights reserved. PS C:\Windows\System32\WindowsPowerShell\v1.0> $PSVersionTable.PSVersion Major Minor Build Revision ----- ----- ----- -------- 2 0 -1 -1
--------

Pretty misleading huh? For some reason the v1.0 directory is retained, but the version of Powershell is NOT v1.0 but v2.0

Also note that the Powershell Get-Host command will return the following:

PS C:\Windows\System32\WindowsPowerShell\v1.0> Get-Host




Name : ConsoleHost Version : 2.0 InstanceId : 36ff6f4c-5d3e-4ce0-9d47-3d8c4d2b5ae3 UI : System.Management.Automation.Internal.Host.InternalHostUserInterface CurrentCulture : en-AU CurrentUICulture : en-US PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy IsRunspacePushed : False Runspace : System.Management.Automation.Runspaces.LocalRunspace
--------

When you see this, is it is not actually your Powershell version, but the version of the host that we use to connect to the Powershell engine. In this case ConsoleHost is our host. The major/minor version numbers do match in this instance, but that is not necessarily the case!

There is some code from here, that will allow you to determine your version, even on Powershell version 1.0, by a simple process of logical elimination as PS v1.0 does NOT have a PSversionTable defined at all.

http://powershell.com/cs/media/p/2617.aspx

# If the $PSVersionTable variable doesn't exist, then you are running V1. 



# If it does exist, then the version will be available as $PSVersionTable.PSVersion. function Get-PSVersion { if (test-path variable:psversiontable) {$psversiontable.psversion} else {[version]"1.0.0.0"} } Then call the defined function:

PS C:\Windows\System32\WindowsPowerShell\v1.0> Get-PSVersion



Major Minor Build Revision ----- ----- ----- -------- 2 0 -1 -1 --------

Therefore this is not v.1.0 of Powershell but v2.0.

Comments

Popular Posts