Solved garlin's PowerShell scripts for updating Secure Boot CA 2023


Which Macrium are you using 8 or 10 ?
Macrium USB with WinRE ?
Did you have to patch the boot USB drive to fix certificates and SVN or did it work directly with the recovery drive created by Marcrium ?

Thanks in advance
I use Macrium 8, the free one, it's a Macrium USB stick. And what I did is run the Batch file to update the UEFI Files, just added the -BootMedia parameter, so it also copied the new boot files into the USB. I tested it all my PC's and I have zero boot violations with Secure Boot enabled. I could even reach into the manager to deploy backups offline.
 

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2AMD Ryzen 5 5600G @ 3.9/4.4Ghz2 x 16 GB DDR4 Kingston Fury Beast 3200 MhzAMD Radeon RX 6600 XT MSI Mech 2X OC Edition ...
    OS
    Windows 11 Pro 25H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Built PC
    CPU
    AMD Ryzen 5 5600G @ 3.9/4.4Ghz
    Motherboard
    MSI B550M-PRO-WiFi Ver. 1.4
    Memory
    2 x 16 GB DDR4 Kingston Fury Beast 3200 Mhz
    Graphics Card(s)
    AMD Radeon RX 6600 XT MSI Mech 2X OC Edition 8 GB
    Sound Card
    Realtek High Definition Audio (Integrated)
    Monitor(s) Displays
    Samsung C50Rx 27" LED / HP S2031 20" LCD
    Screen Resolution
    1920 x 1080 px / 1600 x 900 px
    Hard Drives
    WD Blue SN570 NVME M.2 SSD [1 TB] -- External Drives: - WD Scorpion Blue 250 GB 5400 RPM (Data Backup) - Hitachi 500 GB 5400 RPM (Software / ISOs Backup) - Toshiba MQ01ABD100 1 TB 5400 RPM (OS Images) - HGST TravelStar 7K1000 1 TB, 7200 RPM USB 3.0 - ADATA SU800 2TB SSD USB 3.0
    PSU
    Corsair RM750e 750W Fully Modular
    Case
    Naceb Hydra NA-1602
    Cooling
    Naceb Orpheus x 3 (Front) + Naceb Cepheus 1200 RPM Max (Rear) + ThemalRight Assasin X 90 SE (CPU)
    Keyboard
    Logitech MK470 Wireless
    Mouse
    Logitech MK470 Wireless
    Internet Speed
    120 MB Symetrical
    Browser
    Firefox / Brave / Edge
    Antivirus
    Windows Defender
    Other Info
    - VMs: WMware Player - Windows 8.1 Pro x64 / Windows 11 Pro
    - Wacom Intuos Pro Small Tablet PTH-460
  • At a glance

    Windows 11 Pro 25H2AMD Ryzen 7 7730U @ 2.0/4.5 Ghz2 x 16 GB Kingston Fury Impact DDR4 3200 MhzRadeon (tm) Graphics Vega 8 (512 MB)
    Operating System
    Windows 11 Pro 25H2
    Computer type
    Laptop
    Manufacturer/Model
    HP Pavilion 15-eh3000la (80M53LA)
    CPU
    AMD Ryzen 7 7730U @ 2.0/4.5 Ghz
    Motherboard
    HP 8BC7
    Memory
    2 x 16 GB Kingston Fury Impact DDR4 3200 Mhz
    Graphics card(s)
    Radeon (tm) Graphics Vega 8 (512 MB)
    Sound Card
    Realtek High Definition Audio (Integrated)
    Monitor(s) Displays
    AU Optronics
    Screen Resolution
    1920 x 1080 px (125% size)
    Hard Drives
    WD Blue SN570 1TB NVME M.2 Drive
    PSU
    45 Watt Charger
    Cooling
    Laptop Cooling Pad
    Keyboard
    Free Wolf Foldable Portable Keyboard
    Mouse
    Free Wolf Wireless Mouse
    Internet Speed
    120 MB Symetrical
    Browser
    Firefox / Brave / Edge
    Antivirus
    Windows Defender
    Other Info
    - 41mWh battery.
    - Wacom Intuos Pro Small Tablet PTH-460
I am a normal user and I hardly ever re install windows or use software for backups.

