-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility issue found in AutomatePS on Automate 2022 (running using Windows 2022) #30
Comments
The API has a major issue in the 2022 beta. It seems to be an issue with the JSON serialization not adding the __type property to objects returned by the API. This is needed by AutomatePS to correctly POST back to the API (this property is then used by the API to determine which class to cast into during deserialization). I opened a case with Fortra, and they are aware. Hopefully it's fixed in the GA release. |
Hi David. I believe Automate 2022 went GA of Dec 22, 2022 (https://community.fortra.com/support/current-product-versions/) Start-AMWorkflow.ps1 Maybe its worth to look into their latest release? Regards, |
Hi David, I changed in my script the Also for backwards compatibility, I modified this in your module: Tomorrow I will be testing other cmdlets we are using from your package in combination with Automate 2022 and Windows 2022. |
Hi David, Any idea's when an updated version of your module is ready? Regards, |
I haven't had time to upgrade yet, it will probably be a couple months. I didn't realize 2022 was already released, hopefully they addressed the API issue I brought up in the beta. |
Hi David, Any update yet? Regards, |
I dug into this more today, and I was apparently mistaken when I thought this was an API issue. I have added the necessary changes for 2022 support but have not fully tested it. If you'd like you can grab a copy from my fork and test. Please test with caution. |
Hi David. Thank you for looking into this. PS C:> $Workflow = Get-AMWorkflow 'Macro-Signing_Automation'
PS C:> $Workflow = Get-AMWorkflow -ID '54d0ba94-3e6c-43ca-acd9-94dc7fbb3efc'
|
I'm not able to recreate the first error. The second one I'm almost certain isn't AutomatePS related, to me that looks like an invalid workflow ID passed to the API. Usually, the workflow ID's are surrounded by curly braces, can you retry with: $workflow = Get-AMWorkflow -ID '{54d0ba94-3e6c-43ca-acd9-94dc7fbb3efc}' What is the version of Automate/PowerShell you're running? Also, are you sure you're only loading the new version of the module in your PowerShell session? |
Hi David, I was using Set-StrictMode -Version 2.0 in my Powershell and then I got the first error. I added the curly brackets and also that seems to work now. I will continue and test some more... |
All works fine now! Thank you for this update David. Regards, |
I don't think any changes are needed for the AutomatePS.Health module. If you do run into problems, please open an issue against the AutomatePS.Health repo. Thanks |
Works as a charm, David. You may close this Issue and merge Fork to main branch Regards, |
Expected Behavior
Start workflow "MailTriggerMonitor"
Actual Behavior
When running the script from powershell.exe , I got this error:
MethodException: C:\Program Files\WindowsPowerShell\Modules\AutoMatePS\5.1.1\Functions\Public\Invoke-AMRestMethod.ps1:51
Line |
51 | [ArgumentCompleter([AMConnectionCompleter])]
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Multiple ambiguous overloads found for ".ctor" and the argument count: "1".
When running the script from Powershell ISE, it almost works except for this issue:
Start-AMWorkflow : Unsupported input type '3' encountered!
At C:\Users\KnijnS\Desktop\Untitled1.ps1:13 char:13
Steps to Reproduce the Problem
Disconnect-AMServer
$AutomateServer = ($env:computername).ToUpper()
$AutomatePort = "9708"
If (!(Test-Path -Path $ConnectionStoreFilePath)) {
New-AMConnectionStoreItem -FilePath $ConnectionStoreFilePath -Server $AutomateServer -Port $AutomatePort -Credential (Get-Credential)
}
Connect-AMServer $AutomateServer -ConnectionStoreFilePath $ConnectionStoreFilePath -Port $AutomatePort | Out-Null
$Workflow = Get-AMWorkflow -Name MailTriggerMonitor
$Workflow | Start-AMWorkflow
Specifications
The text was updated successfully, but these errors were encountered: