|
Post by Timothy on Mar 9, 2023 12:32:11 GMT
I am trying to trigger a powershell script using UI++ at OOBE to upload device hash for Intune devices. I know this isn't the normal use case but since we are trying to move away from imaging, I was hoping to set up some rubber ducky usb's to execute UI++ and present the same UI experience our techs are used to. There are a few things we want set that require user input and possibly some small changes we would like to make before the user gets a device. This is the action I am trying to use and it brings up a loading bar for a second showing the step is running but the script never executes and below that is the script I am using just for testing. The script works independently of the External Call, I have tried running UI++ as standard user/administrator and I tested the script both with a full path on the root of the drive and stored in the folder with the UI++.
<Action Type="ExternalCall" Title="Run Powershell Script TEST">Powershell.exe -ExecutionPolicy ByPass -File D:\UI++Test.ps1 -PCLocation "[PCLocation]"</Action>
param( [string]$PCLocation )
$message = "Congratulations, the UI++ worked and the PCLocation is set to $PCLocation" [System.Windows.Forms.MessageBox]::Show($message, "UI++ Success", "OK", "Information")
|
|