MSEndpointMgr

Integrate DaRT Remote Viewer in ConfigMgr 2012 R2 console

Many of you have probably heard about integrating the DaRT Remote Viewer component into the Boot Images in ConfigMgr. This functionality enhances the way you can monitor Operating System Deployments when you have ConfigMgr integrated with MDT. In that scenario, you barely perform any work in the Deployment Workbench, so why should you have to open an extra console just to remotely connect to e.g. a failed deployment in order to troubleshoot?
In my daily work I try to streamline the work flows by working from a single pane of glass when possible. That means that you sometimes have to create your own extensions to the ConfigMgr console. That is exactly what I’ve done for DaRT Remote Viewer, a console extension that leverages the Monitoring functionality of MDT with DaRT components added in the Boot Image.

Download DaRT Remote Viewer console extension

I’ve made this console extension available on the TechNet Gallery, accessible from here.

Requirements

Before you can go ahead and install this console extension, there’s a few requirements that needs to be configured before hand:

  • Install MDT 2013 with Monitoring enabled on your Primary Site server
  • DaRT 8.1 from MDOP 2014 (or from MDOP 2013 R2)
  • Updated MDT Settings package with monitoring added to CustomSettings.ini
  • Create new MDT Boot Image with DaRT component

Johan Arwidmark has written an excellent blog post on how to configure all of this, that I recommend that you walk through before you continue. Once you’ve successfully set everything up according to Johan’s post, go ahead and follow the installation instructions below.

NOTE! This console extension has not been created to support remote ConfigMgr consoles, so you’d need to use it on your Primary Site server. This functionality may be added in the future.

Installation instructions

1. Extract the Start-DaRTRemoteViewer.zip to C:\Temp\DaRT on your Primary Site server.
2. Copy Start-DaRTRemoteViewer.ps1 from C:\Temp\DaRT to C:\Scripts.
3. Edit DaRT.xml in C:\Temp\DaRT on the line that starts with <Parameters> and replace the value for the following script parameters to reflect your environment:

  • DeploymentShare (should point to the DeploymentShare root directory)
  • DaRTRemoteViewer (should point to the DaRTRemoteViewer.exe)

Here’s an example row:

<Parameters>-windowstyle hidden -executionpolicy bypass -file "C:\Scripts\Start-DaRTRemoteViewer.ps1" -ComputerName ##SUB:Name## -DeploymentShare "D:\DeploymentShare" -DaRTRemoteViewer "D:\Microsoft DaRT\v8.1\DartRemoteViewer.exe"</Parameters>

4. Browse to <ConfigMgr console root directory>\XmlStorage\Extensions\Actions and create the following two folders:

  • 3fd01cd1-9e01-461e-92cd-94866b8d1f39
  • ed9dee86-eadd-4ac8-82a1-7234a4646e62

5. Copy DaRT.xml from C:\Temp\DaRT into both of the folders above.
6. Re-launch the ConfigMgr console.

Using the console extension

Now when you right-click on a Device in the ConfigMgr console, you’ll get an option to start DaRT Remote Viewer:
146_1
If there’s an active Operating System Deployment going on, you’ll see that DaRTRemoteViewer.exe launches connecting to the device:
146_2
If there’s no active Operating System Deployment going on, you’ll get a prompt that tells you that the script couldn’t find any deployments:
146_3
I hope you’ll find this console extension useful, and if you have any questions or suggestions on improving the script, write a comment below.

Nickolaj Andersen

Chief Technical Architect and Enterprise Mobility MVP since 2016. Nickolaj has been in the IT industry for the past 10 years specializing in Enterprise Mobility and Security, Windows devices and deployments including automation. Awarded as PowerShell Hero in 2015 by the community for his script and tools contributions. Creator of ConfigMgr Prerequisites Tool, ConfigMgr OSD FrontEnd, ConfigMgr WebService to name a few. Frequent speaker at conferences such as Microsoft Ignite, NIC Conference and IT/Dev Connections including nordic user groups.