In the future when all of this secure boot stuff is over. It is 2028 and I want to re install windows using the media creation tool on USB thumb drive will I have to worry about this stuff? When I say stuff I mean the SkuSiPolicy SVN Firmware etc, etc.
If you want to reinstall windows in the future, it should come with some measures to deploy the certs if they are needed... but that supposedly should happen if you reset your certs through BIOS settings. Normally, nowadays even if your BIOS loses settings, the certs are saved somewhere else so, in the remote case you need to reinstall Windows, you won't need to do anything, Windows Setup should take care of anything, if it's needed.
 

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2AMD Ryzen 5 5600G @ 3.9/4.4Ghz2 x 16 GB DDR4 Kingston Fury Beast 3200 MhzAMD Radeon RX 6600 XT MSI Mech 2X OC Edition ...
    OS
    Windows 11 Pro 25H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Built PC
    CPU
    AMD Ryzen 5 5600G @ 3.9/4.4Ghz
    Motherboard
    MSI B550M-PRO-WiFi Ver. 1.4
    Memory
    2 x 16 GB DDR4 Kingston Fury Beast 3200 Mhz
    Graphics Card(s)
    AMD Radeon RX 6600 XT MSI Mech 2X OC Edition 8 GB
    Sound Card
    Realtek High Definition Audio (Integrated)
    Monitor(s) Displays
    Samsung C50Rx 27" LED / HP S2031 20" LCD
    Screen Resolution
    1920 x 1080 px / 1600 x 900 px
    Hard Drives
    WD Blue SN570 NVME M.2 SSD [1 TB] -- External Drives: - WD Scorpion Blue 250 GB 5400 RPM (Data Backup) - Hitachi 500 GB 5400 RPM (Software / ISOs Backup) - Toshiba MQ01ABD100 1 TB 5400 RPM (OS Images) - HGST TravelStar 7K1000 1 TB, 7200 RPM USB 3.0 - ADATA SU800 2TB SSD USB 3.0
    PSU
    Corsair RM750e 750W Fully Modular
    Case
    Naceb Hydra NA-1602
    Cooling
    Naceb Orpheus x 3 (Front) + Naceb Cepheus 1200 RPM Max (Rear) + ThemalRight Assasin X 90 SE (CPU)
    Keyboard
    Logitech MK470 Wireless
    Mouse
    Logitech MK470 Wireless
    Internet Speed
    120 MB Symetrical
    Browser
    Firefox / Brave / Edge
    Antivirus
    Windows Defender
    Other Info
    - VMs: WMware Player - Windows 8.1 Pro x64 / Windows 11 Pro
    - Wacom Intuos Pro Small Tablet PTH-460
  • At a glance

    Windows 11 Pro 25H2AMD Ryzen 7 7730U @ 2.0/4.5 Ghz2 x 16 GB Kingston Fury Impact DDR4 3200 MhzRadeon (tm) Graphics Vega 8 (512 MB)
    Operating System
    Windows 11 Pro 25H2
    Computer type
    Laptop
    Manufacturer/Model
    HP Pavilion 15-eh3000la (80M53LA)
    CPU
    AMD Ryzen 7 7730U @ 2.0/4.5 Ghz
    Motherboard
    HP 8BC7
    Memory
    2 x 16 GB Kingston Fury Impact DDR4 3200 Mhz
    Graphics card(s)
    Radeon (tm) Graphics Vega 8 (512 MB)
    Sound Card
    Realtek High Definition Audio (Integrated)
    Monitor(s) Displays
    AU Optronics
    Screen Resolution
    1920 x 1080 px (125% size)
    Hard Drives
    WD Blue SN570 1TB NVME M.2 Drive
    PSU
    45 Watt Charger
    Cooling
    Laptop Cooling Pad
    Keyboard
    Free Wolf Foldable Portable Keyboard
    Mouse
    Free Wolf Wireless Mouse
    Internet Speed
    120 MB Symetrical
    Browser
    Firefox / Brave / Edge
    Antivirus
    Windows Defender
    Other Info
    - 41mWh battery.
    - Wacom Intuos Pro Small Tablet PTH-460
OK. That output is kinda what I imagined. You have two System disks, and we need to determine which one has the active EFI partition.

Let me rethink how to approach this problem, since I've been trying to carefully not update the wrong partition (and have the required changes be missed on the proper partition).


I ran into the same issue again as the person you were responding to. ;)

From what I could see, the script appeared to get stuck when resolving the ESP through the Win32_DiskPartition/Get-Partition path.

In my case, the Win32_DiskPartition query did see a GPT System partition on Disk 0, but the second query didn't line up:
Powershell:
PowerShell 7.6.1
PS C:\Users\RYSZARD> Get-CimInstance -Namespace 'Root\CIMv2' -Query 'SELECT * FROM Win32_DiskPartition' | where { $_.Type -eq 'GPT: System' }

Name             NumberOfBlocks                     BootPartition                      PrimaryPartition                  Size                              Index
----             --------------                     -------------                      ----------------                  ----                              -----
Диск #0, раздел… 409600                             True                               True                              209715200                         0

PS C:\Users\RYSZARD> Get-Partition -DiskNumber 0 | Where-Object { $_.Type -eq 'System' }
Get-Partition: No MSFT_Partition objects found with property 'DiskNumber' equal to '0'.  Verify the value of the property and retry.
PS C:\Users\RYSZARD>

It appeared that the Win32_DiskPartition result and the Storage module/Get-Partition result were not lining up on this system.

I confirmed the ESP itself was fine by mounting it manually with mountvol /S, which exposed EFI\Microsoft\Boot and showed both bootmgfw.efi and SkuSiPolicy.p7b.

What worked for me was keeping the existing lookup logic first, but adding a fallback. If the Win32_DiskPartition/Get-Partition lookup does not return a usable ESP path, the script temporarily mounts the ESP using mountvol /S, verifies that EFI\Microsoft\Boot exists, uses that path for the check, and then unmounts the temporary drive letter afterward.

That also avoids hardcoding Disk 0 or assuming everyone’s ESP is mounted as S: or Z:.

Attached is the 'fixed' ps1 that worked in my case:
 

Attachments

My Computers My Computers

  • At a glance

    Windows 11 Enterprise 26H1Intel Core Ultra 7 (Liquid Metal)32GB DDR5Intel Graphics (Integrated)
    OS
    Windows 11 Enterprise 26H1
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkPad X1 Carbon Gen 12
    CPU
    Intel Core Ultra 7 (Liquid Metal)
    Motherboard
    OEM
    Memory
    32GB DDR5
    Graphics Card(s)
    Intel Graphics (Integrated)
    Sound Card
    Realtek
    Monitor(s) Displays
    Lenovo OLED
    Screen Resolution
    2880x1800
    Hard Drives
    2TB Samsung 990 Pro
    PSU
    OEM
    Case
    OEM
    Cooling
    OEM
    Keyboard
    ru-RU
    Mouse
    Lenovo Haptic Touchpad
    Internet Speed
    2Gbps (Xfinity ISP)
    Browser
    Chromium, Firefox
    Antivirus
    Windows Security
  • At a glance

    Windows 11 Enterprise 26H1Intel Core i9-13900 (Delidded, Liquid Metal)64GB DDR5EVGA GeForce RTX 3090 FTW3 Ultra
    Operating System
    Windows 11 Enterprise 26H1
    Computer type
    PC/Desktop
    Manufacturer/Model
    Lenovo P3 Ultra
    CPU
    Intel Core i9-13900 (Delidded, Liquid Metal)
    Motherboard
    OEM
    Memory
    64GB DDR5
    Graphics card(s)
    EVGA GeForce RTX 3090 FTW3 Ultra
    Sound Card
    Reaktek
    Monitor(s) Displays
    49" Odyssey OLED G9 (G95SC)
    Screen Resolution
    5120x1440
    Hard Drives
    512GB NVMe (OS), 4TB NVMe (Folders, Games)
    PSU
    Thermaltake Smart M 650W Bronze
    Case
    OEM
    Cooling
    OEM
    Keyboard
    Razer Huntsman V3 Pro 8KHz
    Mouse
    Razer Basilisk V3 Pro 35K
    Internet Speed
    2Gbps (Xfinity ISP)
    Browser
    Chromium, Firefox
    Antivirus
    Windows Security
From what I could see, the script appeared to get stuck when resolving the ESP through the Win32_DiskPartition/Get-Partition path.

In my case, the Win32_DiskPartition query did see a GPT System partition on Disk 0, but the second query didn't line up:
Powershell:
PowerShell 7.6.1
PS C:\Users\RYSZARD> Get-CimInstance -Namespace 'Root\CIMv2' -Query 'SELECT * FROM Win32_DiskPartition' | where { $_.Type -eq 'GPT: System' }

Name             NumberOfBlocks                     BootPartition                      PrimaryPartition                  Size                              Index
----             --------------                     -------------                      ----------------                  ----                              -----
Диск #0, раздел… 409600                             True                               True                              209715200                         0

PS C:\Users\RYSZARD> Get-Partition -DiskNumber 0 | Where-Object { $_.Type -eq 'System' }
Get-Partition: No MSFT_Partition objects found with property 'DiskNumber' equal to '0'.  Verify the value of the property and retry.
PS C:\Users\RYSZARD>

That's not the newest method. Does this work on your system?
Code:
$SystemDisk = [regex]::Match((Get-CimInstance -ClassName Win32_BootConfiguration).Caption,'\d+').Value
$GUID = (Get-Partition -DiskNumber $SystemDisk | Where-Object { $_.Type -eq 'System' }).Guid
Get-ChildItem -LiteralPath ('\\?\Volume{0}\EFI\Microsoft\Boot' -f $GUID)
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7
That's not the newest method. Does this work on your system?
Code:
$SystemDisk = [regex]::Match((Get-CimInstance -ClassName Win32_BootConfiguration).Caption,'\d+').Value
$GUID = (Get-Partition -DiskNumber $SystemDisk | Where-Object { $_.Type -eq 'System' }).Guid
Get-ChildItem -LiteralPath ('\\?\Volume{0}\EFI\Microsoft\Boot' -f $GUID)
Here's what see when I run these queries in powershell:

Powershell:
PowerShell 7.6.1

PS C:\Users\RYSZARD> $SystemDisk = [regex]::Match((Get-CimInstance -ClassName Win32_BootConfiguration).Caption,'\d+').Value

