I am very new to Powershell and was wondering if someone could help me out with parsing the following command as well as provide an explanation regarding the logic..
$BranchNumber = "2.14Main"$MajorVersion = $BranchNumber.Split('.')[0]
$MinorVersion = $BranchNumber.Split('.')[1]
$PatchVersion = $BranchNumber.Split('.')[2]
$HotfixVersion = $BranchNumber.Split('.')[3]
Write-Host $MajorVersion $MinorVersion $PatchVersion $HotfixVersion
The Write-Host that I am looking for needs to be the following.
2 14 0 0