Showing posts with label MDT 2012. Show all posts
Showing posts with label MDT 2012. Show all posts

Tuesday, August 27, 2013

MDX sources

Dear reader, since my last posts i informed you about MDX and its workings.
in this post i proudly present the MDX sources.
In the link at the bottom of this post an .MSI can be found that will install MDX on a system. the .MSI will install the MDX script, the readme and the manual
The installation has been tested on Windows Server 2003 and Server 2008 R2. here is the readme:

Welcome to MDX
This application is written in PowerShell, to successfully start it you need to have powershell (version 2.0 and up) installed on the machine you're installing to
At first launch your settings will not reflect the settings of your deployment environment. please take your time to set the settings of MDX. refer to the manual for detailed information and usage of MDX and its settings.
On PowerShell 2.0 some parts of MDX will not work; for instance the MDT Settings Extra Apps will not show when using PowerShell 2.0.
To get things started PowerShell needs to have its execution policy set to remotesigned or lower because this script is NOT signed. please refer to http://technet.microsoft.com/en-us/library/ee176961.aspx for more information about PowerShell signing
MDX will be installed to C:\Program Files\MDX by default, feel free to change that is you want to but always check its working after this.
MDX works with a few tools locally to get fully started. in the installation MSI some of these files are incorporated, they will be installed to its default locations. the extra files are:
    - MDXIcoon1.jpg
    - Manual MDX.docx
    - Readme.txt
PsExec from the PStools must be installed on the system, preferably on a path location from your SET.
link: http://technet.microsoft.com/en-us/sysinternals/bb896649.aspx

The MDTDB from Michael Niehaus also is a MUST, the installation points to the C:\Windows\System32\WindowsPowerShell\v1.0\Modules\MDTDB directory so you can best copy the module to that path.here is the link to Michaels blog:
http://blogs.technet.com/b/mniehaus/archive/2009/05/15/manipulating-the-microsoft-deployment-toolkit-database-using-powershell.aspx
MDX’s registry entries are set in the installation of the MSI, they can be changed in the settings tab of MDX.
MDX will connect to machines through WMI, for this mechanism to work in Windows Firewall enabled machines the following rule must be enabled in the network location profile
   
    - Windows Management Instrumentation (DCOM-In)
    - Windows Management Instrumentation (WMI-In)

