- This topic has 6 replies, 3 voices, and was last updated 1 month, 1 week ago by
May 30, 2020 at 12:34 pm #232099
New to the forums but hope I am okay to ask a question. I am trying to run powershell in a bootable WinPE. I can load powershell and modify the file structure. I have tested the scripts on my developer machine but cant get them to run within WinPE. The Script I am trying to run is get-windowsautopilotinfo -online.
I have copied the script to the WinPE system, tried with set-executionpolicy bypass
tried with .\ before the file name
I do get errors relating to the term (FILENAME) is not reconized as the name of a cmdlet, function, script file….
I have also copied over my devs workstation powershell scripts folder but no joy.
May 30, 2020 at 2:17 pm #232114ParticipantTopics: 30Replies: 828Points: 2,556Rank: Community Hero
What is the exact error message? Note that winpe doesn’t have all the wmi classes that full blown windows does.
May 31, 2020 at 10:50 am #232225
May 31, 2020 at 2:12 pm #232246ParticipantTopics: 30Replies: 828Points: 2,556Rank: Community Hero
Yep, the namespace of that wmi class isn’t there in winpe.
May 31, 2020 at 8:03 pm #232285
Thanks for the reply, I have looked on google and assume that there is no way to add this in? My goal was to try and automate the upload of machine hash ID’s to autopilot using a bootable USB drive. The smallest OS I could find was WinPE 🙁
May 31, 2020 at 11:02 pm #232315ParticipantTopics: 3Replies: 421Points: 1,479Rank: Community Hero
Are you an OEM or reseller? Everything I see says this needs to be done in windows 10. But it also seems it’s either handled by the vendor or management platform such as intune or SCCM. The doc says specifically the manual process should be for testing only.
June 1, 2020 at 12:01 am #232321
Reseller. I have got the script to work now but had to ditch the bootable media for now. Running it via MDT for the most part.
- You must be logged in to reply to this topic.