Anyone good with powershell want to try helping to troubleshoot a long single line command?


hsehestedt

Well-known member
Pro User
VIP
Local time
3:09 AM
Posts
2,574
Location
Texas, USA
OS
Win11 Pro 23H2
I have a command that I am trying to develop that I will call from within a batch file.

I have a large part of this working. Here is what currently works:

powershell.exe -executionpolicy bypass -command "Get-Disk | Get-Partition | Where-Object { $_.PartitionNumber -eq 1 -and $_.mbrtype -eq '0x0c' } | Set-Partition -mbrtype '0x1c'; Get-Disk | Get-Partition | Where-Object { $_.PartitionNumber -eq 2 -and $_.mbrtype -eq '0x07' } | Set-Partition -mbrtype '0x17'"

This command will look at the first 2 partitions on each drive. If the first partition has an MBR type of 0x0c (a FAT32 MBR partition) it will change the partition type ID to 0x1c, making it hidden.

The same thing is repeated for the second partition, changing the type from 0x07 (an NTFS MBR partition) to 0x17, again, making it hidden.

For safety, I want to add one thing to this command: I want it to look for a file called VOL1_M_MEDIA.WIM or VOL2_M_MEDIA.WIM on the root of the partitions and only change the type if those files are present.

Here is what I have tried, but this is not working. The command completes with no failure, but the type is not being changed even though the expected files are present.

powershell.exe -executionpolicy bypass -command "Get-Disk | Get-Partition | Where-Object { $_.PartitionNumber -eq 1 -and $_.mbrtype -eq '0x0c' -and (test-path '$($_.uniqueid)\\VOL1_M_MEDIA.WIM') } | Set-Partition -mbrtype '0x1c'; Get-Disk | Get-Partition | Where-Object { $_.PartitionNumber -eq 2 -and $_.mbrtype -eq '0x07' -and (test-path '$($_.uniqueid)\\VOL2_M_MEDIA.WIM') } | Set-Partition -mbrtype '0x17'"

NOTE: I need the command to find the specified files without using a drive letter.
 

My Computers

System One System Two

  • OS
    Win11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
You're using single-quoted strings, which don't allow variable substitution. Switch to double-quoted strings for your Test-Paths.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 23H2 [rev. 3447]
    Computer type
    PC/Desktop
    Manufacturer/Model
    Intel NUC12WSHi7
    CPU
    12th Gen Intel Core i7-1260P, 2100 MHz
    Motherboard
    NUC12WSBi7
    Memory
    64 GB
    Graphics Card(s)
    Intel Iris Xe
    Sound Card
    built-in Realtek HD audio
    Monitor(s) Displays
    Dell U3219Q
    Screen Resolution
    3840x2160 @ 60Hz
    Hard Drives
    Samsung SSD 990 PRO 1TB
    Keyboard
    CODE 104-Key Mechanical Keyboard with Cherry MX Clears
  • Operating System
    Linux Mint 21.2 (Cinnamon)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Intel NUC8i5BEH
    CPU
    Intel Core i5-8259U CPU @ 2.30GHz
    Memory
    32 GB
    Graphics card(s)
    Iris Plus 655
    Keyboard
    CODE 104-Key Mechanical Keyboard - Cherry MX Clear
You're using single-quoted strings, which don't allow variable substitution. Switch to double-quoted strings for your Test-Paths.
Thanks for the suggestion. Unfortunately that still does not work.
 

My Computers

System One System Two

  • OS
    Win11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
  1. Remove the outer double quotes around the command.
  2. Replace the curly braces '{}' with parentheses '()' in the Where-Object filters.
  3. Replace the single quotes around hexadecimal values with double quotes.
  4. Remove the unnecessary semicolon between the two commands.
After correcting the syntax, the command will look like this:

