Showing posts with label Deployment Toolkit. Show all posts
Showing posts with label Deployment Toolkit. 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, February 23, 2013

Start MDT Litetouch deployment remote

Hello again, i am back with a script that is quite handy for IT deployments done with MDT (any version would actually work with this script)
So Microsoft made MDT to be integrated with SCCM and, if done correctly, that combination is very powerful to deploy any kind of Microsoft OS to the enterprise, but what about the smaller clients, the ones who don’t have SCCM? MDT can be used on its own and Litetouch deployments can do the trick!
There is one little thing though that has not properly been addressed by the MDT development team (at least that's my opinion) and that is to hand us a way to get deployments started remotely from the Administrators console. As always with these kind of things i am not the only one so on TechNet a thread was started to get this issue addressed.
Handed solutions were two: present a batch file with a link to the litetouch.vbs and use psexec.exe to get a deployment started remotely. (Psexec is a formidable tool, part of the sysinternals Pstools toolkit)  i have used the first one many times before but its drawbacks are: most of the time you have to log on to the remote deployment system. the Psexec solution however is really nice, that's what i used as a base for this script.
image                                 image
figure 1 the batched solution                                                         figure 2 the Psexec solution
The main difference is: the batched (first) solution is one in which the clients have to fetch the litetouch scripts by themselves, the second Psexec solution is the other way around, in this case you bring the litetouch.vbs script to the client.

$ErrorActionPreference = "SilentlyContinue"
Do {
Clear-Host
Do {
$trgMachine = Read-Host("Give the machinename that has to receive a LiteTouch deployment (Netbios or DNS name are equally good)")
    If($trgMachine -eq ""){Write-Host "Please give a name"}
}While($trgMachine -eq "")
psexec.exe -i \\$trgMachine -h -u DOMAIN\User -p Userpassword cscript.exe //B "\\MDTServer\Deploymentshare$\Scripts\litetouch.vbs"
   if($LASTEXITCODE -eq 0){Write-Host "All went well"}else{Write-Host "Something went wrong: " + $LASTEXITCODE}
 
$goOn= Read-Host("Another machine? (y)")
}while($goOn -eq "y")

Some explanation: the main line of the script is the line starting with psexec.exe it will run the command starting at cscript.exe on the remote machine (designated by $trgMachine) under credentials of the given –u Username and (optional) –p password (this gets sent in clear text so you can omit the –p option and give a password any time in the command shell when running the script) then there are some Do – While loops will restart the script when an empty hostname is found and at the end of a run. the option -h in the psexec line will suppress any UAC prompt (provided you started the script with an account (the -u option) that has local administrator rights)
To use the script, make sure you have psexec.exe installed on a location that's in one of the path locations (usually C:\Windows\System32 is a good location)
have fun and see you next time