PS C:\Users\RYSZARD> $GUID = (Get-Partition -DiskNumber $SystemDisk | Where-Object { $_.Type -eq 'System' }).Guid

Get-Partition: No MSFT_Partition objects found with property 'DiskNumber' equal to '0'.  Verify the value of the property and retry.

PS C:\Users\RYSZARD> Get-ChildItem -LiteralPath ('\\?\Volume{0}\EFI\Microsoft\Boot' -f $GUID)

Get-ChildItem: Cannot find path '\\?\Volume\EFI\Microsoft\Boot' because it does not exist.

PS C:\Users\RYSZARD>
 

My Computers My Computers

  • At a glance

    Windows 11 Enterprise 26H1Intel Core Ultra 7 (Liquid Metal)32GB DDR5Intel Graphics (Integrated)
    OS
    Windows 11 Enterprise 26H1
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkPad X1 Carbon Gen 12
    CPU
    Intel Core Ultra 7 (Liquid Metal)
    Motherboard
    OEM
    Memory
    32GB DDR5
    Graphics Card(s)
    Intel Graphics (Integrated)
    Sound Card
    Realtek
    Monitor(s) Displays
    Lenovo OLED
    Screen Resolution
    2880x1800
    Hard Drives
    2TB Samsung 990 Pro
    PSU
    OEM
    Case
    OEM
    Cooling
    OEM
    Keyboard
    ru-RU
    Mouse
    Lenovo Haptic Touchpad
    Internet Speed
    2Gbps (Xfinity ISP)
    Browser
    Chromium, Firefox
    Antivirus
    Windows Security
  • At a glance

    Windows 11 Enterprise 26H1Intel Core i9-13900 (Delidded, Liquid Metal)64GB DDR5EVGA GeForce RTX 3090 FTW3 Ultra
    Operating System
    Windows 11 Enterprise 26H1
    Computer type
    PC/Desktop
    Manufacturer/Model
    Lenovo P3 Ultra
    CPU
    Intel Core i9-13900 (Delidded, Liquid Metal)
    Motherboard
    OEM
    Memory
    64GB DDR5
    Graphics card(s)
    EVGA GeForce RTX 3090 FTW3 Ultra
    Sound Card
    Reaktek
    Monitor(s) Displays
    49" Odyssey OLED G9 (G95SC)
    Screen Resolution
    5120x1440
    Hard Drives
    512GB NVMe (OS), 4TB NVMe (Folders, Games)
    PSU
    Thermaltake Smart M 650W Bronze
    Case
    OEM
    Cooling
    OEM
    Keyboard
    Razer Huntsman V3 Pro 8KHz
    Mouse
    Razer Basilisk V3 Pro 35K
    Internet Speed
    2Gbps (Xfinity ISP)
    Browser
    Chromium, Firefox
    Antivirus
    Windows Security
Do you mind describing your exact disk layout? What's different from a normal disk? Is the EFI on a different disk, multiple EFI partitions?
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7
Do you mind describing your exact disk layout? What's different from a normal disk? Is the EFI on a different disk, multiple EFI partitions?
Sure thing, I pulled a fuller layout report.

It looks like a pretty normal single-disk setup. There is one Samsung SSD 990 PRO 2TB on Disk 0. DiskPart shows it as GPT, and the Dynamic column is blank, so it does not look like a Dynamic Disk.
Code:
Microsoft DiskPart, version 10.0.28000.1896

Disk #    Status   Size     Free           Dyn       GPT
--------  -------  -------  -------        ---       ---
Disk 0    Online   1863 GB  1024 KB                   *

Volume #  Ltr  Label    Fs     Type       Size     Status   Info
----------  ---  -------  -----  ---------  -------  -------  ------
Volume 0    C    Windows  NTFS   Partition  1862 GB  Healthy  Boot
Volume 1                 FAT32  Partition   200 MB  Healthy  System
Volume 2                 NTFS   Partition   730 MB  Healthy  Hidden

Disk 0 is selected.

Samsung SSD 990 PRO 2TB
Disk ID                         : {Redacted}
Type                            : NVMe
Status                          : Online
Current Read-only State          : No
Read-only                       : No
Boot Disk                       : Yes
Pagefile Disk                   : Yes
Hibernation File Disk           : No
Crashdump Disk                  : Yes
Clustered Disk                  : No

Partition #     Type       Size     Offset
-------------  ---------  -------  -------
Partition 1    System     200 MB   1024 KB
Partition 2    Reserved   16 MB    201 MB
Partition 3    Primary    1862 GB  217 MB
Partition 4    Recovery   730 MB   1862 GB
 

