How to create Windows 10 VM Template in SCVMM

A VM template is a master copy which we use to deploy multiple VM with our defined  base setup. Usually, creating VM template using System Center Virtual Machine Manager is pretty staraight forword however once it comes for Windows 10 then there is different scene- “SysPrep Failed” error. It comes everytime whenever I tried to create template in usual way.

VM.png

So I chose other way to create Windows 10 VM Template.

Steps:

  • Create a VM with Windows 10 OS.
  • Login into the VM once it gets created.
  • Ctrl+R and type ‘SysPrep’ and click on OK button.

VM1

Vm2

  • Execute sysprep.exe and select options as below screenshot.

Vm3

Vm4

  • Copy your VM vhdx file and paste in share folder of SCVMM. In my case its in ‘Win10-Default’.
  • Now Click on Library > Click on ‘Create VM template’.
  • Select first radio option and same VHDX file from copied location.
  • Click on Next button.

VM5.png

  • Provide VM Template name and click on Next button.

VM6.png

  • Now check the details in ‘Configure Hardware’ section. Its same as while creating VM we have given.

VM7

VM8

VM9

  • Make sure Differencing Disk checkbox is checked.

Vm10

VM11

  • Provide the details in Configure Operating System as given below screenshots

12.png

13

  • Provide Product Key

14.png

  • Provide Domain and Workgroup details.

15.png

That’s it. In last screen, click on Create button to complete your process.

Advertisements

PowerShell Get-ChildItem -Include, -Exclude, and -Recurse parameters

‘Get-ChildItem’ cmdlet gets you the contents of any given path and then you can perform your next desired actions on them.

In my case, I have to get into the particular folder and need to find out all exe and msi files to install in the system. Usually when we get into any folder there could be again child folders and folders, in this case we can use ‘-Recurse’ parameter with Get-ChildItem which basically helps to get into all child folder and gets you your desired output. ‘-Include’ and ‘-Exclude’ parameters name suggests what’s the use of these.

OK let’s see below script to get all msi and exe file from particular path and install the same on system-

$path = "D:\Softwares\MyPackage\ISOImage\Prerequisites\"
$IncludeExe = @("*.exe", "*.msi")
$ExcludeExe = @("SQL*", "SS*")
$foldercontents = Get-ChildItem -Path $path -File -include $IncludeExe -exclude $ExcludeExe -Recurse
if($foldercontents.Count -eq 0){exit}else{foreach ($exefile in $foldercontents){Start-Process $exefile /q -wait}}

How to integrate System Center Service Manager with Orchestrator

The Service Manager is used to give organizations a single, integrated platform to deliver IT as a Service (ITaaS). There are around six major components under System Center Service Manager and we are using Service Manager Console to integrate System Orchestrator to Service Manager.
To integrate System Center orchestrator to service manager, there are five major steps-

  1. Create Connector for SC Orchestrator
  2. Create Runbook Automation Activity Template
  3. Create Service Request Template
  4. Create Request Offering
  5. Create Service Offering

Create Connector in SC Orchestrator

  1. Open SC Service Manager as Administrator (It installed automatically with a Service Manager Management server)
  2. Click on Administrator > Connector.
  3. Click on Create connector > Orchestrator Connector

SM1

4. Provide connector name.

SM2

5. Provide Orchestrator Web Service URL.

SM3

6. Select the Orchestrator folder for sync.

SM4

7. Click on Create button.

SM5

Create Runbook Automation Activity Template

  1. Click on Library > Runbooks link in left pane (Before creating Runbook activity template please make sure connected Runbook is synced with Service Manager).

SM1

2. Click on Create Runbook Automation Activity Template link from right pane.

3. Provide template Name and Description.

SM2

4. Click on OK button.

5. Select “Is Ready For Automation” checkbox under General tab.

SM3

6. Go to Runbook tab and select desired runbook and verify the runbook parameters map with template.

SM4

7. Click on Apply button.

8. Click on OK button.

Create Service Request Template

  1. Click on Library > Templates link from left pane.
  2. Provide Template Name.
  3. Select Management pack.

SM1

4. Click on OK button.

5. Click on Activities tab.

SM2

SM3

6. Click on + green button.

7. Select Runbook Automation Activity template.

8. Click on OK button.

9. Click on Apply button.

Create Request Offering

  1. Click on Library.
  2. Select Service Catalog.
  3. Select Request Offering.
  4. Click on ‘Create Request Offering’ link from right pane.

SM1

5. Provide Request Offering Title.

6. Select Service Request Template Name.

SM2

7. Click on Next button.

8. Provide User Prompts, Response Type, and Prompt Type.

SM3

9. Click on Next button.

SM4

10. Click on Next button.

SM5

11. In Map Prompts tab, Select Runbook Automation Activity option and map the prompts.

12. Click on Next button.

SM6

13. In Publish tab, select ‘Published’ option in ‘Offering status’ select field.

14. Click on Next button.

Create Service Offering

  1. Click on Library tab from left pane.
  2. Select Service Offering label from left pane.
  3. Click on Create Service Offering link from right pane.

SM1

4. Provide service title and click on Next button.

5. Go to Request Offering tab.

SM2

6. Click on Add button.

7. Select created Request Offering.

SM3

8. Click on Add button.

9. Click on OK button and come out.

SM4

10. From Publish tab, Select Published option in Offering status select field.

11. Click on Next button.

SM5

12. Now click on Create button to publish the offering.

Alright we are set now. Now open Service Catalog URL and submit your request to automatically remove VM checkpoints.

SM1

SM2