After migrating PA Server Monitor from Windows Server 2008R2 Windows Server 2012R2, Powershell scripts no longer work. I actually get the same error if I press Test Script when the script editor is empty. I found this post, but it did not help - http://support.poweradmin.com/osqa/questions/578/execute-script-action-powershell-script Powershell scripts run successfully from the command line. Thanks Gary. asked 30 Aug '15, 20:12 lynodch |
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 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. answered 31 Aug '15, 11:46 Quinn ♦♦ |
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 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. answered 01 Sep '15, 08:43 Quinn ♦♦ |
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 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. answered 02 Sep '15, 12:07 Quinn ♦♦ |
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). Regards Gary answered 02 Sep '15, 19:19 lynodch |
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 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. answered 03 Sep '15, 15:07 Quinn ♦♦ |