Powershell:
powershell.exe -executionpolicy bypass -command Get-Disk | Get-Partition | Where-Object { $_.PartitionNumber -eq 1 -and $_.mbrtype -eq "0x0c" } | Set-Partition -mbrtype "0x1c"; Get-Disk | Get-Partition | Where-Object { $_.PartitionNumber -eq 2 -and $_.mbrtype -eq "0x07" } | Set-Partition -mbrtype "0x17"
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop 4
    CPU
    11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
    Motherboard
    Laptop
    Memory
    16GB
    Graphics Card(s)
    Intel(R) Iris(R) Xe Graphics
    Sound Card
    Laptop
    Monitor(s) Displays
    Dell U3011
    Screen Resolution
    2560x1600
    Hard Drives
    Disk 0 (C:)

    KBG40ZNS256G BG4A KIOXIA

    Capacity: 239 GB
    Formatted: 239 GB
    System disk: Yes
    Page file: Yes
    Type: SSD

    Read speed 16.5 KB/s
    Write speed 132 KB/s
    Active time 1%
    Average response time 1.8 ms
    PSU
    Laptop
    Case
    Laptop
    Cooling
    Laptop
    Keyboard
    HP Wired
    Mouse
    Logitech MX Anywhere 2
    Internet Speed
    https://www.speedtest.net/result/14554611114
    Browser
    Edge
    Antivirus
    Sophos
Does the Test-Path part even work, on its own? Looking at my system, that wouldn't make a valid path. I would use a value from the AccessPaths property. Just a sample to look for a text file; change the name to your WIM, and I think you'll find the UniqueID property does not form a valid path.

File path formats on Windows systems

Powershell:
Get-Disk | Get-Partition |
Where-Object { $_.mbrtype -eq 0x07 } |
ForEach-Object {
    "$($_.uniqueid)\testfile.txt"
    Test-Path -LiteralPath "$($_.uniqueid)\testfile.txt"
    $_.AccessPaths | Where-Object { $_ -match "^\\\\\?\\" } |
     ForEach-Object { 
        "$($_)testfile.txt"
        Test-Path -LiteralPath "$($_)testfile.txt"
     }
}
 
Last edited:

My Computers

System One System Two

  • OS
    Windows 11 Pro 23H2 [rev. 3447]
    Computer type
    PC/Desktop
    Manufacturer/Model
    Intel NUC12WSHi7
    CPU
    12th Gen Intel Core i7-1260P, 2100 MHz
    Motherboard
    NUC12WSBi7
    Memory
    64 GB
    Graphics Card(s)
    Intel Iris Xe
    Sound Card
    built-in Realtek HD audio
    Monitor(s) Displays
    Dell U3219Q
    Screen Resolution
    3840x2160 @ 60Hz
    Hard Drives
    Samsung SSD 990 PRO 1TB
    Keyboard
    CODE 104-Key Mechanical Keyboard with Cherry MX Clears
  • Operating System
    Linux Mint 21.2 (Cinnamon)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Intel NUC8i5BEH
    CPU
    Intel Core i5-8259U CPU @ 2.30GHz
    Memory
    32 GB
    Graphics card(s)
    Iris Plus 655
    Keyboard
    CODE 104-Key Mechanical Keyboard - Cherry MX Clear
Update: I figured out a better way.

1. There's no possible way to shorten this solution to fit a single PS command line, especially if you're checking for mounted files.

2. "Get-Disk | Get-Partition" is redundant. Get-Partition returns the same results.

3. You do need a drive letter. While searching for matching partitions, it's possible that your volume is already mounted with a drive letter, or it's unassigned. The first task is to find an unused drive letter, and mount $_.AccessPaths[0] if it's not a drive letter. After checking for the file, the volume can be unmounted.
 

Attachments

  • Hide_MBR_Partition.ps1
    1.6 KB · Views: 1
Last edited:

My Computer

System One

  • OS
    Windows 7
Thanks all for your comments. I won't get a chance to play with this more until this evening, but we'll see where we end up then.
 

My Computers

System One System Two

  • OS
    Win11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
Just a little comment… you do not need a drive letter. I specifically did not use one in my sample. The DOS device paths work just fine.

