none
Using a PowerShell script in a Task Sequence to replace system files. RRS feed

  • Question

  • Trying to execute a PowerShell command to replace some system files before first boot.

    I've added the PowerShell script in Postinstall, after the "Configure" step.

    This is the script I'm trying to fire off:

    # Windows 10 Custom User Images
    
    # Get the TS variables
    $tsenv = New-Object -COMObject Microsoft.SMS.TSEnvironment
    $ScriptRoot = $tsenv.Value("ScriptRoot")
    $OSDTargetSystemRoot =  $tsenv.Value("OSDTargetSystemRoot")
     
    # Remove default files
    Remove-Item "$OSDTargetSystemRoot\ProgramData\Microsoft\User Account Pictures\*.*" -Force
    
    # Copy custom files
    Copy-Item "$ScriptRoot\Default User Images\Win10\oemlogo.bmp" "$OSDTargetSystemRoot\Windows\System32"
    Copy-Item "$ScriptRoot\Default User Images\Win10\UserIcons\*.*" "$OSDTargetSystemRoot\ProgramData\Microsoft\User Account Pictures" -Force
    Copy-Item "$ScriptRoot\Default User Images\Win10\WindowsWeb\4K\Wallpaper\Windows\*.*" "$OSDTargetSystemRoot\Windows\Web\4K\Wallpaper\Windows" -Force
    Copy-Item "$ScriptRoot\Default User Images\Win10\WindowsWeb\Screen\*.*" "$OSDTargetSystemRoot\Windows\Web\Screen" -Force
    Copy-Item "$ScriptRoot\Default User Images\Win10\WindowsWeb\Wallpaper\Windows\*.*" "$OSDTargetSystemRoot\Windows\Web\Wallpaper\Windows" -Force

    It executes, but this is the error log I got back.

    Cannot find path 'ProgramData\Microsoft\User Account Pictures' because it does not exist.	TaskSequencePSHost	10/22/2015 9:22:17 PM	0 (0x0000)
    At \\WKPV1INFAA11.cbsh.com\DeployMaster$\Scripts\Default User Images\Win10\Set-DefaultImages_Win10.ps1:15 char:1
    + Remove-Item "$OSDTargetSystemRoot\ProgramData\Microsoft\User Account  ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	TaskSequencePSHost	10/22/2015 9:22:17 PM	0 (0x0000)
    ObjectNotFound: (ProgramData\Mic...ccount Pictures:String) [Remove-Item], ItemNotFoundException	TaskSequencePSHost	10/22/2015 9:22:17 PM	0 (0x0000)
    Cannot find path 'Microsoft.PowerShell.Core\FileSystem::Default User Images\Win10\oemlogo.bmp' because it does not exist.	TaskSequencePSHost	10/22/2015 9:22:17 PM	0 (0x0000)
    At \\WKPV1INFAA11.cbsh.com\DeployMaster$\Scripts\Default User Images\Win10\Set-DefaultImages_Win10.ps1:20 char:1
    + Copy-Item "$ScriptRoot\Default User Images\Win10\oemlogo.bmp" "$OSDTa ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	TaskSequencePSHost	10/22/2015 9:22:17 PM	0 (0x0000)
    ObjectNotFound: (Microsoft.Power...n10\oemlogo.bmp:String) [Copy-Item], ItemNotFoundException	TaskSequencePSHost	10/22/2015 9:22:17 PM	0 (0x0000)
    Cannot find path 'Default User Images\Win10\UserIcons' because it does not exist.	TaskSequencePSHost	10/22/2015 9:22:17 PM	0 (0x0000)
    At \\WKPV1INFAA11.cbsh.com\DeployMaster$\Scripts\Default User Images\Win10\Set-DefaultImages_Win10.ps1:21 char:1
    + Copy-Item "$ScriptRoot\Default User Images\Win10\UserIcons\*.*" "$OSD ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	TaskSequencePSHost	10/22/2015 9:22:17 PM	0 (0x0000)
    ObjectNotFound: (Default User Images\Win10\UserIcons:String) [Copy-Item], ItemNotFoundException	TaskSequencePSHost	10/22/2015 9:22:17 PM	0 (0x0000)
    Cannot find path 'Default User Images\Win10\WindowsWeb\4K\Wallpaper\Windows' because it does not exist.	TaskSequencePSHost	10/22/2015 9:22:17 PM	0 (0x0000)
    At \\WKPV1INFAA11.cbsh.com\DeployMaster$\Scripts\Default User Images\Win10\Set-DefaultImages_Win10.ps1:23 char:1
    + Copy-Item "$ScriptRoot\Default User Images\Win10\WindowsWeb\4K\Wallpa ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	TaskSequencePSHost	10/22/2015 9:22:17 PM	0 (0x0000)
    ObjectNotFound: (Default User Im...llpaper\Windows:String) [Copy-Item], ItemNotFoundException	TaskSequencePSHost	10/22/2015 9:22:17 PM	0 (0x0000)
    Cannot find path 'Default User Images\Win10\WindowsWeb\Screen' because it does not exist.	TaskSequencePSHost	10/22/2015 9:22:17 PM	0 (0x0000)
    At \\WKPV1INFAA11.cbsh.com\DeployMaster$\Scripts\Default User Images\Win10\Set-DefaultImages_Win10.ps1:24 char:1
    + Copy-Item "$ScriptRoot\Default User Images\Win10\WindowsWeb\Screen\*. ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	TaskSequencePSHost	10/22/2015 9:22:17 PM	0 (0x0000)
    ObjectNotFound: (Default User Im...ndowsWeb\Screen:String) [Copy-Item], ItemNotFoundException	TaskSequencePSHost	10/22/2015 9:22:17 PM	0 (0x0000)
    Cannot find path 'Default User Images\Win10\WindowsWeb\Wallpaper\Windows' because it does not exist.	TaskSequencePSHost	10/22/2015 9:22:17 PM	0 (0x0000)
    At \\WKPV1INFAA11.cbsh.com\DeployMaster$\Scripts\Default User Images\Win10\Set-DefaultImages_Win10.ps1:25 char:1
    + Copy-Item "$ScriptRoot\Default User Images\Win10\WindowsWeb\Wallpaper ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	TaskSequencePSHost	10/22/2015 9:22:17 PM	0 (0x0000)
    ObjectNotFound: (Default User Im...llpaper\Windows:String) [Copy-Item], ItemNotFoundException	TaskSequencePSHost	10/22/2015 9:22:17 PM	0 (0x0000)
    

    I'm not sure what to do.  I can't use drive letters to point to the files, because it seems to shift around (F: then E: etc).

    From what I'm reading this use of "$tsenv" should work "In Task" with the "Microsoft.SMS.TSEnvironment" COM Object loaded.

    http://blogs.technet.com/b/mniehaus/archive/2009/09/22/running-powershell-scripts-as-part-of-a-task-sequence.aspx

    Kind of hard to test outside of a Task Sequence.

    Anyone have an idea?


    There's no place like 127.0.0.1

    Thursday, October 22, 2015 10:15 PM

