web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Powershell Not Running...
Power Automate
Unanswered

Powershell Not Running In Unattended mode

(0) ShareShare
ReportReport
Posted on by

Hello, 

 

I am trying to use PAD to create local AD users. When the users are created, the UPN suffix isn't added. I am trying to resolve this by using a PowerShell command. 

 

Set-ADUser -Identity %FirstName%.%LastName%  -Replace @{userPrincipalName="%FirstName%.%LastName%@ADLAB.NET"} 

 

When I run this command in unattended mode, it adjusts the AD entry to include the suffix. When I run the flow in unattended mode - the flow completes without issue but the change doesn't happen.

 

Is there a way to adjust this to work or somewhere else in PAD I can set the UPN?

I have the same question (0)
  • pradeepvarma Profile Picture
    55 on at

    Manually login to the BOT user and check if Powershell AD module is installed or not.

    This is a frequent issue with powershell where module installation to be done every time in new machine as pre-requisite.

     

    Try to run your code after the above steps and see.

    If it works for you, kindly mark it as a solution.

     

    Regards,

    Pradeep Varma

    Follow on LinkedIn

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 258 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 198 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 136 Super User 2026 Season 2

Last 30 days Overall leaderboard