example from the MS article I linked:
\\.\Volume{b75e2c83-0000-0000-0000-602f00000000}\Test\Foo.txt
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 23H2 [rev. 3447]
    Computer type
    PC/Desktop
    Manufacturer/Model
    Intel NUC12WSHi7
    CPU
    12th Gen Intel Core i7-1260P, 2100 MHz
    Motherboard
    NUC12WSBi7
    Memory
    64 GB
    Graphics Card(s)
    Intel Iris Xe
    Sound Card
    built-in Realtek HD audio
    Monitor(s) Displays
    Dell U3219Q
    Screen Resolution
    3840x2160 @ 60Hz
    Hard Drives
    Samsung SSD 990 PRO 1TB
    Keyboard
    CODE 104-Key Mechanical Keyboard with Cherry MX Clears
  • Operating System
    Linux Mint 21.2 (Cinnamon)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Intel NUC8i5BEH
    CPU
    Intel Core i5-8259U CPU @ 2.30GHz
    Memory
    32 GB
    Graphics card(s)
    Iris Plus 655
    Keyboard
    CODE 104-Key Mechanical Keyboard - Cherry MX Clear
After seeing @pseymour's advice, I managed to rework this into an one-liner. This still works if you have a drive letter assigned to either partition.

Original PS script:
Code:
Get-Disk | Where-Object { $_.PartitionStyle -eq 'MBR' } | ForEach-Object {
    $Part = Get-Partition -DiskNumber $_.DiskNumber -PartitionNumber 1
    if ($Part.MbrType -eq 0x0c -and (Test-Path -LiteralPath "$($Part.AccessPaths[-1])\VOL1_M_MEDIA.WIM")) {
        $Part | Set-Partition -MbrType 0x1c
    }

    $Part = Get-Partition -DiskNumber $_.DiskNumber -PartitionNumber 2
    if ($Part.MbrType -eq 0x07 -and (Test-Path -LiteralPath "$($Part.AccessPaths[-1])\VOL2_M_MEDIA.WIM")) {
        $Part | Set-Partition -MbrType 0x17
    }
 }

CMD one-liner:
Code:
powershell "Get-Disk | where {$_.PartitionStyle -eq 'MBR'} | foreach {$Part = Get-Partition -DiskNumber $_.DiskNumber -PartitionNumber 1; if ($Part.MbrType -eq 0x0c -and (Test-Path -LiteralPath """"$($Part.AccessPaths[-1])\VOL1_M_MEDIA.WIM"""")) {$Part | Set-Partition -MbrType 0x1c}; $Part = Get-Partition -DiskNumber $_.DiskNumber -PartitionNumber 2; if ($Part.MbrType -eq 0x07 -and (Test-Path -LiteralPath """"$($Part.AccessPaths[-1])\VOL2_M_MEDIA.WIM"""")) {$Part | Set-Partition -MbrType 0x17}}"
 

My Computer

System One

  • OS
    Windows 7
Powershell:
Get-Disk |Get-Partition |? {"$($_.PartitionNumber) $($_.MbrType)" -in @('1 12','2 7')} |% {$p=$_;$_.AccessPaths |? {$_ -match '^\\\\\?\\Volume{'} |% {if (Test-Path -Path "$($_)VOL$($p.PartitionNumber)_M_MEDIA.WIM") {$m=$p.MbrType+16;Set-Partition -InputObject $p -MbrType $m}}}
 

My Computers

System One System Two

  • OS
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Asus TUF Gaming (2024)
    CPU
    i7 13650HX
    Memory
    16GB DDR5
    Graphics Card(s)
    GeForce RTX 4060 Mobile
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    512GB SSD internal
    37TB external
    PSU
    Li-ion
    Cooling
    2× Arc Flow Fans, 4× exhaust vents, 5× heatpipes
    Keyboard
    Logitech K800
    Mouse
    Logitech G402
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
  • Operating System
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Medion S15450
    CPU
    i5 1135G7
    Memory
    16GB DDR4
    Graphics card(s)
    Intel Iris Xe
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    2TB SSD internal
    37TB external
    PSU
    Li-ion
    Mouse
    Logitech G402
    Keyboard
    Logitech K800
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
Have you considered rewriting the entire script in PowerShell? That would eliminate the need to construct one-liners.
 

My Computer

System One

  • OS
    Windows 10/11
    Computer type
    Laptop
    Manufacturer/Model
    Acer
Hannes,

Another way to avoid long, difficult-to-debug one-liners yet stay within your preferred scripting method is to echo each conventionally-laid-out line {such as is illustrated by garlin above} to a ps1 file then run that file.

