Sunday, 31 May 2020

Deploying Packages in Intune with a Task Sequence part 2



Continued - Deploying packages in Intune with a Task Sequence
The next step is to create a virtual disk and populate it with the source files inside of the of the TSInTunebridge.iso file created above.  For convenience we will create the VHD file without any files (empty).  We will call this Empty.vhd.  We will copy this and call the copied file Populated.vhd.



Note: The developed solution will infact required two virtual hard disks – one for the GPT partition style and one for the MBR partition style
Step
Display
On the Resource Server open diskmgmt.msc.  Click on the appropriate Disk (In our case it is Disk 0).  To avoid confusion click on the grey area where the curor is position on the screen shot to the right.

Click on Action and the Create VHD.  Set  the format to VHD and the size to 1GB.  Click on Browse to save the file as c:\buildtools\Empty.vhd.
Click on OK


The virtual disk is created.




Click under the Disk where type is Unknown.  Click on Action\All Tasks\Initialise Disk

Select the correct disk number and select either MBR or GPT


Note:  For testing we will use MBR however the developed solution will need to create two disks – one for MBR and one for GPT

Click on OK.  Right Click on the Unallocated disk and select New Simple Volume

The New Volume Wizard appears. Click on Next

Click on Next again

Click on Do Not assign a drive letter or drive path and click on Next

Accept default options and change Volume Label if desired.  Click on Next
Click on OK to complete – the virtual disk is now ready




Right Click below below the Disk 1 and select Change Drive Letter and Paths
Click on Add and select Detach Virtual Hard Disk. Click on OK to detach
Copy c:\buildtools\empty.vhd to c:\buildtools\populatedVHD
Rename empty.vhd to populated.vhd

Note: The purpose of this is to avoid having to recreated a new vhd file whenever we change a task sequence.  We delete to populated vhd and copy the empy vhd back into the populatedvhd directory and rename to populated.vhd
Double click on populated.vhd file to mount the virtual disk
Doubleclick on c:\buildtools\standaloneiso\TSIntunebridge.iso to mount the SCCM Stand-alone task sequence media
Copy the files and folders of the standalonetsintunebridge.iso to the virtual hard disk, which was renamed as populated.vhd

Once this is completed unmount all virtual disks by right clicking and selecting eject
On your test device create the following directory c:\buildtools\vhdpopulated
From your resource server copy c:\buildtools\Populated\populated.vhd to c:\buildtools\vhdpoplated on your test client.




Mount virtual disk on the test device


Step
Display
Log into your test device and navigate to  c:\buildtools\vhdpopulated.  Double clik on populated.vhd to mount the virtual hard disk.  Ensure that the d: drive letter has been applied – if not then go into diskmgmt and modify it so that the virtual is your d: driver


Note:  All this will be automated in the completed solution.


 Configure Intune to launch the Stand-Alone TS


In this section we create the required objects in Intune to enable an SCCM task sequence to be deployed to the test machine.





Step
Display
On the resource server create the following folder c:\buildtools\launcher.  Create the following batch file:
launchMedia2.cmd.  Add the following line to the batch file

Using the Win32 packaging tool Create the .intunewin file containing the launchmedia2.cmd file – this was created in the step above.  Name the .intunewin file as launchmedia2.intunewim

Create a win32 Package named Launch the SCCM Stand Task Sequence
Configure as displayed



App package file:
App package file: launchmedia2.intunewin

App information:Configure

App Information: Program

App Information: Requirements

App information: detection rules

Create a Group in Intune called Launch the SCCM StandAlone TS.  Add the test user to this group.



Create an assignment for the SCCM Stand Alone Lauch app

IMPORTANT:  Make this assignment Available and not Required – all TS deployments are high risk deployments


Checklist and Test

When the solution is ready for testing make sure the following items are completed

1)    If a VM take a snapshot
2)    Ensure that the VHD disk is connected and assigned the letter d:
3)    Ensure that the latest Updates are applied
4)    Ensure that the SCCMTSClient folder with the SCCM client files are copied to the root of the system drive
5)    Ensure that the test user is in the correct Intune group
6)    Ensure that the SCCM and DC servers are not available – since we are testing a process without an available on premise systems management tool
7)    Check that no SCCM client exists (In control panel)
8)    Check that test device has 1809 build or above


1.8.1                   Task Sequence Initiate

Open the Company Portal and select the Launch the SCCM StandAlone TS App



Step
Display
Launching from the Company Portal

Stand Alone wizard fires up. Click Next

Confirmation Wizard appears.  Click Next

Dependency check takes place

SCCM client installs

The TS fires up and build completes

Notice the statestore directory for the USMT backup


The Edit Plus package installs



USMT data backup file created




No comments:

Post a Comment

Deploy Windows 11 with MDT - Supported

 Introduction The Microsoft Deployment Toolkit (MDT)  has been used by many companies for the provisioning of operating systems.  It does ha...