none
MDT 2013u1 - Deployment Workbench - Powershell is Required RRS feed

  • Question

  • Hello all, 

    I have MDT 2013 update 1 installed on a Windows server 2012 R2 box and everything has been running flawless for about 8 months now.  Last weekend I installed Microsoft updates on the machine and after rebooting I can't get the Deployment Workbench to open.  When I attempt to open it, I get the following error.

    "Powershell is required to use the Deployment Workbench. Please install PowerShell then relaunch Deployment Workbench."

    • I've uninstalled all of the updates one by one, but that did not resolve the issue.
    • I have verified in Roles & Features that PowerShell is installed.
    • Followed the steps in this article: http://sccmguy.com/2012/04/25/mdt-2012-with-server-2012-powershell-initialization-error/

    None of the above fixed the issue.

    Any ideas?

    Thank you!


    Zak Lyles

    Thursday, September 3, 2015 9:51 PM

Answers

  • Thanks to Michael Niehaus for a timely response and easy resolution. Per his email response:

    It appears this file is corrupt: 

    C:\Users\username\AppData\Roaming\Microsoft\Microsoft Deployment Toolkit\user.config 

    The simplest answer is to delete it; it will be recreated.  But that will require that you reopen your deployment share(s); that’s the file that Workbench uses to figure out which need to be reopened the next time Workbench runs. 

    Thanks,

    -Michael

    Top notch support!


    Zak Lyles

    • Marked as answer by zak.lyles Saturday, September 5, 2015 5:38 PM
    Saturday, September 5, 2015 5:38 PM

