Disable "WARNING: This is the last major release supporting..." output
Hi!
I am using the module V2022.3.1.6
I am calling a script in cmd.exe like this:
powershell -Command "<my script>" > out.txt
to get some information. Works fine, but at the beginning of the file I always get the text
WARNING: This is the last major release supporting PowerShell 5.1. Starting with 2023.1, our PowerShell module will only support PS7.
Also some other (not necessary) output like "[Error] The operation has timed out." is annoying.
How can I get rid of it?
And why is the module not using the correct stream? Error stream and Warning stream exists. Or am I wrong?
CU,
Timo
Hello,
About the Warning message, I will verify with the engineering and will get back to you about it.
For the "[Error] The operation has timed out." error message, it seems that some operation your script is trying to achieve takes much more time and raised a time out. Could you please try to increase the Connection timeout parameter of your data source to see if that will help?
Best regards,
Érica Poirier
4a5b64de-0f21-449c-bfa8-2dd42944a605.png
Hi!
The "[Error] The operation has timed out." occurs 3-4 seconds after a set-rdmsession command. E.g.:
$session = New-RDMSession -Type Group -Group "Testeinträge\Customer\Site\0815" -Name "0815" -SetSession Set-RDMSession -Session $session -Refresh [Error] The operation has timed out.
The timeout (in RDM UI) is set to 15 seconds. I am not sure if this is true for the ps module. How can I check this?
The comment from Jonathan Lafontaine was
You can ignore the timeout error. It's our IPC layer (the code that sends commands to RDM if it's running) reporting an error because it couldn't connect to RDM in time.
CU,
Timo
Hello Timo,
Thank you for your feedback.
You are right. I got the same information from Jonathan about the time out error. So the solution I provided is not applicable in this case.
About the version warning, he will verify if he can do something about it and we will keep you posted.
Best regards,
Érica Poirier
Hi,
I've released version 2022.3.1.8 that sends the 'last major release' to the correct warning stream. It will now obey your warning action setting.
I can't however do the same for the error message. Our PowerShell module uses RDM common C# core messages handled by that code don't know about warning and error stream, unfortunately. The IPC error message is one of those.
Regards.
Jonathan Lafontaine