I’m starting with powershell and i’m using an existing script in order to create a csv file with hash laptop info for Intune enrollment. (the script Get-WindowsAutoPilotInfo
I’ve juste done some modification in, in order to create a csv file named based on the serial number of the machine.
log as local administrator on my test machine, the script works well if i’m launching it in a PS consol runas admin (right click, run as…). If i’m launching it from a “classic” PS console, still launched by local administrator account, the script failed due to a lack of permissions on wmi request.
The mail goal is to launch automaticaly this script in MDT task and by a windows to go stick.
I’ve tried to launch it with the option -verb RunAs but still failed.
Someone has any idea ?
Tks in advance for your help.