All replies

  • That is definitely odd.  Can you download a copy of DebugView from https://technet.microsoft.com/en-us/library/bb896647.aspx and have it running when you start up Workbench?  That should capture any errors during the PowerShell initialization.  Feel free to save that debug log and attach it here or e-mail it to me and I'll check it out.


    Thanks,
    -Michael Niehaus
    Senior Product Marketing Manager, Windows Deployment
    http://blogs.technet.com/mniehaus
    mniehaus@microsoft.com

    Thursday, September 3, 2015 10:50 PM
  • Hi,


    Try to check if you have the latest ADK installed. If that also not working , then take the backup of deployment share and install all the setup again and check.


    Regards, Shishir Kushawaha "If this thread answered your question, please click on "Mark as Answer"

    Friday, September 4, 2015 9:42 AM
  • Edit: After reviewing the file and seeing it looked like something profile related, I logged in with a different account and the Deployment Workbench loads fine.  That said, I'll just share the output here, so everyone can see it.

    00000001 0.00000000 [3536] Main

    00000002 0.13918054 [3536] Exception when checking PowerShell: System.TypeInitializationException: The type initializer for 'Microsoft.BDD.Workbench.WorkbenchRunspace' threw an exception. ---> System.Management.Automation.CmdletInvocationException: Root element is missing. (C:\Users\username\AppData\Roaming\Microsoft\Microsoft Deployment Toolkit\user.config) ---> System.Configuration.ConfigurationErrorsException: Root element is missing. (C:\Users\username\AppData\Roaming\Microsoft\Microsoft Deployment Toolkit\user.config) ---> System.Xml.XmlException: Root element is missing.
    00000003 0.13918054 [3536]    at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
    00000004 0.13918054 [3536]    at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
    00000005 0.13918054 [3536]    at System.Configuration.XmlUtil..ctor(Stream stream, String name, Boolean readToFirstElement, ConfigurationSchemaErrors schemaErrors)
    00000006 0.13918054 [3536]    at System.Configuration.BaseConfigurationRecord.InitConfigFromFile()
    00000007 0.13918054 [3536]    --- End of inner exception stack trace ---
    00000008 0.13918054 [3536]    at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
    00000009 0.13918054 [3536]    at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
    00000010 0.13918054 [3536]    at System.Configuration.Configuration..ctor(String locationSubPath, Type typeConfigHost, Object[] hostInitConfigurationParams)
    00000011 0.13918054 [3536]    at System.Configuration.ClientConfigurationHost.OpenExeConfiguration(ConfigurationFileMap fileMap, Boolean isMachine, ConfigurationUserLevel userLevel, String exePath)
    00000012 0.13918054 [3536]    at System.Configuration.ConfigurationManager.OpenExeConfigurationImpl(ConfigurationFileMap fileMap, Boolean isMachine, ConfigurationUserLevel userLevel, String exePath, Boolean preLoad)
    00000013 0.13918054 [3536]    at System.Configuration.ConfigurationManager.OpenMappedExeConfiguration(ExeConfigurationFileMap fileMap, ConfigurationUserLevel userLevel)
    00000014 0.13918054 [3536]    at Microsoft.BDD.PSSnapIn.ProviderSettings..ctor()
    00000015 0.13918054 [3536]    at Microsoft.BDD.PSSnapIn.RestorePersistentDrive.ProcessRecord()
    00000016 0.13918054 [3536]    at System.Management.Automation.CommandProcessor.ProcessRecord()
    00000017 0.13918054 [3536]    --- End of inner exception stack trace ---
    00000018 0.13918054 [3536]    at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
    00000019 0.13918054 [3536]    at Microsoft.BDD.Workbench.WorkbenchRunspace.Reset()
    00000020 0.13918054 [3536]    at Microsoft.BDD.Workbench.WorkbenchRunspace..cctor()
    00000021 0.13918054 [3536]    --- End of inner exception stack trace ---
    00000022 0.13918054 [3536]    at Microsoft.BDD.Workbench.WorkbenchRunspace.Reset()
    00000023 0.13918054 [3536]    at Microsoft.BDD.Workbench.PropertySheetSnapIn.Initialize() 


    Zak Lyles



    • Edited by zak.lyles Friday, September 4, 2015 6:33 PM
    Friday, September 4, 2015 6:21 PM
  • Thanks to Michael Niehaus for a timely response and easy resolution. Per his email response:

    It appears this file is corrupt: 

    C:\Users\username\AppData\Roaming\Microsoft\Microsoft Deployment Toolkit\user.config 

    The simplest answer is to delete it; it will be recreated.  But that will require that you reopen your deployment share(s); that’s the file that Workbench uses to figure out which need to be reopened the next time Workbench runs. 

    Thanks,

    -Michael

    Top notch support!


    Zak Lyles

    • Marked as answer by zak.lyles Saturday, September 5, 2015 5:38 PM
    Saturday, September 5, 2015 5:38 PM
  • Hallo,

    ich habe ebenfalls das Problem mit MDT Vers. 6.3.8330.1000

    00000001    0.00000000    [4704] Main     
    00000002    0.59273499    [4704] Exception when checking PowerShell: System.TypeInitializationException: Der Typeninitialisierer für "Microsoft.BDD.Workbench.WorkbenchRunspace" hat eine Ausnahme verursacht. ---> System.Management.Automation.CmdletInvocationException: Fehler beim Laden der Datendatei des erweiterten Typs:     
    00000003    0.59273499    [4704] , C:\Program Files\Microsoft Deployment Toolkit\bin\Microsoft.BDD.PSSnapIn.Types.ps1xml: Die Datei wurde wegen folgender Validierungsausnahme übersprungen: Fehler bei der AuthorizationManager-Überprüfung..    
    00000004    0.59273499    [4704]  ---> System.Management.Automation.RuntimeException: Fehler beim Laden der Datendatei des erweiterten Typs:     
    00000005    0.59273499    [4704] , C:\Program Files\Microsoft Deployment Toolkit\bin\Microsoft.BDD.PSSnapIn.Types.ps1xml: Die Datei wurde wegen folgender Validierungsausnahme übersprungen: Fehler bei der AuthorizationManager-Überprüfung..    
    00000006    0.59273499    [4704]      
    00000007    0.59273499    [4704]    bei System.Management.Automation.Runspaces.InitialSessionState.ThrowTypeOrFormatErrors(String resourceString, String errorMsg, String errorId)     
    00000008    0.59273499    [4704]    bei System.Management.Automation.Runspaces.InitialSessionState.UpdateTypes(ExecutionContext context, Boolean updateOnly, Boolean preValidated)     
    00000009    0.59273499    [4704]    bei System.Management.Automation.Runspaces.InitialSessionState.Bind(ExecutionContext context, Boolean updateOnly, PSModuleInfo module, Boolean noClobber, Boolean local)     
    00000010    0.59273499    [4704]    bei System.Management.Automation.Runspaces.InitialSessionState.Bind(ExecutionContext context, Boolean updateOnly)     
    00000011    0.59273499    [4704]    bei Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadModuleManifest(String moduleManifestPath, ExternalScriptInfo scriptInfo, Hashtable data, Hashtable localizedData, ManifestProcessingFlags manifestProcessingFlags, Version version, Version requiredVersion, ImportModuleOptions& options, Boolean& containedErrors)     
    00000012    0.59273499    [4704]    --- Ende der internen Ausnahmestapelüberwachung ---     
    00000013    0.59273499    [4704]    bei System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)     
    00000014    0.59273499    [4704]    bei System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)     
    00000015    0.59273499    [4704]    bei System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)     
    00000016    0.59273499    [4704]    bei System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)     
    00000017    0.59273499    [4704]    bei System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)     
    00000018    0.59273499    [4704]    bei System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)     
    00000019    0.59273499    [4704]    bei System.Management.Automation.Runspaces.LocalRunspace.ProcessImportModule(String name, PSModuleInfo moduleInfoToLoad, Boolean startLifeCycleEventWritten)     
    00000020    0.59273499    [4704]    bei System.Management.Automation.Runspaces.LocalRunspace.ProcessImportModule(IEnumerable moduleList, Boolean startLifeCycleEventWritten)     
    00000021    0.59273499    [4704]    bei System.Management.Automation.Runspaces.LocalRunspace.DoOpenHelper()     
    00000022    0.59273499    [4704]    bei System.Management.Automation.Runspaces.RunspaceBase.CoreOpen(Boolean syncCall)     
    00000023    0.59273499    [4704]    bei Microsoft.BDD.Workbench.WorkbenchRunspace.Reset()     
    00000024    0.59273499    [4704]    bei Microsoft.BDD.Workbench.WorkbenchRunspace..cctor()     
    00000025    0.59273499    [4704]    --- Ende der internen Ausnahmestapelüberwachung ---     
    00000026    0.59273499    [4704]    bei Microsoft.BDD.Workbench.WorkbenchRunspace.Reset()     
    00000027    0.59273499    [4704]    bei Microsoft.BDD.Workbench.PropertySheetSnapIn.Initialize()

    Wie behebe ich diesen Fehler?

    C:\Users\username\AppData\Roaming\Microsoft\Microsoft Deployment Toolkit\user.config bereits gelöscht

    Danke für die Hilfe

    Liebe Grüße

    Marco

    Tuesday, March 7, 2017 12:40 PM
  • By chance are you setting a restrictive PowerShell execution policy via a GPO?  That could prevent MDT from running PowerShell "scripts" (really just series of commands).  Try removing that policy and setting a "bypass" or "unrestricted" execution policy.

    Thanks, -Michael Niehaus Director of Product Marketing, Windows Servicing, Deployment, and Store http://blogs.technet.com/mniehaus mniehaus@microsoft.com

    Tuesday, March 7, 2017 3:18 PM
  • FYI, I got this error today. I had installed the ADK and MDT to the F: drive. I uninstalled them and reinstalled them on the C: drive and the problem went away.

    Shane Curtis

    Wednesday, April 5, 2017 8:03 PM
  • Hi,

    FYI, I got this error today and the problem was caused by PowerShell Security GPO I updated. There are two value that caused the issue.

    -> The first is : $env:__PSLockdownPolicy, if you set it to 4 (ConstrainedLanguage), it fails. So leave it to 0.

    -> The second is : ExecutionPolicy set to "AllSigned". You have to set it to "Unrestricted".

    Hope it helps.

    Arnaud H.

    • Proposed as answer by arnaud.helin Thursday, May 4, 2017 8:59 AM
    Thursday, May 4, 2017 8:59 AM
  • I didn't have the path C:\Users\username\AppData\Roaming\Microsoft\Microsoft Deployment Toolkit\user.config

    I tried to uninstall and reinstall MDT. I was using ADK1607 and MDT 8443. Only thing I did that was different was to install MDT into a different drive. So instead of C I used E. After an uninstall and reinstall to the default C: drive everything working. Looked like something in the logs was referencing MMC in C.

    I also had this listed in my logs:

     System.Management.Automation.RuntimeException: The following error occurred while loading the extended type data file: , B:\Program Files\Microsoft Deployment Toolkit\bin\Microsoft.BDD.PSSnapIn.Types.ps1xml: The file was skipped because of the following validation exception: File B:\Program Files\Microsoft Deployment Toolkit\bin\Microsoft.BDD.PSSnapIn.Types.ps1xml cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies


    Dr. Chuck

    Friday, May 12, 2017 2:13 AM
  • DrChuck151,

    The line : "...cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies" => it means that your PowerShell execution policy is set to "Restricted". If you want to be sure you can verify by opening powershell as admin and type :

    Get-ExecutionPolicy

    To solve your issue, you have to open powershell as admin and type :

    Set-ExecutionPolicy Unrestricted

    If you have a CA in your company you can set it to AllSigned in the most of case by gpo for example) but with MDT you can't. You have to set "Unrestricted" mode on the MDT server.

    Hope it helps,


    Thursday, May 18, 2017 7:36 PM
  • For me it was the ExecutionPolicy who blocked me. It was set up to AllSigned.

    Ty

    Wednesday, January 24, 2018 10:48 AM
  • Simply run this Powershell script to solve the problem. (In the virtual machine testing environment) 

    Set-ExecutionPolicy RemoteSigned -Force

    Saturday, May 16, 2020 8:14 AM