Quantcast
Channel: GARYTOWN ConfigMgr Blog
Viewing all articles
Browse latest Browse all 206

DaRT & VNC Remote during OSD without Integration

$
0
0

During our Windows migration, we did a lot of upgrades remotely, we wanted the ability to “watch” the progress, besides just watching the server reports.  I decided to look into using Dart Remote for this.  There were some great blogs out there, and I’ll reference them here. Much of what I have done has been borrowed form Alex Verboon – http://www.verboon.info/2013/04/integrating-dart-8-0-sp1-remote-connection-into-the-sccm-2012-osd-process/ 

After finding DaRT was limited to PE, I decided to also use VNC for the later steps in the TS, pulling much of the information from this Post:  Jeremy .. http://syswow.blogspot.com/2012/05/remote-control-during-sccm-osd-without.html

Highly recommend you look at those posts for additional information, as they describe some of the things in more detail.  Several of my steps are borrowed nearly directly from them… just updated slightly.

The way I’m proposing you do it, everything is contained in the package, no changes to the Boot Media or OS, and all the files get deleted automatically at the end of the TS Process.

Left Side = DaRT Remote Monitoring OSD Process (PE) – Right Side = Machine during OSD (VM)image

Left Side = VNC Remote Monitoring OSD Process (Windows) – Right Side = Machine during OSD (VM)

image

Requirements

  • Install Windows ADK – Using Windows 10 (July release – 10.0.26624)
  • Install MDOP DaRT (Example is 2015, DaRT 10, but have done with with DaRT 8.1 in past)
  • Windows 10 Media – I’m using July Release – Have available to mount for creating Dart file.
  • VNC – Assumes you have vncviewer.exe in c:\Program Files\VNC\vncviewer.exe
    • Download the ZIP file with required file here (ultravnc 1210 ALL bin zip 1.2.1.0)
  1. Once ADK & DaRT are installed, You will need to grab the Toolsx86.cab & Toolsx64.cab files located in: C:\Program Files\Microsoft DaRT\v10  – In this example, I’ll be building the x64 version, as we only use x64 boot media, but it should be easy to replicate this process for the x86 version.
  2. On your Source Server, create this Directory Structure: ..\DaRT10OSD\DaRTRemote\Windows\System32
  3. Extract the following files from the CAB File (note that I’m using the x64 version) and copy them to the System32 folder.
    1. FirewallExceptionChange.dll
    2. LockingHooks.dll
    3. mfc100u.dll
    4. MSDartCmn.dll
    5. msvcp100.dll
    6. msvcr100.dll
    7. RdpCore.dll
    8. rdpencom.dll
    9. RemoteRecovery.exe
    10. WaitForConnection.exe
  4. Extract the files from the VNC Download Uvnc_1210_bin.zip\win7\X64
    1. vncviewer.exe will need to be placed on here: c:\Program Files\VNC\vncviewer.exe on your IT machines that you wish to monitor from
    2. winvnc.exe copied to the ..\DaRT10OSD folder
    3. create StartVNC.cmd file that
      1. netsh advfirewall set currentprofile state off
      2. cmd.exe /c start winvnc.exe
    4. launch winvnc.exe on a test computer, it should prompt to set the settings for the server, set your password, I used OSD@dm1n for VNC Password & OSDV13w for ViewOnly – which will be referenced later on in another script.
      1. image
      2. copy the created UltraVNC.ini file you just created (same location as the winvnc.exe file) to the ..\DaRT10OSD folder
      3. image
        It show now look like that
  5. Download the StartRemoteRecovery.zip created by Alexey Semibratov, but modified by me HERE – Original File by Alexey HERE
    1. StartRemoteRecovery.wsf
    2. ZTIUtility.vbs
      1. StartRemoteRecovery.wsf has a lot of additional lines I’ve added to set the Link Name, and create a Link for VNC as well.
      2. Line 160 = VNC password you created earlier
      3. Line 147 = Path of your DartRemoteViewer, might need to be changed based on the version of DaRT you’re using.
  6. On some networks, not all ports are open, so we will set it to use static port 3388.  This information is stored in a file called DartConfig.dat, which is only generated using the DaRT Recovery Image wizard (PreReq) – So lets walk through that…
    1. Launch the MS DaRT Recovery Image Wizard – If you see this error, it’s because of your Powershell group policy, to get around this, open elevated command prompt and do this: 
      Reg delete HKLM\SOFTWARE\Policies\Microsoft\Windows\Powershell /v ExecutionPolicy /f
      More info HERE – Now try again
      image
    2. Choose 64-bit Dart Image – I’ve mounted the Windows 10 ISO to the E: drive
      image
    3. You can leave the tools to default
    4. Check the box “Allow…” and let it default to 3388
      image
    5. Advanced Options leave Default
    6. Make sure you check the box for Create WIM, optional Create ISO – If you wanted this for other reasons, and make sure you check Edit image
      image
    7. Now wait for a few minutes while it is generated
      image
    8. Click “Open in Windows Explorer”
      image
    9. Copy DartConfig.dat from Windows\System32 to your folder structure: ..\DaRT10OSD\DaRTRemote\Windows\System32
      image
    10. You should now have all the files you need in your system32 folder:
      image
  7. Now you need to create the DartRemote.cmd file that will launch DaRT remote in PE
  8. @echo off

    for /F “skip=2 tokens=2 delims=,” %%A in (‘wmic systemenclosure get serialnumber /FORMAT:csv’) do (set “serial=%%A”)
    set serial=%serial:~-15%

    XCOPY DaRTRemote X:\ /y /s
    CSCRIPT X:\Windows\System32\StartRemoteRecovery.wsf /ShortCutShare:<\\servername\share> /UserID:<username> /UserDomain:<domain> /UserPassword:<password>

  9. Now that you created this file, your root folder should look like:
    image

If you downloaded the ZIP file I Created, you will have everything you need already complete, except the files you’d need to copy over from the x64 DaRT cab (License issue) – Includes the winvnc.exe and ini files, along with scripts, just update the scripts for your environment.

Create your Package:
image

No Program needed
image

Lets add it to the TS
I’ve added it right before the HTA we use launches when someone manually starts image on a New PC, or during in place upgrade (refresh) right after it reboots to PE
image

Then run the VNC once Windows is up and running in your TS, after drivers applied, etc.
image

You will need to ad that step every time after you reboot the machine. (after applying updates, etc… if you want the vnc server to launch again)

Once you have this in your TS and you run your Image, it will populate the share you created:

image

Then as long as you have the Dart Tools installed, and the VNCviewer.exe in c:\Program Files\VNC, the links will work. (The shortcuts are auto populated with the passwords required)

Special Thanks to the two guys who blogged about these originally, Alex Verboon & Jeremy

There is a lot to this post, so if I forgot something, leave a comment so I can get it updated.


Viewing all articles
Browse latest Browse all 206

Trending Articles