Getting a Powershell error:
The Script(6319) was successful in the Then section.
Script: S6319 - Starting at Server Time: Thursday, June 06, 2019 1:12:19 PM
IF F1 T: 1.417
L1 F129 Jump (P1): :WEARESERVER T: 1.417
L3 F139 Note (P1): :WEARESERVER T: 1.417
L4 F109 Delimiter (P2): Variable (P3): PoShVersion T: 1.417
L5 F70 Value (P1): PoShVersion Comparer (P2): 6 To (P3): 2 Jump (P4): :EXECUTE T: 19.42
L6 F29 Message (P1): System doe not meet the minium requirments of Powershell 3 T: 19.42
L7 F129 Jump (P1): T: 19.421
However, this is running against a Server 2012 R2 server which has PoSh 4 and .NET 4.5 already installed. So what is it doing that it thinks the server doesn't have PoSh 3?
More Powershell Errors
-
- Posts: 23
- Joined: Wed May 01, 2019 2:55 pm
- 5
Re: More Powershell Errors
Fixed an environment variable that did not include Powershell and allowed me to run the PoSh line check manually and returned 4.
>powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -command $PSVersionTable.PSVersion.Major
>4
However, when running the script again, the result shows it returned 1.264.
The Script(6319) was successful in the Then section.
Script: S6319 - Starting at Server Time: Thursday, June 06, 2019 1:52:30 PM
IF F1 T: 1.263
L1 F129 Jump (P1): :WEARESERVER T: 1.264
L3 F139 Note (P1): :WEARESERVER T: 1.264
L4 F109 Delimiter (P2): Variable (P3): PoShVersion T: 1.264
L5 F70 Value (P1): PoShVersion Comparer (P2): 6 To (P3): 2 Jump (P4): :EXECUTE T: 9.266
L6 F29 Message (P1): System doe not meet the minium requirments of Powershell 3 T: 9.266
L7 F129 Jump (P1): T: 9.267
I ran it again, the the PoSh version continues to go lower, like it is being devided by some value:
The Script(6319) was successful in the Then section.
Script: S6319 - Starting at Server Time: Thursday, June 06, 2019 2:03:23 PM
IF F1 T: 0.049
L1 F129 Jump (P1): :WEARESERVER T: 0.05
L3 F139 Note (P1): :WEARESERVER T: 0.05
L4 F109 Delimiter (P2): Variable (P3): PoShVersion T: 0.05
L5 F70 Value (P1): PoShVersion Comparer (P2): 6 To (P3): 2 Jump (P4): :EXECUTE T: 6.57
L6 F29 Message (P1): System doe not meet the minium requirments of Powershell 3 T: 6.57
L7 F129 Jump (P1): T: 6.571
Tried adding a variable set command to zero out the PoShVersion variable at the top of the WEARESERVER function.
Still getting strange values returned:
The Script(6319) was successful in the Then section.
Script: S6319 - Starting at Server Time: Thursday, June 06, 2019 3:29:14 PM
IF F1 T: 0.457
L1 F129 Jump (P1): :WEARESERVER T: 0.457
L3 F139 Note (P1): :WEARESERVER T: 0.458
L4 F20 SetType(P1):1 Parameter(P2):0 VariableName(P3):PoShVersion T: 0.458
L5 F109 Delimiter (P2): Variable (P3): PoShVersion T: 0.458
L6 F70 Value (P1): PoShVersion Comparer (P2): 6 To (P3): 2 Jump (P4): :EXECUTE T: 8.464
L7 F29 Message (P1): System doe not meet the minium requirments of Powershell 3 T: 8.464
L8 F129 Jump (P1): T: 8.465
If I manually enter the Powershell on the DC, I get the proper result as mentioned at the top of this mess.
>powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -command $PSVersionTable.PSVersion.Major
>4
So what is happening with the PoShVersion variable that it is getting calculated and changed?
Last run and it is a value of 1.191.
>powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -command $PSVersionTable.PSVersion.Major
>4
However, when running the script again, the result shows it returned 1.264.
The Script(6319) was successful in the Then section.
Script: S6319 - Starting at Server Time: Thursday, June 06, 2019 1:52:30 PM
IF F1 T: 1.263
L1 F129 Jump (P1): :WEARESERVER T: 1.264
L3 F139 Note (P1): :WEARESERVER T: 1.264
L4 F109 Delimiter (P2): Variable (P3): PoShVersion T: 1.264
L5 F70 Value (P1): PoShVersion Comparer (P2): 6 To (P3): 2 Jump (P4): :EXECUTE T: 9.266
L6 F29 Message (P1): System doe not meet the minium requirments of Powershell 3 T: 9.266
L7 F129 Jump (P1): T: 9.267
I ran it again, the the PoSh version continues to go lower, like it is being devided by some value:
The Script(6319) was successful in the Then section.
Script: S6319 - Starting at Server Time: Thursday, June 06, 2019 2:03:23 PM
IF F1 T: 0.049
L1 F129 Jump (P1): :WEARESERVER T: 0.05
L3 F139 Note (P1): :WEARESERVER T: 0.05
L4 F109 Delimiter (P2): Variable (P3): PoShVersion T: 0.05
L5 F70 Value (P1): PoShVersion Comparer (P2): 6 To (P3): 2 Jump (P4): :EXECUTE T: 6.57
L6 F29 Message (P1): System doe not meet the minium requirments of Powershell 3 T: 6.57
L7 F129 Jump (P1): T: 6.571
Tried adding a variable set command to zero out the PoShVersion variable at the top of the WEARESERVER function.
Still getting strange values returned:
The Script(6319) was successful in the Then section.
Script: S6319 - Starting at Server Time: Thursday, June 06, 2019 3:29:14 PM
IF F1 T: 0.457
L1 F129 Jump (P1): :WEARESERVER T: 0.457
L3 F139 Note (P1): :WEARESERVER T: 0.458
L4 F20 SetType(P1):1 Parameter(P2):0 VariableName(P3):PoShVersion T: 0.458
L5 F109 Delimiter (P2): Variable (P3): PoShVersion T: 0.458
L6 F70 Value (P1): PoShVersion Comparer (P2): 6 To (P3): 2 Jump (P4): :EXECUTE T: 8.464
L7 F29 Message (P1): System doe not meet the minium requirments of Powershell 3 T: 8.464
L8 F129 Jump (P1): T: 8.465
If I manually enter the Powershell on the DC, I get the proper result as mentioned at the top of this mess.
>powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -command $PSVersionTable.PSVersion.Major
>4
So what is happening with the PoShVersion variable that it is getting calculated and changed?
Last run and it is a value of 1.191.
Re: More Powershell Errors
Mind blown!!
Not sure how a single powershell command that calls for a fixed value and the LabTech testing that value to be => 3 does not compute how it gets a decimal value that is ever changing?
Not sure where to start with this one.
Hmmm.....
Not sure how a single powershell command that calls for a fixed value and the LabTech testing that value to be => 3 does not compute how it gets a decimal value that is ever changing?
Not sure where to start with this one.
Hmmm.....