My Computers My Computers

  • At a glance

    Windows 11 Enterprise 26H1Intel Core Ultra 7 (Liquid Metal)32GB DDR5Intel Graphics (Integrated)
    OS
    Windows 11 Enterprise 26H1
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkPad X1 Carbon Gen 12
    CPU
    Intel Core Ultra 7 (Liquid Metal)
    Motherboard
    OEM
    Memory
    32GB DDR5
    Graphics Card(s)
    Intel Graphics (Integrated)
    Sound Card
    Realtek
    Monitor(s) Displays
    Lenovo OLED
    Screen Resolution
    2880x1800
    Hard Drives
    2TB Samsung 990 Pro
    PSU
    OEM
    Case
    OEM
    Cooling
    OEM
    Keyboard
    ru-RU
    Mouse
    Lenovo Haptic Touchpad
    Internet Speed
    2Gbps (Xfinity ISP)
    Browser
    Chromium, Firefox
    Antivirus
    Windows Security
  • At a glance

    Windows 11 Enterprise 26H1Intel Core i9-13900 (Delidded, Liquid Metal)64GB DDR5EVGA GeForce RTX 3090 FTW3 Ultra
    Operating System
    Windows 11 Enterprise 26H1
    Computer type
    PC/Desktop
    Manufacturer/Model
    Lenovo P3 Ultra
    CPU
    Intel Core i9-13900 (Delidded, Liquid Metal)
    Motherboard
    OEM
    Memory
    64GB DDR5
    Graphics card(s)
    EVGA GeForce RTX 3090 FTW3 Ultra
    Sound Card
    Reaktek
    Monitor(s) Displays
    49" Odyssey OLED G9 (G95SC)
    Screen Resolution
    5120x1440
    Hard Drives
    512GB NVMe (OS), 4TB NVMe (Folders, Games)
    PSU
    Thermaltake Smart M 650W Bronze
    Case
    OEM
    Cooling
    OEM
    Keyboard
    Razer Huntsman V3 Pro 8KHz
    Mouse
    Razer Basilisk V3 Pro 35K
    Internet Speed
    2Gbps (Xfinity ISP)
    Browser
    Chromium, Firefox
    Antivirus
    Windows Security
I found an error in the first line.
Code:
$SystemDisk = [regex]::Match((Get-CimInstance -ClassName Win32_BootConfiguration).Caption,'\d+').Groups[0].Value
$GUID = (Get-Partition -DiskNumber $SystemDisk | Where-Object { $_.Type -eq 'System' }).Guid
Get-ChildItem -LiteralPath ('\\?\Volume{0}\EFI\Microsoft\Boot' -f $GUID)

What does this say?
Code:
Get-CimInstance -Namespace 'Root\CIMv2' -Query 'SELECT * FROM Win32_DiskPartition' | select Type
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7
I found an error in the first line.
Code:
$SystemDisk = [regex]::Match((Get-CimInstance -ClassName Win32_BootConfiguration).Caption,'\d+').Groups[0].Value
$GUID = (Get-Partition -DiskNumber $SystemDisk | Where-Object { $_.Type -eq 'System' }).Guid
Get-ChildItem -LiteralPath ('\\?\Volume{0}\EFI\Microsoft\Boot' -f $GUID)

What does this say?
Code:
Get-CimInstance -Namespace 'Root\CIMv2' -Query 'SELECT * FROM Win32_DiskPartition' | select Type
This is what I am seeing:


Code:
PS C:\Users\RYSZARD> Get-CimInstance -Namespace 'Root\CIMv2' -Query 'SELECT * FROM Win32_DiskPartition' | select Type

Type
----
GPT: System
GPT: Basic Data
GPT: Unknown

PS C:\Users\RYSZARD>
 

My Computers My Computers

  • At a glance

    Windows 11 Enterprise 26H1Intel Core Ultra 7 (Liquid Metal)32GB DDR5Intel Graphics (Integrated)
    OS
    Windows 11 Enterprise 26H1
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkPad X1 Carbon Gen 12
    CPU
    Intel Core Ultra 7 (Liquid Metal)
    Motherboard
    OEM
    Memory
    32GB DDR5
    Graphics Card(s)
    Intel Graphics (Integrated)
    Sound Card
    Realtek
    Monitor(s) Displays
    Lenovo OLED
    Screen Resolution
    2880x1800
    Hard Drives
    2TB Samsung 990 Pro
    PSU
    OEM
    Case
    OEM
    Cooling
    OEM
    Keyboard
    ru-RU
    Mouse
    Lenovo Haptic Touchpad
    Internet Speed
    2Gbps (Xfinity ISP)
    Browser
    Chromium, Firefox
    Antivirus
    Windows Security
  • At a glance

    Windows 11 Enterprise 26H1Intel Core i9-13900 (Delidded, Liquid Metal)64GB DDR5EVGA GeForce RTX 3090 FTW3 Ultra
    Operating System
    Windows 11 Enterprise 26H1
    Computer type
    PC/Desktop
    Manufacturer/Model
    Lenovo P3 Ultra
    CPU
    Intel Core i9-13900 (Delidded, Liquid Metal)
    Motherboard
    OEM
    Memory
    64GB DDR5
    Graphics card(s)
    EVGA GeForce RTX 3090 FTW3 Ultra
    Sound Card
    Reaktek
    Monitor(s) Displays
    49" Odyssey OLED G9 (G95SC)
    Screen Resolution
    5120x1440
    Hard Drives
    512GB NVMe (OS), 4TB NVMe (Folders, Games)
    PSU
    Thermaltake Smart M 650W Bronze
    Case
    OEM
    Cooling
    OEM
    Keyboard
    Razer Huntsman V3 Pro 8KHz
    Mouse
    Razer Basilisk V3 Pro 35K
    Internet Speed
    2Gbps (Xfinity ISP)
    Browser
    Chromium, Firefox
    Antivirus
    Windows Security
