mid server powershell execution error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2023 05:48 PM
I am getting an error when running mid server powershell.
It may work fine.
I don't understand what is causing the error.
The que record when an error occurs is as follows.
Anyone know the cause?
<?xml version="1.0" encoding="UTF-8"?><results probe_time="2441"><result command="powershell -ExecutionPolicy Bypass C:\\Users\\test\\Desktop\\test\\test.ps1 'C:\\Users\\test\\Desktop\\test\\conf2.conf' 'test1' 'test_user' 'k1@Vp>1J'"><stdout/><stderr>������ɏI�[�L�� ' ������܂���B
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : TerminatorExpectedAtEndOfString
</stderr></result><parameters><parameter name="agent" value="mid.server.test_mid"/><parameter name="signature" value=""/><parameter name="response_to" value="32b1ae8e47fc7150d57d23dbd36d43b8"/><parameter name="from_sys_id" value=""/><parameter name="source" value=""/><parameter name="priority" value="2"/><parameter name="agent_correlator" value=""/><parameter name="processed" value=""/><parameter name="error_string" value=""/><parameter name="sys_id" value="32b1ae8e47fc7150d57d23dbd36d43b8"/><parameter name="sequence" value="18a216694e60000001"/><parameter name="from_host" value=""/><parameter name="sys_created_on" value="2023-08-23 07:58:05"/><parameter name="sys_domain" value="global"/><parameter name="name" value="powershell -ExecutionPolicy Bypass C:\\Users\\test\\Desktop\\test\\change_pw.ps1 'C:\\Users\\test\\Desktop\\test\\conf2.conf' 'test1' 'test_user' 'k1@Vp>1J'"/><parameter name="topic" value="Command"/><parameter name="state" value="ready"/><parameter name="queue" value="output"/><parameter name="ecc_queue" value="32b1ae8e47fc7150d57d23dbd36d43b8"/></parameters></results>
Execute powershell "test.ps1" with parameters in section "test1" of configuration file "conf2.conf".
The argument passed to powershell also passes the string "test_user" "k1@Vp>1J".
Caused by "ParserError: (:) [], ParentContainsErrorRecordException"?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2023 10:05 PM
I found this please go through below link
https://www.servicenow.com/community/itom-forum/error-in-mid-server/m-p/1027389
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2023 11:56 PM
var pay_val = '<?xml version="1.0" encoding="UTF-8"?><parameters><parameter name="name" ' +
'value="powershell -ExecutionPolicy Bypass ' + "powershell PATH and arguments" + '/></parameters>';
I had the execution policy set to "Bypass" in the script.
I made the following adjustments with reference to the article you inquired about, but the error continues.
I reverted to the original script and it worked fine, but I'm not sure when the error will reoccur.
Is the cause that the execution policy control (problem on the power shell execution PC side?) does not go well and is blocked by mistake?
var pay_val = '<?xml version="1.0" encoding="UTF-8"?><parameters><parameter name="name" ' +
'value="powershell -ExecutionPolicy Unrestricted ' + "powershell PATH and arguments" + '/></parameters>';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2023 12:06 AM - edited 08-24-2023 12:08 AM
When working properly, the following que records are created.