Powershell error on mid server

Anshu_Anand_
Kilo Sage
Kilo Sage

Dear All,

The mid server in our instance whenever due to load, it crashes and generates error every time with powershell.
For some CIs The credentials test fail with same error as mentioned in error

Error encountered when invoking PowerShell: Test-Path : The term 'Test-Path' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or
if a path was included, verify that the path is correct and try again.
At line:1 char:12
+ $ver = if (Test-Path Variable:\PSVersionTable) { $PSVersionTable.PSVe ...
+ ~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Test-Path:String) [], CommandNo
tFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

You cannot call a method on a null-valued expression.
At line:1 char:107
+ ... .Version }; 'full_version:' + $ver.ToString() + ', major_version:' + ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull

 

Previously it was not an issue. maybe after patch 5 upgrade it happened (just a theory).

Regards,
Anshu

Regards,
Anshu
3 REPLIES 3

Ashutosh Munot1
Kilo Patron
Kilo Patron

Hi,

Is the MID Server upgraded properly. Because we upgraded and no issues at all.

Can you check if the PS script on MID for credentials is not corrupted.

Also i suggest raise a HI ticket so they can check this in detail.


Thanks,
Ashutosh

Thanks, but could you provide which script .

i am not able to find that script in my agent folder

Regards,
Anshu

Hi,

On MID server agent, you can see script folder.

Thanks,
Ashutosh