locked
Import OS Powershell script giving error RRS feed

  • Question

  • Hi All,

    I am running the Powershell script which is the default script of MDT to import Operating System. This script is giving me error. in the following line.

    import-mdtoperatingsystem -path $DS_ID":\Operating Systems" -SourcePath $OS_SRC_DIR -DestinationFolder $OS_DS_DIR -Verbose

    "import-mdtoperatingsystem : Index (zero based) must be greater than or equal to zero and less than the size of the argument list."

    We are setting 
    Set–ExecutionPolicy Bypass

    Any help to solve this issue will be appreciated.

    Thanks,

    Sourav


    Born to Learn

    Monday, July 30, 2018 2:32 PM

All replies

  • Try changing -SourcePath to -SourceFile and point it directly to the .wim file.

    LawsonT

    Monday, July 30, 2018 3:35 PM
  • The command line looks solid. Does your media include a WIM file or an ESD file? 

    Cheers,
    Anton

    Vacuum Breather Blog | Wing Commander Saga | Twitter

    Note: Posts are provided "AS IS" without warranty of any kind. If posts are helpful please don't forget to rate them as "Helpful" or as "Answer".

    Wednesday, August 1, 2018 6:49 AM
  • Hi Anoton,

    We have iso of Windows 10 OS and we have extracted it and pointing to that folder.

    Thanks,

    Sourav


    Born to Learn

    Friday, August 3, 2018 8:22 AM
  • Please check under sources if you have an install.wim or install.esd

    Cheers,
    Anton

    Vacuum Breather Blog | Wing Commander Saga | Twitter

    Note: Posts are provided "AS IS" without warranty of any kind. If posts are helpful please don't forget to rate them as "Helpful" or as "Answer".

    Friday, August 3, 2018 8:24 AM