System.Management.Automation.IncompleteParseException for a PowerShell script from my Management Pack

I’m currently working on a management pack that I’m hoping to be released to public very soon. In one of the workflows in the MP, I got an error logged in the Operations Manager event log on the target agent: The PowerShell script failed with below exception System.Management.Automation.IncompleteParseException: Missing closing ‘}’ in statement block. at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input) at Microsoft.EnterpriseManagement.Common.PowerShell.RunspaceController.RunScript[T](String scriptName, String scriptBody, Dictionary`2 parameters, Object[] constructorArgs, IScriptDebug iScriptDebug, Boolean bSerializeOutput) Needless to say, the script runs just fine manually on the agent, so it is bug free. Took me a while to day to figure out what the issue is.

Continue reading
%d bloggers like this: