Windows 10: PowerShell Scripting - Create USB Install Media for Windows 10  

Page 2 of 2 FirstFirst 12

  1. Posts : 14,248
    Windows 10 Pro
    Thread Starter
       25 Oct 2017 #10

    HippsieGypsie said: View Post
    Made my install thumb with your script provided in step 1 and followed the tutorial section to the tee. Before starting I quick formatted it with default settings. Ran the script and all went well, but it doesn't show up in FE and when I open Disk Management it asked to initialize it as seen below. Is that normal? If so, initialize it as GPT, yes?
    No, that is not correct. The USB flash drive should be partitioned, and all well and shown in Explorer and Disk Management with a drive ID letter. MBR or GPT is irrelevant but it should have been partitioned.

    Initialize it, GPT is OK and run the script again to test.

    I have to go out now, have a doc appointment. I'll check what's going on when back home.
    Last edited by Kari; 25 Oct 2017 at 02:56.
      My ComputerSystem Spec


  2. Posts : 38,043
    Dual boot Windows 10 FCU Pro x 64 & current Insider 10 Pro
       25 Oct 2017 #11

    @Kari

    Been attempting to get this to work without success for too long. Time to ask for help.

    Info: Performing this on my Asus tower in FCU with a SanDisk 8GB thumb using PS ISE Admin opening a saved script titled ďCreate Bootable ISO Thumb(.ps1)Ē which is stored on my secondary D: drive. Mounting ISOs made from WTC and UUPtoISO that are also stored on my D: drive mounting on virtual drive. Directing script to the correct virtual drive.

    Each time the script runs for less than a minute, hence my previous joke about java and shot. Iíll assume thatís not normal, for Iíve created ISO thumbs before using Rufus, which takes much longer.

    I actually ran the script more times using different scenarios, but here are the highlights.

    Run 1: I initialized the disk GPT as instructed above and ran the script > No go. The disk is then not seen in FE and not initialized upon opening Disk Management (DM) again.

    Run 2: I initialized as GPT and formatted this time. After running it did not de-initialized the disk, but still empty. I took shots of PS script running. Here are a few. one from early on and one from the end. Something is not correct there > Network path not found.

    Name:  PS Run 1_1.png
Views: 144
Size:  53.5 KB

    Name:  PS Run 1_2.png
Views: 141
Size:  50.1 KB

    Run 3: Reformatted as MBR and ran script. No go.

    Closed everything out and rebooted.

    Run 4: Iíve run some of your prior saved scripts from D: with success, so I donít think itís that, but instead of using my stored ďCreate Bootable ISO ThumbĒ, this time I copied and pasted the script directly into PS ISE. Didnít catch the first part, but this is seen throughout the latter part of the run. It has a little different results, but same error.

    Name:  PS Run 2_1.png
Views: 142
Size:  44.2 KB

    The thumb drive remains empty. Any clue as to why?
      My ComputersSystem Spec


  3. Posts : 14,248
    Windows 10 Pro
    Thread Starter
       25 Oct 2017 #12

    HippsieGypsie said: View Post
    The thumb drive remains empty. Any clue as to why?
    Logically thinking it can only be a defect USB drive, missing code caused by an error in Copy & Paste or permissions issue. The error messages in your first screenshot are all about path / file not found or existing when saving to USB.

    Do you have another USB drive to test?
      My ComputerSystem Spec


  4. Posts : 38,043
    Dual boot Windows 10 FCU Pro x 64 & current Insider 10 Pro
       25 Oct 2017 #13

    Kari said: View Post
    Logically thinking it can only be a defect USB drive, missing code caused by an error in Copy & Paste or permissions issue. The error messages in your first screenshot are all about path / file not found or existing when saving to USB.

    Do you have another USB drive to test?
    Ok. I see. Yes, I have another. Thanks, Kari.
      My ComputersSystem Spec


  5. Posts : 14,248
    Windows 10 Pro
    Thread Starter
       25 Oct 2017 #14

    HippsieGypsie said: View Post
    Ok. I see. Yes, I have another. Thanks, Kari.
    Copy & paste mistakes can be excluded, I think, because according to your error messages the errors occur in cmdlet Copy-Item $File.fullname ($USBDrive + $RelativePath) in line 184; I just checked and that cmdlet is line 184 in original code
      My ComputerSystem Spec


  6. Posts : 38,043
    Dual boot Windows 10 FCU Pro x 64 & current Insider 10 Pro
       25 Oct 2017 #15

    Yes, odds are that I could not error in that twice, for I C&Ped it once to save as ps1 file and then C&Ped again right into PS. It isn't the script. It's got to be the drive as you say.

    17025 has been released. My Asus Insider is almost finished updating and I'll get back to this. It's going quite fast. :)
      My ComputersSystem Spec


  7. Posts : 38,043
    Dual boot Windows 10 FCU Pro x 64 & current Insider 10 Pro
       26 Oct 2017 #16

    Finally got to this. Used another thumb and did indeed work with time for java and shot.

    Thing is, this is an older PNY 8GB thumb. I burn ISOs on the SanDisk thumb with Rufus all the time. Don't understand why SanDisk didn't work.

    Edit:

    Just burned my UUPtoISO 17025.1000 to the SanDisk to make sure the thumb is ok and to have it.

    Used PS with same 17025 to make another PNY thumb for my 2nd partition install. All went well.
    Last edited by Tony K; 26 Oct 2017 at 02:50.
      My ComputersSystem Spec


  8. Posts : 14,248
    Windows 10 Pro
    Thread Starter
       26 Oct 2017 #17

    HippsieGypsie said: View Post
    Finally got to this. Used another thumb and did indeed work with time for java and shot.

    Thing is, this is an older PNY 8GB thumb. I burn ISOs on the SanDisk thumb with Rufus all the time. Don't understand why SanDisk didn't work.
    Can't explain why that SanDisk drive works with Rufus but not from PowerShell script. Anyway, good to know you got it working.
      My ComputerSystem Spec


  9. Posts : 38,043
    Dual boot Windows 10 FCU Pro x 64 & current Insider 10 Pro
       26 Oct 2017 #18

    Kari said: View Post
    Can't explain why that SanDisk drive works with Rufus but not from PowerShell script.
    I swear there's a wormhole somewhere in computer tech that we just can't see. Like quantum physics, the most brilliant in the field don't fully understands it.

    Anyway, good to know you got it working.
    No, my friend. Good to know you got it working with your direction. Thanks. One thing I know is that doing something over and over again getting the same ill results is true insanity.
      My ComputersSystem Spec


 
Page 2 of 2 FirstFirst 12

Tutorial Categories

PowerShell Scripting - Create USB Install Media for Windows 10 Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Xbox Windows Phone


Related Threads
A few weeks after release of Windows 10 version 1703 (Creators Update), Microsoft in April 2017 officially announced that Windows in the future will get biannual feature upgrades: Read more: Windows and Office align feature release schedules...
Installing Windows 10 is done in three phases: Boot from install media, run Windows Setup Configure hardware devices Windows Welcome (OOBE) In normal install, user interaction is required in phases 1 and 3, phase 2 being run automatically...
One of many PowerShell security features is that you can't run a script simply by double clicking it's icon on desktop or in a folder. Doing so will by default open script in Notepad for editing instead. You can right click script and select Run...
General Tips PowerShell Scripting - The Basics in Tutorials
A PowerShell script is a collection of commands and cmdlets to be run in logical order, previous lines in script determining values and variables in command lines thereafter. The principle is the same than in Command Prompt batch files (.bat or...
Hi all. I'm trying to use powershell to create a complex storage space on my 4x6TB HD. I want to make the first 4TB of each HD in simple pool and the remaining space 2TB with Mirror 2way. 4x4TB Simple 4x2TB Mirror 2Way This way should be...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 06:02.
Find Us