PowerShell Exception System.Management.Automation.SessionStateScope'

Viewed 0
7 Answers

Hi lynodch,

have you tried switching the monitor to use PowerShell v4? In the latest version you can switch for v2 to v4. Windows Server 2012 doesn't come with PowerShell v2 installed, this could be the issue.

Thanks
Quinn

Please make sure to mark your questions accepted when you have your answer by clicking the gray check mark to the left of the answer.

Hello,

I've checked all the settings but found nothing. Where can I switch V2 to V4?

Thanks Gary.

Gary,

The setting to change from v2 to v4 is set at the monitor level. Go the server that has your Execute Script monitor and select the monitor. Right above the text box where you entered your code you will see dropdown box labeled "Script Language:", one of the options in this dropdown is PowerShell v4.

Thanks
Quinn

Please make sure to mark your questions accepted when you have your answer by clicking the gray check mark to the left of the answer.

Hello,

Thanks for the reply. We actually do not get that option. The host server is Windows 2012R2. And as is expected PowerShell V4 is installed.

Gary.

alt text

alt text

Sorry, to get the update that you need to have to get this feature please download and install build v5.8 which you can get from the following page.

http://www.poweradmin.com/servermonitor/preview.aspx

Thanks
Quinn

Please make sure to mark your questions accepted when you have your answer by clicking the gray check mark to the left of the answer.

Thank you.

After installing the preview version, the script now works.

However, I did expect based on previous posts to see options for PowerShell V2 and V4? We've only got V2 options, as pictured. Is that correct? (just so I know for the future).

alt text

Regards Gary

Sorry I miss lead you. The new setting is in version 6 of the product and that version is in Beta. Again I apologize for sending you to the preview version and now to the Beta version.

http://www.poweradmin.com/servermonitor/beta.aspx

Thanks
Quinn

Please make sure to mark your questions accepted when you have your answer by clicking the gray check mark to the left of the answer.

Related