Get AutoPilotHash in WinPE without network connection

kinghnvn

New Member
Messages
4
Reaction score
0
Dear garlin & Experts,

I want to create a USB stick which automatically reads the hardware hash and serial number and writes that to a CSV.
Like in the following article: https://learn.microsoft.com/en-us/w...ershell-support-to-windows-pe?view=windows-11

The WinPE works perfectly so far and I have PowerShell mounted in it as well but I'm facing the error messages as attached files.
Can you please help to fix this or is it not possible to do this in Windows PE and must do it in a Full Windows environment?

Thank you!
David
 

Attachments

  • 1.jpg
    1.jpg
    1.2 MB
  • 2.jpg
    2.jpg
    407.3 KB
  • 3.jpg
    3.jpg
    545.3 KB
Did you add all of the WinPE Add-on's?

Windows PowerShell/WinPE-StorageWMIWinPE-StorageWMI contains PowerShell cmdlets for storage management. These cmdlets use the Windows Storage Management API (SMAPI) to manage local storage, such as disk, partition, and volume objects. Or, these cmdlets use the Windows SMAPI together with array storage management by using a storage management provider. WinPE-StorageWMI also contains Internet SCSI (iSCSI) Initiator cmdlets for connecting a host computer or server to virtual disks on external iSCSI-based storage arrays through an Ethernet network adapter or iSCSI Host Bus Adapter (HBA).

Dependencies: Install WinPE-WMI > WinPE-NetFX > WinPE-Scripting > WinPE-PowerShell before you install WinPE-StorageWMI.
Scripting/WinPE-WMIWinPE-WMI contains a subset of the Windows Management Instrumentation (WMI) providers that enable minimal system diagnostics. WMI is the infrastructure for management data and operations on Windows-based operating systems. You can write WMI scripts or applications to automate administrative tasks on remote computers. Additionally, WMI supplies management data to other parts of the operating system and products.


I dunno, Michael Niehaus isn't very high on running these scripts in WinPE. He was a former PM for Autopilot deployment.
Windows Autopilot Autopilot topics of the week
 
Ye
Did you add all of the WinPE Add-on's?

Windows PowerShell/WinPE-StorageWMIWinPE-StorageWMI contains PowerShell cmdlets for storage management. These cmdlets use the Windows Storage Management API (SMAPI) to manage local storage, such as disk, partition, and volume objects. Or, these cmdlets use the Windows SMAPI together with array storage management by using a storage management provider. WinPE-StorageWMI also contains Internet SCSI (iSCSI) Initiator cmdlets for connecting a host computer or server to virtual disks on external iSCSI-based storage arrays through an Ethernet network adapter or iSCSI Host Bus Adapter (HBA).

Dependencies: Install WinPE-WMI > WinPE-NetFX > WinPE-Scripting > WinPE-PowerShell before you install WinPE-StorageWMI.
Scripting/WinPE-WMIWinPE-WMI contains a subset of the Windows Management Instrumentation (WMI) providers that enable minimal system diagnostics. WMI is the infrastructure for management data and operations on Windows-based operating systems. You can write WMI scripts or applications to automate administrative tasks on remote computers. Additionally, WMI supplies management data to other parts of the operating system and products.


I dunno, Michael Niehaus isn't very high on running these scripts in WinPE. He formerly was the AP evangelist for MS.
Windows Autopilot Autopilot topics of the week
Yes! I added all the WinPE Add-ons in order with the command below:

Dism /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-WMI.cab" /Image:"C:\WinPE_Autopilot\mount"

Dism /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\winpe-netfx.cab" /Image:"C:\WinPE_Autopilot\mount"

Dism /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\winpe-scripting.cab" /Image:"C:\WinPE_Autopilot\mount"

Dism /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\winpe-powershell.cab" /Image:"C:\WinPE_Autopilot\mount"

Dism /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\winpe-storagewmi.cab" /Image:"C:\WinPE_Autopilot\mount"

Dism /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-DismCmdlets.cab" /Image:"C:\WinPE_Autopilot\mount"

Dism /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-SecureStartup.cab" /Image:"C:\WinPE_Autopilot\mount"

Dism /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-WMI_en-us.cab" /Image:"C:\WinPE_Autopilot\mount"

Dism /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-NetFX_en-us.cab" /Image:"C:\WinPE_Autopilot\mount"

Dism /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-Scripting_en-us.cab" /Image:"C:\WinPE_Autopilot\mount"

Dism /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-PowerShell_en-us.cab" /Image:"C:\WinPE_Autopilot\mount"

Dism /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-StorageWMI_en-us.cab" /Image:"C:\WinPE_Autopilot\mount"

Dism /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-DismCmdlets_en-us.cab" /Image:"C:\WinPE_Autopilot\mount"

Dism /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-SecureStartup_en-us.cab" /Image:"C:\WinPE_Autopilot\mount"
 
Back
Top