All replies

  • maybe try explicitly using $tsenv:ScriptRoot

    And I guess this does verify that you were able to get PS to install via adding DISM also :)


    Logs are very important. If you are unsure how to post logs or where to find them then reference https://keithga.wordpress.com/2014/10/24/video-mdt-2013-log-files-basics-bdd-log-and-smsts-log/ Also if you have made customizations please mention them when asking for help.

    Thursday, October 22, 2015 10:19 PM
    Moderator
  • maybe try explicitly using $tsenv:ScriptRoot

    And I guess this does verify that you were able to get PS to install via adding DISM also :)


    Logs are very important. If you are unsure how to post logs or where to find them then reference https://keithga.wordpress.com/2014/10/24/video-mdt-2013-log-files-basics-bdd-log-and-smsts-log/ Also if you have made customizations please mention them when asking for help.

    These changes made different errors! :D

    # Windows 10 Custom User Images
    
    # Get the TS variables
    $tsenv = New-Object -COMObject Microsoft.SMS.TSEnvironment
    $ScriptRoot = $tsenv.Value("ScriptRoot")
    $OSDTargetSystemRoot =  $tsenv.Value("OSDTargetSystemRoot")
    $logPath = $tsenv.Value("_SMSTSLogPath") 
    $logFile = "$logPath\$($myInvocation.MyCommand).log"
     
    # Remove Default Files
    Remove-Item "$tsenv:OSDTargetSystemRoot\ProgramData\Microsoft\User Account Pictures\*.*" -Force
    
    # Remove Default Files
    Copy-Item "$tsenv:ScriptRoot\Default User Images\Win10\oemlogo.bmp" "$tsenv:OSDTargetSystemRoot\Windows\System32"
    Copy-Item "$tsenv:ScriptRoot\Default User Images\Win10\UserIcons\*.*" "$tsenv:OSDTargetSystemRoot\ProgramData\Microsoft\User Account Pictures" -Force
    Copy-Item "$tsenv:ScriptRoot\Default User Images\Win10\WindowsWeb\4K\Wallpaper\Windows\*.*" "$tsenv:OSDTargetSystemRoot\Windows\Web\4K\Wallpaper\Windows" -Force
    Copy-Item "$tsenv:ScriptRoot\Default User Images\Win10\WindowsWeb\Screen\*.*" "$tsenv:OSDTargetSystemRoot\Windows\Web\Screen" -Force
    Copy-Item "$tsenv:ScriptRoot\Default User Images\Win10\WindowsWeb\Wallpaper\Windows\*.*" "$tsenv:OSDTargetSystemRoot\Windows\Web\Wallpaper\Windows" -Force

    Error Log

    Cannot find path 'ProgramData\Microsoft\User Account Pictures' because it does not exist.	TaskSequencePSHost	10/22/2015 10:30:03 PM	0 (0x0000)
    At \\WKPV1INFAA11.cbsh.com\DeployMaster$\Scripts\Default User Images\Win10\Set-DefaultImages_Win10.ps1:15 char:1
    + Remove-Item "$tsenv:OSDTargetSystemRoot\ProgramData\Microsoft\User Ac ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	TaskSequencePSHost	10/22/2015 10:30:03 PM	0 (0x0000)
    ObjectNotFound: (ProgramData\Mic...ccount Pictures:String) [Remove-Item], ItemNotFoundException	TaskSequencePSHost	10/22/2015 10:30:03 PM	0 (0x0000)
    Cannot find path 'Microsoft.PowerShell.Core\FileSystem::Default User Images\Win10\oemlogo.bmp' because it does not exist.	TaskSequencePSHost	10/22/2015 10:30:03 PM	0 (0x0000)
    At \\WKPV1INFAA11.cbsh.com\DeployMaster$\Scripts\Default User Images\Win10\Set-DefaultImages_Win10.ps1:20 char:1
    + Copy-Item "$tsenv:ScriptRoot\Default User Images\Win10\oemlogo.bmp" " ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	TaskSequencePSHost	10/22/2015 10:30:03 PM	0 (0x0000)
    ObjectNotFound: (Microsoft.Power...n10\oemlogo.bmp:String) [Copy-Item], ItemNotFoundException	TaskSequencePSHost	10/22/2015 10:30:03 PM	0 (0x0000)
    Cannot find path 'Default User Images\Win10\UserIcons' because it does not exist.	TaskSequencePSHost	10/22/2015 10:30:03 PM	0 (0x0000)
    At \\WKPV1INFAA11.cbsh.com\DeployMaster$\Scripts\Default User Images\Win10\Set-DefaultImages_Win10.ps1:21 char:1
    + Copy-Item "$tsenv:ScriptRoot\Default User Images\Win10\UserIcons\*.*" ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	TaskSequencePSHost	10/22/2015 10:30:03 PM	0 (0x0000)
    ObjectNotFound: (Default User Images\Win10\UserIcons:String) [Copy-Item], ItemNotFoundException	TaskSequencePSHost	10/22/2015 10:30:03 PM	0 (0x0000)
    Cannot find path 'Default User Images\Win10\WindowsWeb\4K\Wallpaper\Windows' because it does not exist.	TaskSequencePSHost	10/22/2015 10:30:03 PM	0 (0x0000)
    At \\WKPV1INFAA11.cbsh.com\DeployMaster$\Scripts\Default User Images\Win10\Set-DefaultImages_Win10.ps1:23 char:1
    + Copy-Item "$tsenv:ScriptRoot\Default User Images\Win10\WindowsWeb\4K\ ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	TaskSequencePSHost	10/22/2015 10:30:03 PM	0 (0x0000)
    ObjectNotFound: (Default User Im...llpaper\Windows:String) [Copy-Item], ItemNotFoundException	TaskSequencePSHost	10/22/2015 10:30:03 PM	0 (0x0000)
    Cannot find path 'Default User Images\Win10\WindowsWeb\Screen' because it does not exist.	TaskSequencePSHost	10/22/2015 10:30:03 PM	0 (0x0000)
    At \\WKPV1INFAA11.cbsh.com\DeployMaster$\Scripts\Default User Images\Win10\Set-DefaultImages_Win10.ps1:24 char:1
    + Copy-Item "$tsenv:ScriptRoot\Default User Images\Win10\WindowsWeb\Scr ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	TaskSequencePSHost	10/22/2015 10:30:03 PM	0 (0x0000)
    ObjectNotFound: (Default User Im...ndowsWeb\Screen:String) [Copy-Item], ItemNotFoundException	TaskSequencePSHost	10/22/2015 10:30:03 PM	0 (0x0000)
    Cannot find path 'Default User Images\Win10\WindowsWeb\Wallpaper\Windows' because it does not exist.	TaskSequencePSHost	10/22/2015 10:30:03 PM	0 (0x0000)
    At \\WKPV1INFAA11.cbsh.com\DeployMaster$\Scripts\Default User Images\Win10\Set-DefaultImages_Win10.ps1:25 char:1
    + Copy-Item "$tsenv:ScriptRoot\Default User Images\Win10\WindowsWeb\Wal ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	TaskSequencePSHost	10/22/2015 10:30:03 PM	0 (0x0000)
    ObjectNotFound: (Default User Im...llpaper\Windows:String) [Copy-Item], ItemNotFoundException	TaskSequencePSHost	10/22/2015 10:30:03 PM	0 (0x0000)


    There's no place like 127.0.0.1

    Thursday, October 22, 2015 10:44 PM
  • It doesn't look like any of the variables are getting set.

    It might be worthwhile to echo the variables out to a text file and see if they are valid.

    # Start the logging 
    Start-Transcript $logFile 
    
    # Write all the variables and their values 
    $tsenv.GetVariables() | % { Write-Host "$_ = $($tsenv.Value($_))" } 
    
    # Stop logging 
    Stop-Transcript
    
    Dumping task sequence variables



    Logs are very important. If you are unsure how to post logs or where to find them then reference https://keithga.wordpress.com/2014/10/24/video-mdt-2013-log-files-basics-bdd-log-and-smsts-log/ Also if you have made customizations please mention them when asking for help.


    Thursday, October 22, 2015 11:05 PM
    Moderator
  • Since the variables are not working, where should I path the logile?

    Thanks,

    -Matt


    There's no place like 127.0.0.1

    Friday, October 23, 2015 5:04 AM
  • Will this post help you any? http://deploymentresearch.com/Research/Post/318/Using-PowerShell-scripts-with-MDT-2013

    I use his method of a PowerShell wrapper.


    If this post is helpful please vote it as Helpful or click Mark for answer.

    Friday, October 23, 2015 4:36 PM
  • Will this post help you any? http://deploymentresearch.com/Research/Post/318/Using-PowerShell-scripts-with-MDT-2013

    I use his method of a PowerShell wrapper.


    If this post is helpful please vote it as Helpful or click Mark for answer.

    At the point this is being ran in the Task Sequence, there is no "C:" yet.  

    The only real difference I see is that your running your script from a Application CMD line.  I thought about running mine from a CMD line step, but would really like this to work from a native PowerShell step, or understand why it's not working.


    There's no place like 127.0.0.1

    Friday, October 23, 2015 4:52 PM
  • If there's no system drive (C:) yet, then how is your script supposed to remove the files from system root?

    If this post is helpful please vote it as Helpful or click Mark for answer.

    Friday, October 23, 2015 4:56 PM
  • There is a system drive, but it's not yet "C:"   Of the two times I've run DISKPART to find it, it was once E:, and the other time F: at that stage of deployment.  That's why OSDTargetSystemRoot is being used instead.

    -Matt


    There's no place like 127.0.0.1

    Friday, October 23, 2015 5:00 PM
  • So let's say the OS resides on E: at the time the script runs. Wouldn't OSDTargetSystemRoot be pointing to E:\Windows. Don't you want to use the OSDTargetSystemDrive variable for ProgramData? And when you use SystemRoot, drop Windows because that's already included in the path of system root.

    # Remove Default Files
    Copy-Item "$tsenv:ScriptRoot\Default User Images\Win10\oemlogo.bmp" "$tsenv:OSDTargetSystemRoot\System32"
    Copy-Item "$tsenv:ScriptRoot\Default User Images\Win10\UserIcons\*.*" "$tsenv:OSDTargetSystemDrive\ProgramData\Microsoft\User Account Pictures" -Force
    Copy-Item "$tsenv:ScriptRoot\Default User Images\Win10\WindowsWeb\4K\Wallpaper\Windows\*.*" "$tsenv:OSDTargetSystemRoot\Web\4K\Wallpaper\Windows" -Force
    Copy-Item "$tsenv:ScriptRoot\Default User Images\Win10\WindowsWeb\Screen\*.*" "$tsenv:OSDTargetSystemRoot\Web\Screen" -Force
    Copy-Item "$tsenv:ScriptRoot\Default User Images\Win10\WindowsWeb\Wallpaper\Windows\*.*" "$tsenv:OSDTargetSystemRoot\Web\Wallpaper\Windows" -Force


    If this post is helpful please vote it as Helpful or click Mark for answer.


    • Edited by Dan_Vega Friday, October 23, 2015 6:17 PM
    Friday, October 23, 2015 6:16 PM
  • Correct.  But as you can see from the errors logged above.  It's not working. :)

    There's no place like 127.0.0.1

    Friday, October 23, 2015 6:22 PM
  • This is a connect worthy bug.

    https://connect.microsoft.com/ConfigurationManagervnext/MicrosoftDeploymentToolkit


    Logs are very important. If you are unsure how to post logs or where to find them then reference https://keithga.wordpress.com/2014/10/24/video-mdt-2013-log-files-basics-bdd-log-and-smsts-log/ Also if you have made customizations please mention them when asking for help.

    Friday, October 23, 2015 6:30 PM
    Moderator
  • But you're using OSDTargetSystemRoot\Windows\System32, doesn't that = E:\Windows\Windows\System32

    Wouldn't OSDTargetSystemRoot\System32 = E:\Windows\System32


    If this post is helpful please vote it as Helpful or click Mark for answer.

    Friday, October 23, 2015 6:48 PM
  • But you're using OSDTargetSystemRoot\Windows\System32, doesn't that = E:\Windows\Windows\System32

    Wouldn't OSDTargetSystemRoot\System32 = E:\Windows\System32


    If this post is helpful please vote it as Helpful or click Mark for answer.

    Nice catch.

    Changing out with OSDTargetDrive or removing the extra .\Windows were applicable.  Trying again.

    Thanks,

    -Matt


    There's no place like 127.0.0.1

    Friday, October 23, 2015 7:39 PM
  • I should probably mention of threads I have seen here this strikes me as one of the more interesting.

    At What point does $OSDTargetDrive have a valid value?


    Logs are very important. If you are unsure how to post logs or where to find them then reference https://keithga.wordpress.com/2014/10/24/video-mdt-2013-log-files-basics-bdd-log-and-smsts-log/ Also if you have made customizations please mention them when asking for help.



    Friday, October 23, 2015 8:26 PM
    Moderator
  • But you're using OSDTargetSystemRoot\Windows\System32, doesn't that = E:\Windows\Windows\System32

    Wouldn't OSDTargetSystemRoot\System32 = E:\Windows\System32


    If this post is helpful please vote it as Helpful or click Mark for answer.

    Nice catch.

    Changing out with OSDTargetDrive or removing the extra .\Windows were applicable.  Trying again.

    Thanks,

    -Matt


    There's no place like 127.0.0.1

    Needed change, but didn't fix the problem.

    Script:

    # Windows 10 Custom User Images
    
    # Get the TS variables
    $tsenv = New-Object -COMObject Microsoft.SMS.TSEnvironment
    $ScriptRoot = $tsenv.Value("ScriptRoot")
    $OSDTargetSystemRoot =  $tsenv.Value("OSDTargetSystemRoot")
    $OSDTargetSystemDrive = $tsenv.Value("OSDTargetSystemDrive")
    $logPath = $tsenv.Value("_SMSTSLogPath") 
    $logFile = "$logPath\$($myInvocation.MyCommand).log"
    
    # Start the logging 
    Start-Transcript $logFile 
    
    # Write all the variables and their values 
    $tsenv.GetVariables() | % { Write-Host "$_ = $($tsenv.Value($_))" } 
     
    # Remove Default Files
    Remove-Item "$tsenv:OSDTargetDrive\ProgramData\Microsoft\User Account Pictures\*.*" -Force
    
    # Copy custom default files
    Copy-Item "$tsenv:ScriptRoot\Default User Images\Win10\oemlogo.bmp" "$tsenv:OSDTargetSystemRoot\System32"
    Copy-Item "$tsenv:ScriptRoot\Default User Images\Win10\UserIcons\*.*" "$tsenv:OSDTargetDrive\ProgramData\Microsoft\User Account Pictures" -Force
    Copy-Item "$tsenv:ScriptRoot\Default User Images\Win10\WindowsWeb\4K\Wallpaper\Windows\*.*" "$tsenv:OSDTargetSystemRoot\Web\4K\Wallpaper\Windows" -Force
    Copy-Item "$tsenv:ScriptRoot\Default User Images\Win10\WindowsWeb\Screen\*.*" "$tsenv:OSDTargetSystemRoot\Web\Screen" -Force
    Copy-Item "$tsenv:ScriptRoot\Default User Images\Win10\WindowsWeb\Wallpaper\Windows\*.*" "$tsenv:OSDTargetSystemRoot\Web\Wallpaper\Windows" -Force
    
    # Stop logging 
    Stop-Transcript

    Resut

    <?xml version="1.0"?>
    <Results><Errors>24</Errors><Warnings>0</Warnings><RetVal>0</RetVal><DeploymentType>NEWCOMPUTER</DeploymentType><Messages><![CDATA[Cannot find path 'ProgramData\Microsoft\User Account Pictures' because it does not exist.
    At \\DeployServer\DeployMaster$\Scripts\Default User Images\Win10\Set-DefaultImages_Win10.ps1:22 char:1
    + Remove-Item "$tsenv:OSDTargetDrive\ProgramData\Microsoft\User Account ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ObjectNotFound: (ProgramData\Mic...ccount Pictures:String) [Remove-Item], ItemNotFoundException
    Cannot find path 'Microsoft.PowerShell.Core\FileSystem::Default User Images\Win10\oemlogo.bmp' because it does not exist.
    At \\DeployServer\DeployMaster$\Scripts\Default User Images\Win10\Set-DefaultImages_Win10.ps1:27 char:1
    + Copy-Item "$tsenv:ScriptRoot\Default User Images\Win10\oemlogo.bmp" " ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ObjectNotFound: (Microsoft.Power...n10\oemlogo.bmp:String) [Copy-Item], ItemNotFoundException
    Cannot find path 'Default User Images\Win10\UserIcons' because it does not exist.
    At \\DeployServer\DeployMaster$\Scripts\Default User Images\Win10\Set-DefaultImages_Win10.ps1:28 char:1
    + Copy-Item "$tsenv:ScriptRoot\Default User Images\Win10\UserIcons\*.*" ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ObjectNotFound: (Default User Images\Win10\UserIcons:String) [Copy-Item], ItemNotFoundException
    Cannot find path 'Default User Images\Win10\WindowsWeb\4K\Wallpaper\Windows' because it does not exist.
    At \\DeployServer\DeployMaster$\Scripts\Default User Images\Win10\Set-DefaultImages_Win10.ps1:30 char:1
    + Copy-Item "$tsenv:ScriptRoot\Default User Images\Win10\WindowsWeb\4K\ ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ObjectNotFound: (Default User Im...llpaper\Windows:String) [Copy-Item], ItemNotFoundException
    Cannot find path 'Default User Images\Win10\WindowsWeb\Screen' because it does not exist.
    At \\DeployServer\DeployMaster$\Scripts\Default User Images\Win10\Set-DefaultImages_Win10.ps1:31 char:1
    + Copy-Item "$tsenv:ScriptRoot\Default User Images\Win10\WindowsWeb\Scr ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ObjectNotFound: (Default User Im...ndowsWeb\Screen:String) [Copy-Item], ItemNotFoundException
    Cannot find path 'Default User Images\Win10\WindowsWeb\Wallpaper\Windows' because it does not exist.
    At \\DeployServer\DeployMaster$\Scripts\Default User Images\Win10\Set-DefaultImages_Win10.ps1:32 char:1
    + Copy-Item "$tsenv:ScriptRoot\Default User Images\Win10\WindowsWeb\Wal ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ObjectNotFound: (Default User Im...llpaper\Windows:String) [Copy-Item], ItemNotFoundException
    Exception calling "SetBufferContents" with "2" argument(s): "The method or operation is not implemented."
    At line:9 char:1
    + $Host.UI.RawUI.SetBufferContents($rect, $space)
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    NotSpecified: (:) [], MethodInvocationException
    Exception calling "SetBufferContents" with "2" argument(s): "The method or operation is not implemented."
    At line:9 char:1
    + $Host.UI.RawUI.SetBufferContents($rect, $space)
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    NotSpecified: (:) [], MethodInvocationException]]></Messages></Results>
    


    There's no place like 127.0.0.1

    Friday, October 23, 2015 9:54 PM
  • This is a connect worthy bug.

    https://connect.microsoft.com/ConfigurationManagervnext/MicrosoftDeploymentToolkit


    Logs are very important. If you are unsure how to post logs or where to find them then reference https://keithga.wordpress.com/2014/10/24/video-mdt-2013-log-files-basics-bdd-log-and-smsts-log/ Also if you have made customizations please mention them when asking for help.

    Meaning I should submit it via Feedback, there?

    https://connect.microsoft.com/ConfigurationManagervnext/Feedback


    There's no place like 127.0.0.1

    Friday, October 23, 2015 9:56 PM
  • If we aren't able to get good values for $tsenv:whatever then yes.

    Logs are very important. If you are unsure how to post logs or where to find them then reference https://keithga.wordpress.com/2014/10/24/video-mdt-2013-log-files-basics-bdd-log-and-smsts-log/ Also if you have made customizations please mention them when asking for help.

    Friday, October 23, 2015 10:24 PM
    Moderator
  • If we aren't able to get good values for $tsenv:whatever then yes.

    Logs are very important. If you are unsure how to post logs or where to find them then reference https://keithga.wordpress.com/2014/10/24/video-mdt-2013-log-files-basics-bdd-log-and-smsts-log/ Also if you have made customizations please mention them when asking for help.

    Ok will do.  I'm going to trudge through the logs a bit more tonight first.

    The amount of powershell related issues I've found reported in the feedback section is incredible.


    There's no place like 127.0.0.1

    Friday, October 23, 2015 10:27 PM
  • Ok will do.  I'm going to trudge through the logs a bit more tonight first.

    The amount of powershell related issues I've found reported in the feedback section is incredible.


    There's no place like 127.0.0.1

    Thank you :)

    Logs are very important. If you are unsure how to post logs or where to find them then reference https://keithga.wordpress.com/2014/10/24/video-mdt-2013-log-files-basics-bdd-log-and-smsts-log/ Also if you have made customizations please mention them when asking for help.

    Friday, October 23, 2015 10:29 PM
    Moderator
  • Is it possible I'm running into a x86 / x64 PowerShell issue here?

    Probably should have mentioned it in my first post, but this is a x64 boot ISO on a UEFI VMware, loading Windows 10 x64 Pro.

    There's no place like 127.0.0.1

    Monday, October 26, 2015 3:40 PM