OK. What about the command block that has the "Groups[0]" added to line #1?
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7
OK. What about the command block that has the "Groups[0]" added to line #1?
Sorry, I thought you only mean bottom one :lmao:


Powershell:
PowerShell 7.6.1
PS C:\Windows\System32> $SystemDisk = [regex]::Match((Get-CimInstance -ClassName Win32_BootConfiguration).Caption,'\d+').Groups[0].Value
PS C:\Windows\System32> $GUID = (Get-Partition -DiskNumber $SystemDisk | Where-Object { $_.Type -eq 'System' }).Guid
Get-Partition: No MSFT_Partition objects found with property 'DiskNumber' equal to '0'.  Verify the value of the property and retry.
PS C:\Windows\System32> Get-ChildItem -LiteralPath ('\\?\Volume{0}\EFI\Microsoft\Boot' -f $GUID)
Get-ChildItem: Cannot find path '\\?\Volume\EFI\Microsoft\Boot' because it does not exist.
PS C:\Windows\System32>
 

My Computers My Computers

  • At a glance

    Windows 11 Enterprise 26H1Intel Core Ultra 7 (Liquid Metal)32GB DDR5Intel Graphics (Integrated)
    OS
    Windows 11 Enterprise 26H1
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkPad X1 Carbon Gen 12
    CPU
    Intel Core Ultra 7 (Liquid Metal)
    Motherboard
    OEM
    Memory
    32GB DDR5
    Graphics Card(s)
    Intel Graphics (Integrated)
    Sound Card
    Realtek
    Monitor(s) Displays
    Lenovo OLED
    Screen Resolution
    2880x1800
    Hard Drives
    2TB Samsung 990 Pro
    PSU
    OEM
    Case
    OEM
    Cooling
    OEM
    Keyboard
    ru-RU
    Mouse
    Lenovo Haptic Touchpad
    Internet Speed
    2Gbps (Xfinity ISP)
    Browser
    Chromium, Firefox
    Antivirus
    Windows Security
  • At a glance

    Windows 11 Enterprise 26H1Intel Core i9-13900 (Delidded, Liquid Metal)64GB DDR5EVGA GeForce RTX 3090 FTW3 Ultra
    Operating System
    Windows 11 Enterprise 26H1
    Computer type
    PC/Desktop
    Manufacturer/Model
    Lenovo P3 Ultra
    CPU
    Intel Core i9-13900 (Delidded, Liquid Metal)
    Motherboard
    OEM
    Memory
    64GB DDR5
    Graphics card(s)
    EVGA GeForce RTX 3090 FTW3 Ultra
    Sound Card
    Reaktek
    Monitor(s) Displays
    49" Odyssey OLED G9 (G95SC)
    Screen Resolution
    5120x1440
    Hard Drives
    512GB NVMe (OS), 4TB NVMe (Folders, Games)
    PSU
    Thermaltake Smart M 650W Bronze
    Case
    OEM
    Cooling
    OEM
    Keyboard
    Razer Huntsman V3 Pro 8KHz
    Mouse
    Razer Basilisk V3 Pro 35K
    Internet Speed
    2Gbps (Xfinity ISP)
    Browser
    Chromium, Firefox
    Antivirus
    Windows Security
(Get-CimInstance -ClassName Win32_BootConfiguration).Caption
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7
(Get-CimInstance -ClassName Win32_BootConfiguration).Caption
Powershell:
PS C:\Windows\System32> (Get-CimInstance -ClassName Win32_BootConfiguration).Caption
\Device\Harddisk0\Partition1
PS C:\Windows\System32>
 

