Powershell Step error after Australia upgrade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2026 10:14 AM
After upgrading to Australia, our flow actions that use a Powershell step that passes in credentials are failing with 401 Unauthorized. Running the same script directly on the mid server runs successfully.
Has anyone else experienced this issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi, yes - and your own test already narrows it down a lot. If the same script runs successfully when launched directly on the MID Server, the script, the target and the network path are fine. The difference in the failing case is the identity the step actually presents: a manual run uses the MID Server service account / your interactive context, while the PowerShell step resolves a stored credential at runtime and uses it for the remote session. A 401 means the target received credentials and rejected that logon, so work through what the step is really sending:
1. Which MID processed it? In the ECC queue, find the step's probe and confirm the MID name. In a MID cluster the flow may be running on a different MID from the one you tested manually - check that MID's host (domain membership, trust, WinRM config) separately, and temporarily pin the action to the tested MID to prove/disprove this.
2. Which credential was resolved? Use the step's inputs / connection and credential alias, then check that exact credential record: is it the Windows credential you expect, active, and is the user name in domain form (DOMAIN\user or UPN) rather than a bare user name? Bare-name or wrong-alias resolution is a common post-upgrade 401 cause, especially if the action was edited/re-saved around the upgrade - re-select the alias on the step and re-publish the flow/action so the step is not holding a stale reference.
3. Test that credential, not your own logon: from the MID host, run the same remote PowerShell (e.g. Invoke-Command / Enter-PSSession to the target) explicitly passing that stored user - if that also returns 401 while the service account works, the account itself is the issue, not ServiceNow.
4. Target address form: if the step connects by IP address, Kerberos cannot be used and the logon can fail where a hostname/FQDN succeeds - make the step target the FQDN.
5. Read the target's Security event log for the failed logon at the step's timestamp. The sub-status there separates 'password changed/expired or account locked' from 'account not granted the logon type' far faster than anything on the ServiceNow side.
If 1-4 all check out - same MID, correct domain-form credential, FQDN, credential works in an explicit remote session from that MID - then it is time for a Support case framed exactly that way, with the ECC payload and the upgrade timing, because at that point the platform is sending something different from what the credential record contains.
Hope one of those isolates it for you.