Also MDX will try to ping machines; for this to work the following rule must be enabled on firewalled machines:
    - File and Printer Sharing (Echo Request - ICMPv4-In) (when using IPv4 traffic
    - File and Printer Sharing (Echo Request - ICMPv6-In) (when using IPv6 traffic

Last but not least: for the remote starting via PSExec the - Remote Desktop - User-In must be opened.
PsExec itself will require a litetouch user account that has to me member of the AD group "Remote Desktop Users"
For Wake on LAN to work the used Network segments must not prohibit WOL broadcasts. please do keep in mind WOL broadcasts cannot traverse Routers, so one MDT server can only service as much network segments it is connected to.
PXE control will only work under specific conditions. please refer to link: http://www.ithastobecool.com/2009/08/17/zerotouch-for-mdt-2010-without-sccm/
to get a clear understanding of this subject.
Happy deploy-ing
Bas Huygen
negyuh@xs4all.nl

I hereby would like to thank the following technical documents and its writers:
Furthermore i would like to thank the following Colleagues for support and testing:
  • Barry Mes
  • Ylber Tahiri

Download the MDX installers here:
  - x86: https://skydrive.live.com/redir?resid=12B72EEE2C1F9871!2587
   -x64: https://skydrive.live.com/redir?resid=12B72EEE2C1F9871!2588
Please note! this installer nor the PowerShell script has been signed; Smart screen filters will warn you about that fact! 
I am still working on a valid certificate…
The MDX manual can also be downloaded separately: https://skydrive.live.com/redir?resid=12B72EEE2C1F9871!2589
I fully understand that this is the first version, feel free to download this installer and use it, when you will find a bug or think MDX should definitely use a new feature; feel free to contact me at:
mdx@xs4all.nl
Happy deploying and till next time.



Saturday, August 24, 2013

MDX technical design

Hi folks, as promised i present the next part of my MDX posts. This time i will elaborate on the technical part of MDX as well as give you, the reader, a view of how  OS deployments are done; the MDX way.

MDX design; technical facts

MDX is build in PowerShell, the GUI is designed in SAPIEN’s Primal Forms Community Edition and the application is programmed in Microsoft’s own PowerShell ISA. the script counts around 3000 lines of code of which roughly 2000 lines are accounted for by the GUI. the script is divided in 15 Functions and 6 sections.

The general idea of the applications is: unification and simplification of MDT and accompanying tools to an end-to-end deployment solution.

mdx opbouw

Architecture

MDX is designed around the functionality of a few components:

Here is the graphical representation of the design

Architecture MDX

MDX has a few sections that do the work. each section does a part of the total solution; for example there is a section in MDX that accepts input from the GUI checks its validity and, if verified, adds or modifies a corresponding computer item in MDT- in its database. another section does communicate with PzExec.exe and adds the needed variables to the tools to get a deployment started.

How does MDT accomplish end-to-end automated deployment?

The ‘secret’ of MDX is the way all under laying components are ‘orchestrated’ to make a ‘deployment symphony’ …. the way MDX does this is as follows:

  • MDX controls the MDT database (which is crucial for end-to-end automated deployments) via PowerShell
  • MDX takes variables from the UI and combines it with preconfigured components in MDT and other used tools
  • MDX manipulates a computer object from the MDT database in such a way that it is deployment ready
  • MDX adds ‘non standard’ items or features to the preconfigured building blocks like: for example: add a few applications to the deployment of a certain computer and adds a user account as local administrator to the same deployment as well
  • MDX controls the WDS PXE server and thus controls who may- and may not boot to PXE and do a deployment via the network
  • MDX can directly fire a preconfigured computer to do a deployment.

What is to be expected from doing deployments with MDX

Apart from the fact that MDX takes away the direct interaction with MDT, MDX will give the User direct control over all building blocks of the deployment chain from a single GUI. the user can start off with a computer name, check the settings and modify them and fire of the deployment to the machine.

One important thing to realize is: MDX will help the user to select ALL settings and set them without the possibility of human error (like typing). MDX eases these tasks by presenting a simple but effective UI that will help de user select those things needed MUCH faster AND easier than when he- or she would do manually in MDT itself. as a bonus it eases the management of tools like WDS or the start of MDT deployment in the traditional way.

The next post will present a real world example of deployment with MDX. till next time.

Thursday, August 22, 2013

Introducing MDX

The last weeks is have not published anything since i was working on an IT solution i am introducing here on this page.
The next posts i will elaborate and present the code of my application, this is part 1: the introduction:
MDX stands for MDT Deployment eXerience. and it is a solution targeted at Microsoft OS deployment with MDT. So you can ask me; what does it do and, even more important, what does it add to MDT since that is quite a mature OSD solution in itself. my answer will be: MDT indeed is a very great OSD solution but it has its drawbacks. let me mention a few of them:
  • The interface of MDT is quite cumbersome in respect to manipulating individual computer deployments.
  • MDT does not have any functionality to automatically start a deployment on a client
  • MDT needs ‘start-up media’ to get a deployment running like a CD or USB stick, although MDT can deliver a distribution via the network, it does not have any mechanism to control PXE servers
Because of these (and many more) drawbacks i decided to develop my own ‘shell’ around MDT and address these items.

So what does MDX do?

since i always think images speak louder then words I'll show you the interface.

As you can see the Application has its own GUI, in it there are a few input sections-, output sections and some buttons to get the whole thing running. MDX was built in PowerShell, the code for the GUI was generated by SAPIEN’s Primal Forms Community edition
MDX can do the following:
  • On input of a computer name it will try to fetch a MAC address of the particular machine, if found it will use it to add- or find this machine in MDT and attach OSD properties to it to get it deployed
  • MDX will show Computer information when the machine is online; this can be quite handy when you are to be migrating existing computers from say Windows XP to Windows 7 or 8
  • MDX has a direct link with Microsoft's WDS servers, with this link it can control PXE boots of WDS clients
  • MDX can wake a machine with Wake On LAN with one push on a button
  • MDX can start a deployment remotely with the use of PS Exec.exe (a fine piece of toolkit developed by Mark Russinovich), with this it can completely automate MDT deployments to clients.
  • MDX can add extra applications to a individual OS deployment- as well ass add an account to the local administrators group.
Al together i think it will add some nice features to MDT or as a colleague remarked “this is real automation with budget (freeware) tools!”
Next post i will elaborate on the technical workings of MDX, if all goes well i will present a download link to the source code.
till next time.

Wednesday, March 20, 2013

Getting started with Michael Niehaus’s MDT module

Michael Niehaus published his MDT PowerShell Database module on May 15, 2009.
URL: http://blogs.technet.com/b/mniehaus/archive/2009/05/15/manipulating-the-microsoft-deployment-toolkit-database-using-powershell.aspx
this plugin is an extension to the standard MDT plugins and modules. it is targeted to the MDT database opposite most other MDT plugin’s that are mainly created to help you to modify the deployment share and its contents.
Unfortunately Michaels own blog is not very helpful in the application of the module so in this post i would like to help you to get started.


Organization of the Functions

The plugins are grouped into 5 units: new- ,set- ,get- ,clear- and remove -MDT*
All create-able and settable MDT items are handled generally in the same way:
  1. retrieve the Object ID
  2. set the Object with the option: –settings
the –settings property's are set individually like –settings (OSInstall=”Yes”) or with a hash table like –settings @(objectitem1=”text”;objectitem2=”text”;objectitem3=”text”}
The settings that can be used in the hash table are published on my blog on URL: http://negyuhsit.blogspot.nl/2013/03/mdt-computer-object-property-details.html
Each function group has the same kind of commands. let’s look at them right now.


New-MDT functions

The New-MDT*  group is the first group of all functions in this module. these functions are for the single purpose of the creation of MDT Objects
CommandType Name
----------- ----
Function New-MDTComputer
Function New-MDTLocation
Function New-MDTMakeModel
Function New-MDTPackageMapping
Function New-MDTRole
Syntax of New-MDTComputer: New-MDTComputer identifier –description OSDComputerName –settings @(objectitem1=”text”;objectitem2=”text”;objectitem3=”text”}

the identifier variable deserves some extra clarification: as identifier of a MDT object the following items can be used; at least one of them has to be defined:

-assetTag           uses the assetTag as identifier                     example:  E123456
-macAddress     uses the MAC address as identifier             example:  00:12:34:56:78
-serialNumber  uses the serialnumber of the machine          example:  12345678
-UUID              uses the UUID as identifier                          example: 329800735698586629295641978511506172918 (more information about UUID’s can be found on this link)

Syntax of New-MDTLocation:  New-MDTLocation –name LocationName –gateways IPADDRESSGW1,IPADDRESSGW2 –settings @(objectitem1=”text”;objectitem2=”text”;objectitem3=”text”}

Syntax of New-MDTMakeModel: New-MDTMakeModel –make Makename (example: HP, Dell) –model ModelName settings @(objectitem1=”text”;objectitem2=”text”;objectitem3=”text”}

Syntax of New-MDTPackageMapping: New-MDTPackageMapping –ARPName –package used to create mapping to packages on external systems like SCCM

Syntax of New-MDTRole: New-MDTRole –name RoleName settings @(objectitem1=”text”;objectitem2=”text”;objectitem3=”text”}


Set-MDT* and Get-MDT*

Of the next two groups Set-MDT* and Get-MDT* ,the first function is the one that realy does configure MDT Objects. they do this in the following way:
Get-MDT* –ID mdtitemID –settings @(objectitem1=”text”;objectitem2=”text”;objectitem3=”text”}
The second function (Get-MDT*) is mainly there to fetch MDT object and to extract their ID's to use them in a Set command.
The way to retrieve the object ID is done like this: (Get-MDTComputer -macAddress $mac).ID where the MAC address is in a format like nn:nn:nn:nn:nn but offcourse the other three object identifiers can also be used to retrieve the object ID.
Another way to retrieve the ID of an object is to open the MDT MMC and look for the object, the ID is found in the table and in the GUI Tabs:

image

CommandType Name
----------- ----
Function Set-MDTArray
Function Set-MDTComputer
Function Set-MDTComputerAdministrator
Function Set-MDTComputerApplication
Function Set-MDTComputerPackage
Function Set-MDTComputerRole
Function Set-MDTLocation
Function Set-MDTLocationAdministrator
Function Set-MDTLocationApplication
Function Set-MDTLocationPackage
Function Set-MDTLocationRole
Function Set-MDTMakeModel
Function Set-MDTMakeModelAdministrator
Function Set-MDTMakeModelApplication
Function Set-MDTMakeModelPackage
Function Set-MDTMakeModelRole
Function Set-MDTPackageMapping
Function Set-MDTRole
Function Set-MDTRoleAdministrator
Function Set-MDTRoleApplication
Function Set-MDTRolePackage
Function Set-MDTRoleRole

CommandType Name
----------- ----
Function Get-MDTArray
Function Get-MDTComputer
Function Get-MDTComputerAdministrator
Function Get-MDTComputerApplication
Function Get-MDTComputerPackage
Function Get-MDTComputerRole
Function Get-MDTLocation
Function Get-MDTLocationAdministrator
Function Get-MDTLocationApplication
Function Get-MDTLocationPackage
Function Get-MDTLocationRole
Function Get-MDTMakeModel
Function Get-MDTMakeModelAdministrator
Function Get-MDTMakeModelApplication
Function Get-MDTMakeModelPackage
Function Get-MDTMakeModelRole
Function Get-MDTRole
Function Get-MDTRoleAdministrator
Function Get-MDTRoleApplication
Function Get-MDTRolePackage
Function Get-MDTRoleRole

The Clear-MDT* group

This group functions generally the same like the  Get-MDT* group. just like that function, MDT objects are cleared like this: Clear-MDT* –ID MDTObjectID
CommandType Name
----------- ----
Function Clear-MDTArray
Function Clear-MDTComputerAdministrator
Function Clear-MDTComputerApplication
Function Clear-MDTComputerPackage
Function Clear-MDTComputerRole
Function Clear-MDTLocationAdministrator
Function Clear-MDTLocationApplication
Function Clear-MDTLocationPackage
Function Clear-MDTLocationRole
Function Clear-MDTMakeModelAdministrator
Function Clear-MDTMakeModelApplication
Function Clear-MDTMakeModelPackage
Function Clear-MDTMakeModelRole
Function Clear-MDTRoleAdministrator
Function Clear-MDTRoleApplication
Function Clear-MDTRolePackage
Function Clear-MDTRoleRole

Remove-MDT* group

This group is the opposite of the New_MDT* group: it removes MDT objects from the MDT database.
They function generally the same like the Set- and Get-MDT* groups. just like those functions the MDT object are removed like this: Remove-MDT* –ID MDTObjectID
CommandType Name
----------- ----
Function Remove-MDTComputer
Function Remove-MDTLocation
Function Remove-MDTMakeModel
Function Remove-MDTPackageMapping
Function Remove-MDTRole

All groups have some main functions like –verbose these are used for level of feedback to the user.

Tags van Technorati: ,,,,

Thursday, March 07, 2013

Windows 8 AIK and MDT 2012

Just a simple report this time. when performing some IT duties on a Windows domain i needed a VAMT, i found out a new version (3.0) could be obtained by downloading Windows 8 AIK. so i did, went to download the setup and selected the management tools; in this proces i deselected the Windows Preinstallation components and installed the VAMT on my deploymentserver.

A day later i tried to update my WinPE bootfiles and invoked the command "Update Deployment Share" (forced) this failed. So i checked the properties of WinPE of the Deployment share: this crashed! throwing an error (sorry i do not have any detailed information about this because i did not collect it)

So it threw an error indicating 'unable to load .. from path D:\Windows 8 AIK\...\Windows Preinstallation...  aha! after looking at this path i found it to be not there.

I proved to be the omition of my WinPE components in the Windows 8 AIK setup.

conclusion: Windows 8 AIK integrates with MDT not mentioning it during setup. be aware about this.

till next time.