My Computers My Computers

  • At a glance

    Windows 11 Enterprise 26H1Intel Core Ultra 7 (Liquid Metal)32GB DDR5Intel Graphics (Integrated)
    OS
    Windows 11 Enterprise 26H1
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkPad X1 Carbon Gen 12
    CPU
    Intel Core Ultra 7 (Liquid Metal)
    Motherboard
    OEM
    Memory
    32GB DDR5
    Graphics Card(s)
    Intel Graphics (Integrated)
    Sound Card
    Realtek
    Monitor(s) Displays
    Lenovo OLED
    Screen Resolution
    2880x1800
    Hard Drives
    2TB Samsung 990 Pro
    PSU
    OEM
    Case
    OEM
    Cooling
    OEM
    Keyboard
    ru-RU
    Mouse
    Lenovo Haptic Touchpad
    Internet Speed
    2Gbps (Xfinity ISP)
    Browser
    Chromium, Firefox
    Antivirus
    Windows Security
  • At a glance

    Windows 11 Enterprise 26H1Intel Core i9-13900 (Delidded, Liquid Metal)64GB DDR5EVGA GeForce RTX 3090 FTW3 Ultra
    Operating System
    Windows 11 Enterprise 26H1
    Computer type
    PC/Desktop
    Manufacturer/Model
    Lenovo P3 Ultra
    CPU
    Intel Core i9-13900 (Delidded, Liquid Metal)
    Motherboard
    OEM
    Memory
    64GB DDR5
    Graphics card(s)
    EVGA GeForce RTX 3090 FTW3 Ultra
    Sound Card
    Reaktek
    Monitor(s) Displays
    49" Odyssey OLED G9 (G95SC)
    Screen Resolution
    5120x1440
    Hard Drives
    512GB NVMe (OS), 4TB NVMe (Folders, Games)
    PSU
    Thermaltake Smart M 650W Bronze
    Case
    OEM
    Cooling
    OEM
    Keyboard
    Razer Huntsman V3 Pro 8KHz
    Mouse
    Razer Basilisk V3 Pro 35K
    Internet Speed
    2Gbps (Xfinity ISP)
    Browser
    Chromium, Firefox
    Antivirus
    Windows Security
(Get-Partition -DiskNumber [int]$SystemDisk | Where-Object { $_.Type -eq 'System' }).Guid
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7
(Get-Partition -DiskNumber [int]$SystemDisk | Where-Object { $_.Type -eq 'System' }).Guid
Powershell:
PS C:\Windows\System32> (Get-Partition -DiskNumber [int]$SystemDisk | Where-Object { $_.Type -eq 'System' }).Guid
 

My Computers My Computers

  • At a glance

    Windows 11 Enterprise 26H1Intel Core Ultra 7 (Liquid Metal)32GB DDR5Intel Graphics (Integrated)
    OS
    Windows 11 Enterprise 26H1
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkPad X1 Carbon Gen 12
    CPU
    Intel Core Ultra 7 (Liquid Metal)
    Motherboard
    OEM
    Memory
    32GB DDR5
    Graphics Card(s)
    Intel Graphics (Integrated)
    Sound Card
    Realtek
    Monitor(s) Displays
    Lenovo OLED
    Screen Resolution
    2880x1800
    Hard Drives
    2TB Samsung 990 Pro
    PSU
    OEM
    Case
    OEM
    Cooling
    OEM
    Keyboard
    ru-RU
    Mouse
    Lenovo Haptic Touchpad
    Internet Speed
    2Gbps (Xfinity ISP)
    Browser
    Chromium, Firefox
    Antivirus
    Windows Security
  • At a glance

    Windows 11 Enterprise 26H1Intel Core i9-13900 (Delidded, Liquid Metal)64GB DDR5EVGA GeForce RTX 3090 FTW3 Ultra
    Operating System
    Windows 11 Enterprise 26H1
    Computer type
    PC/Desktop
    Manufacturer/Model
    Lenovo P3 Ultra
    CPU
    Intel Core i9-13900 (Delidded, Liquid Metal)
    Motherboard
    OEM
    Memory
    64GB DDR5
    Graphics card(s)
    EVGA GeForce RTX 3090 FTW3 Ultra
    Sound Card
    Reaktek
    Monitor(s) Displays
    49" Odyssey OLED G9 (G95SC)
    Screen Resolution
    5120x1440
    Hard Drives
    512GB NVMe (OS), 4TB NVMe (Folders, Games)
    PSU
    Thermaltake Smart M 650W Bronze
    Case
    OEM
    Cooling
    OEM
    Keyboard
    Razer Huntsman V3 Pro 8KHz
    Mouse
    Razer Basilisk V3 Pro 35K
    Internet Speed
    2Gbps (Xfinity ISP)
    Browser
    Chromium, Firefox
    Antivirus
    Windows Security
Get-Partition -DiskNumber [int]$SystemDisk | select Type
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7
Get-Partition -DiskNumber [int]$SystemDisk | select Type
Powershell:
PS C:\Windows\System32> Get-Partition -DiskNumber [int]$SystemDisk | select Type
Get-Partition: Cannot process argument transformation on parameter 'DiskNumber'. Cannot convert value "[int]0" to type "System.UInt32[]". Error: "Cannot convert value "[int]0" to type "System.UInt32". Error: "The input string '[int]0' was not in a correct format.""
PS C:\Windows\System32>
 