19 comments

  • I have this working in Current Branch with DaRT 10. However, their is no device record during the MDT task sequence for the temporary MININT-XXXXXXX name. And after manually importing it with the MAC, the console extension still can’t connect.
    Is there some way to script the boot image or my Task Sequence to add the system being imaged to SCCM temporarily, in a particular collection for imaging in progress would be ideal?
    I can DaRT connect from MDT, just not the SCCM console extension.

  • Hi Nickolaj
    I’ve tried to get DaRT Remote Viewer integrated on SCCM 1602 (ADK 1511). I installed DaRT 10 x64 from MDOP 2015 but when running the Create MDT boot image wizard DaRT is not showing up on the componets step.
    I have done the same installation on a SCCM 2012R2 (ADK 8.1) and DaRT shows up on the boot image creation wizard.
    Do you know if there is any supportability issue with 1602?
    Thanks
    Nc

  • Hi there,
    Great work on this!
    Have you tested this with DaRT 10 and ConfigMgr 1511 or 1602?

  • Has there been any progress to whether this extension could be added to a Remote Console? We Remote to the Site Server as a ‘Desktop’
    Thanks

  • Hi Nickolaj,
    Yes, I have MDT 2013 64bit installed.
    Tested again copying your batch file method and get the same result.
    As mentioned earlier, I received the “ValidatePattern(“^(?:[\w]\:|\\)(\\[a-z_\-\s0-9\.]+)+\.(exe)$” <<<< ValidatePattern(“^(?:[\w]\:|\\)(\\[a-z_\-\s0-9\.]+)+\.(exe)$” <<<< " error, so I had removed that line from the .ps1 file which then produced the results i pasted above.
    I re downloaded it again from your updated link, and when calling it in a x64 powershell command, it gives me the ValidatePattern error again as per above.
    Are there any other prereq's that this would need? Version of powershell? dotnets?
    Thanks for your help,
    Rich

    • Hi Rich,
      No there’s no other prereqs for the script than listen in this post.
      Here’s a screenshot from when I’m running the script that’s available on TechNet Gallery:
      https://msendpointmgr.com/wp-content/uploads/2015/06/DaRT.jpg
      Send me an email with the following please:
      1. Download the script from TechNet and open an elevated 64-bit process of the PowerShell console, running the script with no modifications.
      2. Comment out the [ValidatePattern()] row, running the same command as above.
      Let’s take it offline, if you wish. You’ll find my email on the Contact page.
      Regards,
      Nickolaj

  • Hi Nickolaj,
    This looks great, but I’m having trouble getting it working.
    I can manually load DartRemoteViewer and type the connection info and remote into my Winpe machine.
    However, when I do the right click Dart etc, a cmd box quickly flashes up then disappears and that’s it.
    Dart.xml below and have confirmed these locations are correct. Any ideas?
    ContextMenu
    AdminUI.CollectionProperty.dll
    Microsoft.ConfigurationManagement.AdminConsole.CollectionProperty.Properties.Resources.resources
    AdminUI.UIResources.dll
    Microsoft.ConfigurationManagement.AdminConsole.UIResources.Properties.Resources.resources
    RemoteDesktopClient
    “C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe”
    -windowstyle hidden -executionpolicy bypass -file “C:\Scripts\Start-DaRTRemoteViewer.ps1” -ComputerName ##SUB:Name## -DeploymentShare “F:\SCCMMDT” -DaRTRemoteViewer “C:\Program Files\Microsoft DaRT\v8.1\DartRemoteViewer.exe”

    • Hi Rich,
      You should change System32 to SysNative in the path to PowerShell.exe, then it should work.
      Regards,
      Nickolaj

      • Hi Nickolaj,,
        Thanks for the reply. Tried this but unfortunatley still no joy.
        I’ve tried calling the ps1 file manually and I get the error:
        Parameter attributes need to be a constant or a script block.
        At C:\Scripts\Start-DaRTRemoteViewer.ps1:33 char:67
        + [ValidatePattern(“^(?:[\w]\:|\\)(\\[a-z_\-\s0-9\.]+)+\.(exe)$” <<<< )]
        + CategoryInfo : ParserError: (:) [], ParseException
        + FullyQualifiedErrorId : ParameterAttributeArgumentNeedsToBeConstantOrScr
        iptBlock
        If I remove that line from the ps1 script it gets further, but then complains about the sysnative and im not sure how to run in manually from there..
        This doesn't change anything calling it from the right click menu tho.
        Rich

      • Hi Rich,
        Sorry for the late reply, work is really taking much of my time lately.
        That’s strange, since I’ve validated that regex for local paths. What sort of path are you specifying for the parameter? Could you paste it here?
        If you run it manually, make sure that you’re running a 64-bit process of PowerShell.exe, otherwise it won’t work. What’s the version of your OS and PowerShell?
        Regards,
        Nickolaj

      • Hi Nickolaj,
        I’ve now tried this on two separate machines, and both exhibit the same thing. So there seems to be a flaw in the code somewhere.
        Rich

      • Hi Rich,
        When you say that you’ve tried on two separate machines, do you mean client machines? This tool is only meant for the ConfigMgr console being used on a Primary Site (or CAS for that matter), where the MDT integration has been enabled (meaning MDT 2013 is at least installed so that it can load the snap-in). Could you also provide me with any error message that you may be receiving?
        Regards,
        Nickolaj

      • Hi Nickolaj,
        To answer both your replies :)..
        I’ve tested on two separate Primary Site Servers (different domains) running Win Svr 2008 R2, SCCM 2012 R2 CU4, MDT 2013. Both exhibit exactly the same thing.
        If i follow your guide, when I right click a client in System Center, and select the Dart option, a blank, black powershell window will appear for 2-3secs and then disappear. And that’s it. No errors, no information, just that. If I then try it again, the powershell window will only appear very briefly, under a second and disappear.
        I have difficulties running it manually. I have a cmd batch file with the following:
        %SystemRoot%\sysnative\windowspowershell\v1.0\powershell.exe -ExecutionPolicy ByPass -file C:\scripts\Start-DaRTRemoteViewer.ps1 -ComputerName Computer1 -DeploymentShare “F:\SCCMMDT” -DartRemoteViewer “C:\Program Files\Microsoft DaRT\v8.1\DartRemoteViewer.exe”
        However this returns with “The System cannot find the path specified”. I assume this is the “sysnative” powershell it can’t find as the other paths are correct. If I swap sysnative for syswow64, then it gives the error saying to start powershell from sysnative!
        If I launch x64 Powershell, navigate to C:\Scripts and run .\Start-DaRTRemoteViewer.ps1, then it prompts for the three variables, compname, deploymentshare and remoteviewer location. Once I’ve provided these and press enter, it returns the below:
        C:\Scripts\Start-DaRTRemoteViewer.ps1 : Cannot validate argument on parameter ‘DaRTRemoteViewer’. You cannot call a method on a null-valued expression.
        At line:1 char:29
        + .\Start-DaRTRemoteViewer.ps1 <<<<
        + CategoryInfo : InvalidData: (:) [Start-DaRTRemoteViewer.ps1], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Start-DaRTRemoteViewer.ps1
        I've checked and double checked those paths, even security on those folders, and even moved the paths, but get the same result.
        Any ideas?
        Rich

      • Hi Rich,
        This is how my DaRT.xml looks like that’s working in my lab environment and on a customer that I’ve implemented the solution on:
        “C:\Windows\SysNative\WindowsPowerShell\v1.0\powershell.exe” -windowstyle hidden -executionpolicy bypass -file “C:\Scripts\Start-DaRTRemoteViewer.ps1” -ComputerName ##SUB:Name## -DeploymentShare “D:\DeploymentShare” -DaRTRemoteViewer “D:\Microsoft DaRT\v8.1\DartRemoteViewer.exe” Have you installed MDT 2013 64-bit?
        I’m not sure why your batch file is not working properly, to be honest. It seems to me that it should.
        When you’re launching the script with PowerShell.exe from SysWOW64, it spwans a 32-bit process which my script is determining to be invalid, since you should have MDT 2013 64-bit installed (no point in running 32-bit software when there’s a 64-bit software available).
        I’ve updated the file on the TechNet Gallery, could you please re-download it and see if you can run that successfull?
        https://gallery.technet.microsoft.com/DaRT-Remote-Viewer-console-0efd288e
        Regards,
        Nickolaj

Sponsors