I do it all the time in my batch files.
I echo commands into .vbs files then run the vbs
e.g.
:: Announcement Set VBSScript="%TEMP%\%RANDOM%-WakeMonitor.vbs" Echo WScript.CreateObject("WScript.Shell").SendKeys "{F14}">%VBSScript% If %Completed% EQU 0 Echo CreateObject("SAPI.SPVoice").Speak "It's taking a bit longer than usual, but it should be ready soon.">>%VBSScript% If %Completed% EQU 1 Echo CreateObject("SAPI.SPVoice").Speak "Transfer completed">>%VBSScript% If %Completed% GTR 0 Echo CreateObject("SAPI.SPVoice").Speak "You can disconnect the bleedin thing now">>%VBSScript% Call %VBSScript% del %VBSScript%
And if I'm trying something new that does not behave as I expected, both the batch file creating the vbs and the vbs itself are decently laid out and can readily be debugged.

Your only significant difference would be that your Call line would be something like
Call PowerShell.exe %PSScript%
to avoid merely displaying the PS1 in a Notepad window.



All the best,
Denis
 
Last edited:

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3447
I'm not even gonna attempt to assist here coz i have no idea what's going on but I'm quite curious to see how it finally turns out and works 😁
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 22631.3374
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo
    CPU
    Intel Celeron N4000 @ 1.10GHz Gemini Lake 14nm
    Motherboard
    LENOVO LNVNB161216 (U3E1)
    Memory
    8GB Ram
    Graphics Card(s)
    Intel UHD Graphics 600 (Lenovo)
    Sound Card
    Realtek High Definition Audio Intel Display Audio
    Monitor(s) Displays
    Generic PnP Monitor (1920x1080@60Hz)
    Screen Resolution
    1920x1080
    Hard Drives
    512GB Western Digital WDC PC SN530 SDBPMPZ-512G-1101 (Unknown (SSD))
    Keyboard
    Laptop Keyboard
    Mouse
    G5 Gaming Mouse
    Internet Speed
    50mbps/50mbps
    Browser
    Chrome/Edge
    Antivirus
    Microsoft Defender
  • Operating System
    Windows 10 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo
    CPU
    Intel Celeron N4000 @ 1.10GHz Gemini Lake 14nm
    Motherboard
    LENOVO LNVNB161216 (U3E1)
    Memory
    8GB Ram
    Graphics card(s)
    Intel UHD Graphics 600 (Lenovo)
    Sound Card
    Realtek High Definition Audio Intel Display Audio
    Monitor(s) Displays
    Generic PnP Monitor (1920x1080@60Hz)
    Screen Resolution
    1920x1080
    Mouse
    G5 Gaming Mouse
    Keyboard
    Laptop Keyboard
    Internet Speed
    50mbps/50mbps
    Browser
    Chrome/Edge
    Antivirus
    Microsoft Defender
Another way to avoid long, difficult-to-debug one-liners yet stay within your preferred scripting method is to echo each conventionally-laid-out line {such as is illustrated by garlin above} to a ps1 file then run that file.

Indeed that works, but it's ugly, adds complication (writing and executing a temp file), is more work to maintain, and doesn't play well with code-highlighting editors.

As a long time batch file writer, and someone that resisted PowerShell for a long time, I can say it's worth making the change. With ChatGPT's help, converting to PowerShell is much easier than it used to be.
 

My Computer

System One

  • OS
    Windows 10/11
    Computer type
    Laptop
    Manufacturer/Model
    Acer
Thanks for all the advice. I still need to play with this, but in experimenting, I'm having more difficulties.

I want to run some of these commands in Windows PE. I have prepped Windows PE by adding powershell components into Windows PE. I can run Windows PE commands but get no output, not even an error message. For example, if I issue a "Get-Disk" I get no visible output at all.
 

My Computers

System One System Two

  • OS
    Win11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
Thanks for all the advice. I still need to play with this, but in experimenting, I'm having more difficulties.

I want to run some of these commands in Windows PE. I have prepped Windows PE by adding powershell components into Windows PE. I can run Windows PE commands but get no output, not even an error message. For example, if I issue a "Get-Disk" I get no visible output at all.
Was this the guide you followed?

 

My Computer

System One

  • OS
    Windows 10/11
    Computer type
    Laptop
    Manufacturer/Model
    Acer

My Computers

System One System Two

  • OS
    Win11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor

Latest Support Threads

Back
Top Bottom