My Computers My Computers

  • At a glance

    Windows 11 Enterprise 26H1Intel Core Ultra 7 (Liquid Metal)32GB DDR5Intel Graphics (Integrated)
    OS
    Windows 11 Enterprise 26H1
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkPad X1 Carbon Gen 12
    CPU
    Intel Core Ultra 7 (Liquid Metal)
    Motherboard
    OEM
    Memory
    32GB DDR5
    Graphics Card(s)
    Intel Graphics (Integrated)
    Sound Card
    Realtek
    Monitor(s) Displays
    Lenovo OLED
    Screen Resolution
    2880x1800
    Hard Drives
    2TB Samsung 990 Pro
    PSU
    OEM
    Case
    OEM
    Cooling
    OEM
    Keyboard
    ru-RU
    Mouse
    Lenovo Haptic Touchpad
    Internet Speed
    2Gbps (Xfinity ISP)
    Browser
    Chromium, Firefox
    Antivirus
    Windows Security
  • At a glance

    Windows 11 Enterprise 26H1Intel Core i9-13900 (Delidded, Liquid Metal)64GB DDR5EVGA GeForce RTX 3090 FTW3 Ultra
    Operating System
    Windows 11 Enterprise 26H1
    Computer type
    PC/Desktop
    Manufacturer/Model
    Lenovo P3 Ultra
    CPU
    Intel Core i9-13900 (Delidded, Liquid Metal)
    Motherboard
    OEM
    Memory
    64GB DDR5
    Graphics card(s)
    EVGA GeForce RTX 3090 FTW3 Ultra
    Sound Card
    Reaktek
    Monitor(s) Displays
    49" Odyssey OLED G9 (G95SC)
    Screen Resolution
    5120x1440
    Hard Drives
    512GB NVMe (OS), 4TB NVMe (Folders, Games)
    PSU
    Thermaltake Smart M 650W Bronze
    Case
    OEM
    Cooling
    OEM
    Keyboard
    Razer Huntsman V3 Pro 8KHz
    Mouse
    Razer Basilisk V3 Pro 35K
    Internet Speed
    2Gbps (Xfinity ISP)
    Browser
    Chromium, Firefox
    Antivirus
    Windows Security
Get-Partition -DiskNumber ([int]$SystemDisk)
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7
Get-Partition -DiskNumber ([int]$SystemDisk)
Powershell:
PS C:\Windows\System32> Get-Partition -DiskNumber ([int]$SystemDisk)
Get-Partition: No MSFT_Partition objects found with property 'DiskNumber' equal to '0'.  Verify the value of the property and retry.
PS C:\Windows\System32>
 

My Computers My Computers

  • At a glance

    Windows 11 Enterprise 26H1Intel Core Ultra 7 (Liquid Metal)32GB DDR5Intel Graphics (Integrated)
    OS
    Windows 11 Enterprise 26H1
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkPad X1 Carbon Gen 12
    CPU
    Intel Core Ultra 7 (Liquid Metal)
    Motherboard
    OEM
    Memory
    32GB DDR5
    Graphics Card(s)
    Intel Graphics (Integrated)
    Sound Card
    Realtek
    Monitor(s) Displays
    Lenovo OLED
    Screen Resolution
    2880x1800
    Hard Drives
    2TB Samsung 990 Pro
    PSU
    OEM
    Case
    OEM
    Cooling
    OEM
    Keyboard
    ru-RU
    Mouse
    Lenovo Haptic Touchpad
    Internet Speed
    2Gbps (Xfinity ISP)
    Browser
    Chromium, Firefox
    Antivirus
    Windows Security
  • At a glance

    Windows 11 Enterprise 26H1Intel Core i9-13900 (Delidded, Liquid Metal)64GB DDR5EVGA GeForce RTX 3090 FTW3 Ultra
    Operating System
    Windows 11 Enterprise 26H1
    Computer type
    PC/Desktop
    Manufacturer/Model
    Lenovo P3 Ultra
    CPU
    Intel Core i9-13900 (Delidded, Liquid Metal)
    Motherboard
    OEM
    Memory
    64GB DDR5
    Graphics card(s)
    EVGA GeForce RTX 3090 FTW3 Ultra
    Sound Card
    Reaktek
    Monitor(s) Displays
    49" Odyssey OLED G9 (G95SC)
    Screen Resolution
    5120x1440
    Hard Drives
    512GB NVMe (OS), 4TB NVMe (Folders, Games)
    PSU
    Thermaltake Smart M 650W Bronze
    Case
    OEM
    Cooling
    OEM
    Keyboard
    Razer Huntsman V3 Pro 8KHz
    Mouse
    Razer Basilisk V3 Pro 35K
    Internet Speed
    2Gbps (Xfinity ISP)
    Browser
    Chromium, Firefox
    Antivirus
    Windows Security
I don't have this problem. You're on 26H1 (28000). Does your system have another language installed? This looks like Cyrillic -> Диск#0, раздел…
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7
Back
Top Bottom