Powershell started via blueprism does not load installed packages
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
18-02-22 09:09 AM
I am launching PowerShell via blueprism and need to change the expiration date on some users. I have the packages installed on the machine and can run the code if I open PowerShell outside of the blueprism environment.
Blueprism start location is "C:\Program Files\Blue Prism Limited\Blue Prism Automate" Local PowerShell starts in network drive "G:" where the packages are installed.
I have tried to change the location, but it does not help. Elevated permission is not the problem and I have checked that the code works.
This is the error message: Set-ADAccountExpiration : The 'Set-ADAccountExpiration' command was found in the module 'ActiveDirectoryModule', but the module could not be loaded.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
18-02-22 10:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
18-02-22 11:36 AM
Sorry I didn't clarify that in the original post, but yes, I'm trying to launch via Application manager. The reason I'm doing it this way is that I couldn't get it to work via the code stage post. The problem was that I could not get it to save and use variables, but if I could copy/paste it into a PowerShell prompt I could make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
18-02-22 01:54 PM
FWIW - Here's an example of passing parameters into a PowerShell script using the Utility - PowerShell VBO that @John Carter referenced. I have a very simple PowerShell script that simply echoes whatever input message has been supplied using the -message parameter. Then it executes the standard Get-CimInstance command. All of the output is then captured and returned as output via the VBO.
If I wanted to pass in multiple parameters, I would need to make use the Delimiter input parameter to specify what custom delimiter I was using to separate my input data. So I might use the pipe character ( | ) which would look something like this with multiple parameters: -message "This is a test" | -priority 3 | ...
Hopefully that helps a bit.
Cheers,
Eric
