<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://myitforum.com/cs2/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Maik Koster at myITforum.com</title><link>http://myitforum.com/cs2/blogs/maikkoster/default.aspx</link><description>giving something back after taking a lot :-)</description><dc:language>en</dc:language><generator>CommunityServer 2007.1 SP2 (Build: 31113.47)</generator><item><title>Versioning / Monitoring SCCM Task Sequences – Update for SCCM 2012</title><link>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/11/10/versioning-monitoring-sccm-task-sequences-update-for-sccm-2012.aspx</link><pubDate>Thu, 10 Nov 2011 17:23:53 GMT</pubDate><guid isPermaLink="false">8e8f7986-475c-475d-bdc9-a1b3a63b955b:160107</guid><dc:creator>maikkoster</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://myitforum.com/cs2/blogs/maikkoster/rsscomments.aspx?PostID=160107</wfw:commentRss><comments>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/11/10/versioning-monitoring-sccm-task-sequences-update-for-sccm-2012.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/05/12/versioning-monitoring-sccm-task-sequences.aspx" target="_blank"&gt;Back in May&lt;/a&gt; this year I released a small tool that monitors and tracks all changes on Task Sequences on your SCCM Server and exports a copy for backup purposes each time a change happens.&lt;/p&gt;  &lt;p&gt;Today I just published an updated version of this script, that enables the same functionality for &lt;a href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=27841" target="_blank"&gt;System Center 2012 Configuration Manager&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Please have a look on the &lt;a href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/05/12/versioning-monitoring-sccm-task-sequences.aspx" target="_blank"&gt;original Blog Post&lt;/a&gt; for some further reference about the usage etc.&lt;/p&gt;  &lt;p&gt;Find the updated &lt;a href="http://mdtcustomizations.codeplex.com/releases/view/65824" target="_blank"&gt;Download on CodePlex&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://myitforum.com/cs2/aggbug.aspx?PostID=160107" width="1" height="1"&gt;</description><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/SCCM/default.aspx">SCCM</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/SMS/default.aspx">SMS</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/vbscript/default.aspx">vbscript</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Task+Sequence/default.aspx">Task Sequence</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/WMI/default.aspx">WMI</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/ConfigMgr/default.aspx">ConfigMgr</category></item><item><title>2011 Microsoft MVP Award - Setup &amp; Deployment</title><link>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/10/02/2011-microsoft-mvp-award-setup-amp-deployment.aspx</link><pubDate>Sun, 02 Oct 2011 18:06:06 GMT</pubDate><guid isPermaLink="false">8e8f7986-475c-475d-bdc9-a1b3a63b955b:159656</guid><dc:creator>maikkoster</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://myitforum.com/cs2/blogs/maikkoster/rsscomments.aspx?PostID=159656</wfw:commentRss><comments>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/10/02/2011-microsoft-mvp-award-setup-amp-deployment.aspx#comments</comments><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Has been a great sunny weekend so far and now I also received the following mail from Microsoft&lt;/p&gt;  &lt;p&gt;   &lt;hr /&gt;&lt;/p&gt;  &lt;p&gt;Dear Maik Koster,&lt;/p&gt;  &lt;p&gt;Congratulations! We are pleased to present you with the 2011 Microsoft® MVP Award! This award is given to exceptional technical community leaders who actively share their high quality, real world expertise with others. We appreciate your outstanding contributions in Setup &amp;amp; Deployment technical communities during the past year.&lt;/p&gt;  &lt;p&gt;   &lt;hr /&gt;&lt;/p&gt;  &lt;p&gt;I’m very proud being re-awarded as a Microsoft MVP for Setup &amp;amp; Deployment. &lt;/p&gt;  &lt;p&gt;And now before I start to rant, I’ll just finish with some almost famous words by Johan Arwidmark “&lt;a href="http://www.deploymentresearch.com/Home.aspx" target="_blank"&gt;Contributing is Everything&lt;/a&gt;”&amp;#160;&amp;#160; &lt;img style="border-bottom-style:none;border-right-style:none;border-top-style:none;border-left-style:none;" class="wlEmoticon wlEmoticon-winkingsmile" alt="Winking smile" src="http://myitforum.com/cs2/blogs/maikkoster/wlEmoticon-winkingsmile_037F183B.png" /&gt;&lt;/p&gt;&lt;img src="http://myitforum.com/cs2/aggbug.aspx?PostID=159656" width="1" height="1"&gt;</description></item><item><title>Mouse without Borders</title><link>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/09/16/mouse-without-borders.aspx</link><pubDate>Fri, 16 Sep 2011 09:06:20 GMT</pubDate><guid isPermaLink="false">8e8f7986-475c-475d-bdc9-a1b3a63b955b:159369</guid><dc:creator>maikkoster</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://myitforum.com/cs2/blogs/maikkoster/rsscomments.aspx?PostID=159369</wfw:commentRss><comments>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/09/16/mouse-without-borders.aspx#comments</comments><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Today I would like to share one of the coolest Tools I’ve seen for a while.&lt;/p&gt;  &lt;p&gt;As doing a lot of testing and developing, I typically have a bunch of computers and laptops flying around on my desk. And as you are reading my blog, it’s probably the same for you. &lt;/p&gt;  &lt;p&gt;How often did it happen that you have to constantly switch between them. Grab the wrong mouse, or have to use the touchpad as the laptop doesn’t have a mouse connected. Trying to test something on a Laptop just to recognize that the file you need is stored on your other computer. Or you check a log file and the guid you are looking for is on the other and you wish you could just Copy&amp;amp;Paste it over instead of typing it down from the other screen?&lt;/p&gt;  &lt;p&gt;Well, then be sure to have a look on &lt;a href="http://aka.ms/MouseWithOutBorders" target="_blank"&gt;“Mouse without Borders”&lt;/a&gt;. A project developed by Truong Do, that has just been released to the public from “&lt;a href="http://blogs.technet.com/b/next/archive/2011/01/20/dirty-work-in-the-garage.aspx" target="_blank"&gt;The Garage&lt;/a&gt;”. The Garage is an initiative (and actually also a physical place) within Microsoft to let employees work on side projects. Which results in brilliant ideas from time to time. &lt;/p&gt;  &lt;p&gt;It’s just a ~1MB download, installs within a few seconds and only requires .Net 2 to be installed. I’ve tested it on Windows 7, XP and even the Developer Preview of Windows 8 without any issues. It allowed me to seamlessly switch between those machines, all with different accounts logged on. This is really an app that makes my life a lot easier.&lt;/p&gt;  &lt;p&gt;When you first start the application on the first computer, it will generate a security key and show to you.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/image_5FCA80C8.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://myitforum.com/cs2/blogs/maikkoster/image_thumb_107D8874.png" width="267" height="266" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This key is then used to connect to this computer if starting “&lt;a href="http://aka.ms/MouseWithOutBorders" target="_blank"&gt;Mouse without Borders&lt;/a&gt;” on a different computer for authentication purposes. It then connects those computers and immediately allows you to use your mouse and keyboard seamlessly between them. It even supports Copy&amp;amp;Paste and Drag&amp;amp;Drop of files and content between the computers, no matter if you are logged in with different accounts and if these computers are standalone machine or joined to different domains. Pretty kewl.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/SNAGHTML218a8c66_242A7208.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="SNAGHTML218a8c66" border="0" alt="SNAGHTML218a8c66" src="http://myitforum.com/cs2/blogs/maikkoster/SNAGHTML218a8c66_thumb_22E5D929.png" width="516" height="335" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;So immediately switching between computers either by moving the mouse to the different screen or using a shortcut, or moving some content from one to the other is a piece of cake now. It even allows you to take a screenshot from the connected computers&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/image_1A8203D2.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://myitforum.com/cs2/blogs/maikkoster/image_thumb_395877B0.png" width="334" height="272" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Quite handy if creating documentations (or Blog posts &lt;img style="border-bottom-style:none;border-right-style:none;border-top-style:none;border-left-style:none;" class="wlEmoticon wlEmoticon-winkingsmile" alt="Winking smile" src="http://myitforum.com/cs2/blogs/maikkoster/wlEmoticon-winkingsmile_23225C5E.png" /&gt; ). Here a combined screenshot from three currently connected Laptops while writing this post:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/Big_Screen_1-0000-0000_22B62969.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="Big_Screen_1-0000-0000" border="0" alt="Big_Screen_1-0000-0000" src="http://myitforum.com/cs2/blogs/maikkoster/Big_Screen_1-0000-0000_thumb_7C73D010.png" width="806" height="148" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The developer has also added some more goodies like “personalizing” the logon screen with your own photos (or the current bing photo) etc.. So be sure to &lt;a href="http://aka.ms/MouseWithOutBorders" target="_blank"&gt;Download this software&lt;/a&gt; and give it a try. It’s really worth it and one of those tools that you use and immediately think about why this haven’t been available for years. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Amazing Tool Truong! I really like it!&lt;/p&gt;&lt;img src="http://myitforum.com/cs2/aggbug.aspx?PostID=159369" width="1" height="1"&gt;</description><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/kewl+tool/default.aspx">kewl tool</category></item><item><title>WSUS Offline Update – Installing Windows updates without an Internet connection and WSUS</title><link>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/09/09/wsus-offline-update-installing-windows-updates-without-an-internet-connection-and-wsus.aspx</link><pubDate>Fri, 09 Sep 2011 12:47:56 GMT</pubDate><guid isPermaLink="false">8e8f7986-475c-475d-bdc9-a1b3a63b955b:159245</guid><dc:creator>maikkoster</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://myitforum.com/cs2/blogs/maikkoster/rsscomments.aspx?PostID=159245</wfw:commentRss><comments>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/09/09/wsus-offline-update-installing-windows-updates-without-an-internet-connection-and-wsus.aspx#comments</comments><description>&lt;p&gt;Today I would like to share one of the handiest tools for servicing Windows systems, if they can’t be updated via &lt;a href="http://technet.microsoft.com/en-us/windowsserver/bb332157" target="_blank"&gt;WSUS&lt;/a&gt; or online at &lt;a href="http://update.microsoft.com/microsoftupdate/v6/default.aspx" target="_blank"&gt;Microsoft Update&lt;/a&gt;, or if you for any reason want to install the updates from a CD/DVD/USB or even a share.&lt;/p&gt;  &lt;p&gt;It’s called &lt;a href="http://www.wsusoffline.net/" target="_blank"&gt;WSUS Offline Update&lt;/a&gt; (formerly known as &lt;a href="http://www.heise.de/ct/projekte/Offline-Update-284105.html" target="_blank"&gt;c’t offline Update&lt;/a&gt;), created and maintained by Torsten Wittrock. It’s main purpose is to download all critical and security related Updates to a local folder and execute the required ones on a system, without the necessity to be connected to the internet or a working WSUS Server.&lt;/p&gt;  &lt;p&gt;It supports Updates for Windows XP, Windows Vista, Windows 7, Server 2003, Server 2003 R2, Server 2008 and Server 2008 R2 both in32 and 64 bit (where applicable), Office 2003, Office 2007 and Office 2010. One can select the required languages, in- or exclude ServicePacks, .Net Frameworks, C++ Runtime libraries, Windows Defenders definitions, Microsoft Security Essentials and so on. Updates can come either from Microsoft Update directly or also from your WSUS Server.&lt;/p&gt;  &lt;p&gt;Once downloaded, one can create ISO images per product and language or per language only. Or copy a subset of selectable updates on a USB Stick. Then a second component can be called from each individual computer that shall be updated, either locally or over the network. This will then evaluate the current computer against the available updates and install all missing ones plus a bunch of additional items like Internet Explorer, PowerShell, Windows Defender, .Net Frameworks, etc.&lt;/p&gt;  &lt;p&gt;OK, let’s have a quick look on how to do that&lt;/p&gt;  &lt;h3&gt;Getting the Updates&lt;/h3&gt;  &lt;p&gt;First, download the most recent version from &lt;a href="http://www.wsusoffline.net/" target="_blank"&gt;WSUS Offline Update&lt;/a&gt; (&lt;a title="http://download.wsusoffline.net/" href="http://download.wsusoffline.net/"&gt;http://download.wsusoffline.net/&lt;/a&gt;). Be sure to unblock the file and then extract the content to a folder. Can be locally or on a network share. If you place it on a share, be sure to map it with a Drive letter.&lt;/p&gt;  &lt;p&gt;Now you want to get the updates and optionally create the Update medias. To do so, start the “&lt;strong&gt;UpdateGenerator.exe&lt;/strong&gt;” from the just extracted folder.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/SNAGHTML4770c56_3A979A8D.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="SNAGHTML4770c56" border="0" alt="SNAGHTML4770c56" src="http://myitforum.com/cs2/blogs/maikkoster/SNAGHTML4770c56_thumb_67405466.png" width="523" height="436" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;As you can see, there are plenty of options what to download and to create. All downloads will be stored in some subfolders at the location, where you started the application from. So be sure to have some space available. We will go over some of the more important ones a bit later. Also be sure to start the download regularly to always have the latest updates available.&lt;/p&gt;  &lt;p&gt;Now if you have selected all the products you would like to download updates for, click on “&lt;strong&gt;Start&lt;/strong&gt;” and the download process will start. It will first get a list of all available updates and then just download the ones that haven’t been downloaded already. Depending on your selection and bandwidth, this can take quite some time. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/SNAGHTML47b32d9_3EC17252.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="SNAGHTML47b32d9" border="0" alt="SNAGHTML47b32d9" src="http://myitforum.com/cs2/blogs/maikkoster/SNAGHTML47b32d9_thumb_3D7CD973.png" width="514" height="262" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;It will also check for superseded Updates, mark and optionally remove them. It’s also maintaining a list of excluded Updates which can be tweaked to your own needs. See the &lt;strong&gt;FAQs&lt;/strong&gt; in the “&lt;strong&gt;doc&lt;/strong&gt;” folder for more information.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/SNAGHTML47ecc0c_0E4AEDDC.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="SNAGHTML47ecc0c" border="0" alt="SNAGHTML47ecc0c" src="http://myitforum.com/cs2/blogs/maikkoster/SNAGHTML47ecc0c_thumb_740A84B7.png" width="513" height="261" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Updating a Client&lt;/h3&gt;  &lt;p&gt;After the Updates have been downloaded, you an use the created CD/DVD/USB media to update a computer. Optionally it’s also possible to call it over the network, even if that’s not the preferred method and contradicts a bit with the idea of an “&lt;em&gt;Offline&lt;/em&gt;” Update &lt;img style="border-bottom-style:none;border-right-style:none;border-top-style:none;border-left-style:none;" class="wlEmoticon wlEmoticon-winkingsmile" alt="Winking smile" src="http://myitforum.com/cs2/blogs/maikkoster/wlEmoticon-winkingsmile_40CE4B4E.png" /&gt;. However to do so, just share the Client subfolder and make sure that you map this share with a drive letter on the computer, as the scripts don’t work with a UNC path. Now execute the “&lt;strong&gt;UpdateInstaller.exe&lt;/strong&gt;”. Preferably with Administrative privileges.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/SNAGHTML59feb93_40621859.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="SNAGHTML59feb93" border="0" alt="SNAGHTML59feb93" src="http://myitforum.com/cs2/blogs/maikkoster/SNAGHTML59feb93_thumb_11302CC2.png" width="402" height="279" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The GUI will let you choose only available options. So it might differ depending what you downloaded or have made available on your media and the OS and installed components itself. Interesting to mention here is, that you can tell it to automatically reboot and recall itself as often as required by the Update process. As a side note, the automatic reboot doesn’t work, if you started the process over the network as the temporary account, created for the automatic logon, doesn’t have the appropriate drive mapped. Well, this is the out-of-the-box behavior and as most of the commands are just scripts, it is possible to tweak this to your needs if you really need to have this option available.&lt;/p&gt;  &lt;p&gt;However, to start the process, simply click on the “&lt;strong&gt;Start&lt;/strong&gt;” button again and let the magic happen. Just be aware, that it might take some time.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/SNAGHTML5a64ff1_04C20999.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="SNAGHTML5a64ff1" border="0" alt="SNAGHTML5a64ff1" src="http://myitforum.com/cs2/blogs/maikkoster/SNAGHTML5a64ff1_thumb_4347573F.png" width="518" height="518" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Automation&lt;/h3&gt;  &lt;p&gt;The whole project has been published under the GNU/GPL and most of its components are vb scripts, batch files or AutoIt scripts. It’s possible to exclude specific Updates, include additional ones, etc. Please see the FAQ (located in the “&lt;strong&gt;doc&lt;/strong&gt;” folder) for some more information on this.&lt;/p&gt;  &lt;p&gt;Interesting part here is, that you can also automate the process to keep your medias up to date. In the “&lt;strong&gt;cmd&lt;/strong&gt;” folder you will find a bunch of command line scripts, that you can use for this purpose. E.g. to update your media after each Microsoft Patchday, just create a batch that calls the “&lt;strong&gt;DownloadUpdates.cmd&lt;/strong&gt;” and &amp;quot;&lt;strong&gt;CreateISOImage.cmd&lt;/strong&gt;” (or “&lt;strong&gt;CopyToTarget.cmd&lt;/strong&gt;” for a USB Stick) with the appropriate parameters and schedule it to run on the required dates. Also the execution on the client can be automated as well by either calling the “&lt;strong&gt;Update.cmd&lt;/strong&gt;” file from the root of your media or the “&lt;strong&gt;DoUpdate.cmd&lt;/strong&gt;” from the “&lt;strong&gt;cmd&lt;/strong&gt;” folder. Actually the first one just calls the latter one and as you can see in the screenshot above, also the GUI just calls them with selected parameters.&lt;/p&gt;  &lt;p&gt;It is a real benefit to always have a USB Stick available, filled with the latest Updates and ready to execute on any machine whenever needed. Or how about automatically updating your Reference image(s) offline with the latest updates? I will show you how, in the next Blog post.&lt;/p&gt;&lt;img src="http://myitforum.com/cs2/aggbug.aspx?PostID=159245" width="1" height="1"&gt;</description><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/WSUS+Offline+Update/default.aspx">WSUS Offline Update</category></item><item><title>Deployment Web service 7.3 - SCCM Client Center support</title><link>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/08/30/deployment-web-service-7-3-sccm-client-center-support.aspx</link><pubDate>Tue, 30 Aug 2011 16:28:37 GMT</pubDate><guid isPermaLink="false">8e8f7986-475c-475d-bdc9-a1b3a63b955b:159122</guid><dc:creator>maikkoster</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://myitforum.com/cs2/blogs/maikkoster/rsscomments.aspx?PostID=159122</wfw:commentRss><comments>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/08/30/deployment-web-service-7-3-sccm-client-center-support.aspx#comments</comments><description>&lt;p&gt;With the &lt;a href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/08/30/deployment-web-service-version-7-3-published.aspx" target="_blank"&gt;release of version 7.3&lt;/a&gt; of the Deployment Webservice (&lt;a href="http://mdtcustomizations.codeplex.com/releases/view/26318" target="_blank"&gt;Download&lt;/a&gt;) a completely new part has been added, integrating some functions of &lt;a href="http://myitforum.com/cs2/blogs/rzander/default.aspx" target="_blank"&gt;Roger Zanders&lt;/a&gt; awesome &lt;a href="http://sccmclictrlib.codeplex.com/" target="_blank"&gt;SCCM Client Center Automation library&lt;/a&gt; for Deployment usage. This library enables you to execute certain SCCM Client related task directly on a client like forcing Software updates or refreshing the Machine Policy. The offered functions are mainly identical to the ones offered in the &lt;a href="http://sccmclictropalis.codeplex.com/" target="_blank"&gt;SCCM Client Center Integration Pack for Opalis&lt;/a&gt;. And as you can see, the available functions are not only interesting for plain deployments, they are also pretty useful in your day-to-day work and can e.g. be called from a minimized administrative FrontEnd for certain helpdesk Users, that shouldn’t deal with the complete SCCM Client Center.&lt;/p&gt;  &lt;p&gt;The web service is currently offering the following functions:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Checks / Status information&lt;/h3&gt;  &lt;p&gt;&lt;strong&gt;CheckAdvertisementDownloading (&lt;em&gt;Computername&lt;/em&gt;)       &lt;br /&gt;&lt;/strong&gt;Check if an advertisement is currently downloading &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;CheckAdvertisementRunning (&lt;em&gt;Computername&lt;/em&gt;)       &lt;br /&gt;&lt;/strong&gt;Check if an advertisement is currently running&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;CheckAdvertisementRequiresReboot (&lt;em&gt;Computername&lt;/em&gt;)       &lt;br /&gt;&lt;/strong&gt;Check if an advertisement is pending a reboot&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;CheckMissingSecurityUpdates (&lt;em&gt;Computername&lt;/em&gt;)       &lt;br /&gt;&lt;/strong&gt;Check for missing authorized security patches&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;CheckWUARebootPending (&lt;em&gt;Computername&lt;/em&gt;)       &lt;br /&gt;&lt;/strong&gt;Check if a reboot is pending because of installed security patches&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;CheckFileRenamePending (&lt;em&gt;ComputerName&lt;/em&gt;)       &lt;br /&gt;&lt;/strong&gt;Check if file rename operations are pending&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Execute actions&lt;/h3&gt;  &lt;p&gt;&lt;strong&gt;RunCertificateMaintenance (&lt;em&gt;Computername&lt;/em&gt;)&lt;/strong&gt;     &lt;br /&gt;Initiates a Certificate Maintenance task&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RunCollectFiles (&lt;em&gt;Computername&lt;/em&gt;)       &lt;br /&gt;&lt;/strong&gt;Initiates a Software Inventory (Collect Files)&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RunDCMScan (&lt;em&gt;Computername&lt;/em&gt;)&lt;/strong&gt;     &lt;br /&gt;Initiates a Desired Configuration Monitoring Scan&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RunDeleteOrphanedCachedPackages (&lt;em&gt;Computername&lt;/em&gt;)       &lt;br /&gt;&lt;/strong&gt;Initiates a cleanup of all orphaned packages&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RunDeleteAllCachedPackages (&lt;em&gt;Computername&lt;/em&gt;)       &lt;br /&gt;&lt;/strong&gt;Deletes all packages from cache&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RunDeleteCachedUpdates (&lt;em&gt;Computername&lt;/em&gt;)       &lt;br /&gt;&lt;/strong&gt;Deletes all Updates from cache&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RunHardwareInventory (&lt;em&gt;Computername&lt;/em&gt;)       &lt;br /&gt;&lt;/strong&gt;Initiates a Hardware Inventory (Delta Update)&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RunFullHardwareInventory (&lt;em&gt;Computername&lt;/em&gt;)&lt;/strong&gt;     &lt;br /&gt;Initiates a Hardware Inventory (Full Update)&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RunSoftwareInventory (&lt;em&gt;Computername&lt;/em&gt;)       &lt;br /&gt;&lt;/strong&gt;Initiates a Software Inventory (Delta Update)&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RunFullSoftwareInventory (&lt;em&gt;Computername&lt;/em&gt;)&lt;/strong&gt;     &lt;br /&gt;Initiates a Software Inventory (Full Update)&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RunHeartbeat (&lt;em&gt;Computername&lt;/em&gt;)&lt;/strong&gt;     &lt;br /&gt;Initiates a Data Discovery cycle&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RunLocationRefresh (&lt;em&gt;Computername&lt;/em&gt;)       &lt;br /&gt;&lt;/strong&gt;Initiates a refresh of locations&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RunMachinePolicy (&lt;em&gt;Computername&lt;/em&gt;)&lt;/strong&gt;     &lt;br /&gt;Initiates a Machine Policy and Evaluation cycle&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RunUserPolicy (&lt;em&gt;Computername&lt;/em&gt;)&lt;/strong&gt;     &lt;br /&gt;Requests User Policy if a User is logged on&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RunUserPolicyByName (&lt;em&gt;Computername, Username&lt;/em&gt;)       &lt;br /&gt;&lt;/strong&gt;Requests User Policy for the specified User&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RunResetPolicy (&lt;em&gt;Computername&lt;/em&gt;)&lt;/strong&gt;     &lt;br /&gt;Initiates a cleanup of orphaned policies cycle&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RunFullResetPolicy (&lt;em&gt;Computername&lt;/em&gt;)       &lt;br /&gt;&lt;/strong&gt;Initiates a Full reset of all SCCM Policies&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RunMPRefresh (&lt;em&gt;Computername&lt;/em&gt;)       &lt;br /&gt;&lt;/strong&gt;Initiates a refresh of the Default Management Point&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RunMSISourceUpdate (&lt;em&gt;Computername&lt;/em&gt;&lt;/strong&gt;)     &lt;br /&gt;Initiates a Windows Installer source update cycle&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RunOOBDiscovery (&lt;em&gt;Computername&lt;/em&gt;)       &lt;br /&gt;&lt;/strong&gt;Initiates an Out of Band Discovery&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RunResetPausedSoftwareDistributionFlag (&lt;em&gt;Computername&lt;/em&gt;)       &lt;br /&gt;&lt;/strong&gt;Resets the paused Software Distribution Flag&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RunSoftwareMeteringReport (&lt;em&gt;Computername&lt;/em&gt;)&lt;/strong&gt;     &lt;br /&gt;Generates a Software Metering Report&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RunTimeoutRequests (&lt;em&gt;Computername&lt;/em&gt;)       &lt;br /&gt;&lt;/strong&gt;Initiates Timeout Requests&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RunUpdateScan (&lt;em&gt;Computername&lt;/em&gt;)       &lt;br /&gt;&lt;/strong&gt;Initiates a scan for missing software updates&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RunUpdateDeployment (&lt;em&gt;Computername&lt;/em&gt;)&lt;/strong&gt;     &lt;br /&gt;Deploys authorized Software updates&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RunCreateServiceWindow (&lt;em&gt;Computername, StartDate, hourDuration&lt;/em&gt;)&lt;/strong&gt;     &lt;br /&gt;Creates a new Service Window&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RunDeleteServiceWindow (&lt;em&gt;Computername, ServiceWindowGuid&lt;/em&gt;)       &lt;br /&gt;&lt;/strong&gt;Deletes a Service Window&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Get / Update Client information&lt;/h3&gt;  &lt;p&gt;&lt;strong&gt;GetAgentVersion (&lt;em&gt;Computername&lt;/em&gt;)&lt;/strong&gt;     &lt;br /&gt;Returns the Agent version of the Client&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;GetAssignedMP (&lt;em&gt;Computername&lt;/em&gt;)       &lt;br /&gt;&lt;/strong&gt;Returns the assigned MP of the Client&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;GetCachePath (&lt;em&gt;Computername&lt;/em&gt;)&lt;/strong&gt;     &lt;br /&gt;Returns the Cache Path of the Client&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;SetCachePath (&lt;em&gt;Computername, CachePath&lt;/em&gt;)       &lt;br /&gt;&lt;/strong&gt;Sets the cache Path for the Client&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;GetCacheSize (&lt;em&gt;Computername&lt;/em&gt;)&lt;/strong&gt;     &lt;br /&gt;Returns the Cache size of the Client&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;SetCacheSize (&lt;em&gt;Computername, CacheSize&lt;/em&gt;)&lt;/strong&gt;     &lt;br /&gt;Sets the cache size for the Client&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;GetClientID (&lt;em&gt;Computername&lt;/em&gt;)       &lt;br /&gt;&lt;/strong&gt;Returns the GUID of the Client&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;GetDNSSuffix (&lt;em&gt;Computername&lt;/em&gt;)&lt;/strong&gt;     &lt;br /&gt;Returns the DNS suffix of the Client&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;SetDNSSuffix (&lt;em&gt;Computername, DNSSuffix&lt;/em&gt;)       &lt;br /&gt;&lt;/strong&gt;Sets the DNS suffix of the client&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;GetHTTPPort (&lt;em&gt;Computername&lt;/em&gt;)&lt;/strong&gt;     &lt;br /&gt;Returns the HTTP port of the Client&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;SetHTTPPort (&lt;em&gt;Computername, HTTPPort&lt;/em&gt;)       &lt;br /&gt;&lt;/strong&gt;Sets the HTTP port of the Client&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;GetInternetMP (&lt;em&gt;Computername&lt;/em&gt;)&lt;/strong&gt;     &lt;br /&gt;Returns the Internet MP of the Client&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;SetInternetMP (&lt;em&gt;Computername, InternetMP&lt;/em&gt;)       &lt;br /&gt;&lt;/strong&gt;Sets the Internet MP of the Client&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;GetProxyMP (&lt;em&gt;Computername&lt;/em&gt;)&lt;/strong&gt;     &lt;br /&gt;Returns the proxy MP of the Client&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;GetMissingSecurityUpdates (&lt;em&gt;Computername&lt;/em&gt;)       &lt;br /&gt;&lt;/strong&gt;Returns a list of missing authorized security patches&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;GetSecurityUpdates (&lt;em&gt;Computername&lt;/em&gt;)&lt;/strong&gt;     &lt;br /&gt;Returns a list of authorized security patches including their current status&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;GetSiteCode (&lt;em&gt;Computername&lt;/em&gt;)       &lt;br /&gt;&lt;/strong&gt;Returns the SiteCode of the Client&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;SetSiteCode (&lt;em&gt;Computername, SiteCode&lt;/em&gt;)&lt;/strong&gt;     &lt;br /&gt;Sets the SiteCode of the Client&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;GetSLP (&lt;em&gt;Computername&lt;/em&gt;)       &lt;br /&gt;&lt;/strong&gt;Returns the SLP of the Client&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;SetSLP (&lt;em&gt;Computername, SLP&lt;/em&gt;)&lt;/strong&gt;     &lt;br /&gt;Sets the SLP of the Client &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Thanks to Roger Zander for this awesome piece of work. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;As described in &lt;a href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/08/30/deployment-web-service-version-7-3-published.aspx" target="_blank"&gt;a former Blog post&lt;/a&gt;, just &lt;a href="http://mdtcustomizations.codeplex.com/releases/view/26318" target="_blank"&gt;download the newest version&lt;/a&gt; of the Deployment Web Service, configure it as described in &lt;a href="http://mdtcustomizations.codeplex.com/wikipage?title=Installation%20Guide" target="_blank"&gt;the Installation Guide&lt;/a&gt; and open the page http://YourWebServer/Deployment/SMSCliCtrV2.asmx to see a complete list of functions including a short description and the possibility to test each individual function. The new security model described &lt;a href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/08/30/deployment-web-service-7-3-basic-security.aspx" target="_blank"&gt;in the last blog post&lt;/a&gt; will also apply to the functions of this part. &lt;/p&gt;  &lt;p&gt;As always, I really appreciate any feedback.    &lt;/p&gt;&lt;img src="http://myitforum.com/cs2/aggbug.aspx?PostID=159122" width="1" height="1"&gt;</description><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Webservice/default.aspx">Webservice</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Microsoft+Deployment/default.aspx">Microsoft Deployment</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/SCCM/default.aspx">SCCM</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/MDT/default.aspx">MDT</category></item><item><title>Deployment Web service 7.3 – Basic security</title><link>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/08/30/deployment-web-service-7-3-basic-security.aspx</link><pubDate>Tue, 30 Aug 2011 15:14:34 GMT</pubDate><guid isPermaLink="false">8e8f7986-475c-475d-bdc9-a1b3a63b955b:159116</guid><dc:creator>maikkoster</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://myitforum.com/cs2/blogs/maikkoster/rsscomments.aspx?PostID=159116</wfw:commentRss><comments>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/08/30/deployment-web-service-7-3-basic-security.aspx#comments</comments><description>&lt;p&gt;With the &lt;a href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/08/30/deployment-web-service-version-7-3-published.aspx" target="_blank"&gt;updated Version 7.3&lt;/a&gt; (&lt;a href="http://mdtcustomizations.codeplex.com/releases/view/26318" target="_blank"&gt;Download&lt;/a&gt;) just being published, the growing number of available functions, covering more and more demands in todays deployments, it’s not only an advantage of having such a huge toolset available. In its default implementation, the Web Service is configured to execute actions under certain user account. While this makes it pretty easy to troubleshoot and verify the functions are working, everyone with access to this web service will now be able to execute actions, he is not supposed to execute. &lt;/p&gt;  &lt;p&gt;So you could restrict the access to the web service with the default methods available in IIS. So only authorized users are able to access the web service and by this execute all the actions. Now it could happen that you would like to let them access only a subset of these actions. For example you might want to restrict the functionality deleting computer objects in AD or the possibility to update any property of an Active Directory object. So far the only way to deal with this problem was using pass-through authentication. By enabling this option in the web service, it would take the credentials of the calling user and pass his credentials further to execute what ever he was tasked to do. By this you are able to offer the full bunch of functions to a lot more users. But you can ensure that only the ones with appropriate permission can actually execute them.&lt;/p&gt;  &lt;p&gt;One drawback on this solution is a much higher complexity and it’s sometimes very hard to troubleshoot problems. As actually most of the problems you might experience with the web service are security related. &lt;/p&gt;  &lt;p&gt;To create some kind of intermediate solution, I implemented a very simple security layer into the Deployment Web Service, that became active &lt;a href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/08/30/deployment-web-service-version-7-3-published.aspx" target="_blank"&gt;with Version 7.3&lt;/a&gt;. The basic idea is to still restrict the access to the web service as you did before. But optionally choose the functions you would like to have available. No fancy Role based security whatsoever. Just a plain list of functions that shall be either excluded (supposing everything else is included) or included (supposing everything else is excluded on default). Plus a combination of both. &lt;/p&gt;  &lt;p&gt;This can be configured for either all web services at all. Or individually for each part of the web service (AD, MDT, SCCM, SMSCliCtrV2). If a function is excluded, it will neither show up on the page that shows a documentation of all available functions, nor will it be possible for anyone to call it, even if knows the name and correct properties.&lt;/p&gt;  &lt;p&gt;Let’s start with an example. On default, the web service excludes the following Active Directory Functions that could be pretty dangerous if they can be used by anyone:&lt;/p&gt;  &lt;p&gt;- DeleteComputer&lt;/p&gt;  &lt;p&gt;- DeleteComputerForced&lt;/p&gt;  &lt;p&gt;- SetComputerAttribute&lt;/p&gt;  &lt;p&gt;- DeleteUser&lt;/p&gt;  &lt;p&gt;- DeleteUserForced&lt;/p&gt;  &lt;p&gt;- SetUserAttribute&lt;/p&gt;  &lt;p&gt;To store this information, a couple new Application Settings have been added to the web.config. You can edit them either directly in the web.config. Or use your IIS Manager&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/image_2D9B669A.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://myitforum.com/cs2/blogs/maikkoster/image_thumb_1DAC21D6.png" width="635" height="438" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;As you can see. There are two generic include and exclude settings (&lt;strong&gt;IncludeFunctions, ExcludeFunctions&lt;/strong&gt;), that will be used for all web service parts. On default all functions are included ( &lt;strong&gt;*&lt;/strong&gt; ) on default. If all settings are empty, which will probably happen if you upgrade from a former version, everything will be available on default. This is to ensure backwards compatibility. So if you upgrade from a former version to 7.3 without updating the web.config, Functions like DeleteComputer might be exposed to the public.&lt;/p&gt;  &lt;p&gt;The second setting with a value is called “&lt;strong&gt;ExcludeADFunctions&lt;/strong&gt;” and is filled with a comma separated list of functions, available in the web service part covered in AD.asmx. All of these settings follow the same naming convention and are hopefully pretty self-explaining. &lt;/p&gt;  &lt;p&gt;Excluding a function will always overrule everything else. So be sure to type in all the functions you would like to not be usable within your environment. If you would just like to just use some very few functions, excluding so many might not be the best option. In this case, just enter the ones you would like to use in the appropriate “include” setting and be sure to remove the “&lt;strong&gt;*&lt;/strong&gt;”.&lt;/p&gt;  &lt;p&gt;The combination of these settings should allow you to cover the most “basic” security demands between the former “Nothing or All” and the very individual “pass-through authentication” approach. However, it will not be able to cover more complex security demands. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If you experience any issues with this new security model or have some great suggestions for further extensions, just get back to me or start a new discussion on the &lt;a href="http://mdtcustomizations.codeplex.com/discussions" target="_blank"&gt;MDT Customizations CodePlex project&lt;/a&gt;. &lt;/p&gt;&lt;img src="http://myitforum.com/cs2/aggbug.aspx?PostID=159116" width="1" height="1"&gt;</description><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Webservice/default.aspx">Webservice</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Microsoft+Deployment/default.aspx">Microsoft Deployment</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/SCCM/default.aspx">SCCM</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Active+Directory/default.aspx">Active Directory</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/MDT/default.aspx">MDT</category></item><item><title>Deployment Web service – Version 7.3 published</title><link>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/08/30/deployment-web-service-version-7-3-published.aspx</link><pubDate>Tue, 30 Aug 2011 07:56:00 GMT</pubDate><guid isPermaLink="false">8e8f7986-475c-475d-bdc9-a1b3a63b955b:159102</guid><dc:creator>maikkoster</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://myitforum.com/cs2/blogs/maikkoster/rsscomments.aspx?PostID=159102</wfw:commentRss><comments>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/08/30/deployment-web-service-version-7-3-published.aspx#comments</comments><description>&lt;p&gt;Today I published version 7.3 of the Deployment web service. Beside some small bug fixes and minor additions, three new features have been added:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;1. SCCM Client Center support&lt;/h3&gt;
&lt;p&gt;A completely new web service part has been added that’s exposing a couple of functions (55 to be accurate) from the &lt;a href="http://sccmclictrlib.codeplex.com/" target="_blank"&gt;SCCM Client Center automation library&lt;/a&gt; written by &lt;a href="http://myitforum.com/cs2/blogs/rzander/default.aspx" target="_blank"&gt;Roger Zander&lt;/a&gt;, giving the possibility to execute certain tasks on a client like pushing Software updates, refreshing the machine policy etc. A full list of functions with all information on how to call them will be published in a separate blog post coming soon. But most of them should be self explaining. Just download the new version and open the page &lt;a href="http://YourWebServer/Deployment/SMSCliCtrV2.asmx"&gt;http://YourWebServer/Deployment/SMSCliCtrV2.asmx&lt;/a&gt; to see a complete list including a short description and the possibility to test each individual function.&lt;/p&gt;
&lt;p&gt;&lt;u&gt;Update:&lt;/u&gt; Please see &lt;a href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/08/30/deployment-web-service-7-3-sccm-client-center-support.aspx" target="_blank"&gt;Deployment Web service 7.3 - SCCM Client Center support&lt;/a&gt; for more details&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;2. Active Directory support for multiple Domains&lt;/h3&gt;
&lt;p&gt;An often requested feature was enabling the possibility to use the same web service executing actions on different domains. Especially if there are separate domains for resources like computers but with security groups in a different domain. Starting with version &lt;strong&gt;7.3&lt;/strong&gt;, there will be two more or less identical versions of the Active Directory part of the web service. the &lt;strong&gt;AD.asmx&lt;/strong&gt; file is offering the standard functions, that work on the configured Domain only. &lt;strong&gt;ADEx.asmx&lt;/strong&gt; contains the same set of functions, but each with an additional parameter to supply the domain name. The domain can be supplied by either “&lt;em&gt;DC=YourDomain,DC=com&lt;/em&gt;” or “&lt;em&gt;YourDomain.com&lt;/em&gt;”. As a lot of things are going more User centric, I’ve also added a couple functions that enable all the functionality currently available for computers now for users. So you can add or remove Users automatically to Groups, move them to a different OU, get or set specific attributes, or get the parent path of a User if you e.g. would like to place the new computer object in the same OU as a specific User object (as RIS/WDS can do). It’s now also possible to list the groups the Computer or User is member of and check if a Computer/User is member of a specific group. Finally an enhanced version of the DeleteComputer/DeleteUser has been added called DeleteComputerForced/DeleteUserForced, that will now also delete a Computer/User object, if it contains child objects. That could e.g. happen if you have BitLocker configured in your Domain. As all those functions are pretty dangerous, they are disabled on default. Please have a look &lt;a href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/08/30/deployment-web-service-7-3-basic-security.aspx" target="_blank"&gt;on the next Blog post&lt;/a&gt; on how to disable/enable specific functions.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;3. Basic security &lt;/h3&gt;
&lt;p&gt;Another often asked question was how to restrict users from calling certain functions from the web service. Due to its former all or nothing approach, the ongoing amount of functions became a bit of a problem as it meant to either allow access to all or none of the functions. The only way so far to restrict the usage of individual functions was to pass through the credentials of the calling User and by this use the security settings of the called server. Starting with version &lt;strong&gt;7.3&lt;/strong&gt; it’s now possible to allow or deny access to each individual function. It’s still not a complex role based security model. Rather a simple list of names that are either allowed or blocked. But should allow you&amp;nbsp; to easily adjust the available functions without the necessity to built and manage “another” security model. As even this simple implementation has a lot of possibilities, I will post some detailed explanation in another blog post.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;u&gt;Update:&lt;/u&gt; Please read &lt;a href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/08/30/deployment-web-service-7-3-basic-security.aspx" target="_blank"&gt;Deployment Web Service 7.3 - Basic security&lt;/a&gt;&amp;nbsp;for more information.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Download and Upgrade&lt;/h3&gt;
&lt;p&gt;As always, you can &lt;a href="http://mdtcustomizations.codeplex.com/releases/view/26318" target="_blank"&gt;download the most recent version directly from CodePlex&lt;/a&gt;. While the former updates have been simple copy&amp;amp;paste replacements, where you could just exclude the web.config, there have been now a lot of changes in the web.config this time and I highly recommend using the web.config supplied in the download and re-add the changes you made in your own (or the other way round &lt;img style="BORDER-BOTTOM-STYLE:none;BORDER-RIGHT-STYLE:none;BORDER-TOP-STYLE:none;BORDER-LEFT-STYLE:none;" class="wlEmoticon wlEmoticon-winkingsmile" alt="Winking smile" src="http://myitforum.com/cs2/blogs/maikkoster/wlEmoticon-winkingsmile_2FF14B17.png" /&gt; ). Please check especially the “AppSettings” and the “webServices” sections as they contain a couple new elements that should be part of your web.config. The rest remains a copy&amp;amp;paste. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As mentioned I will publish more details in the next couple of blog posts and will also update the &lt;a href="http://mdtcustomizations.codeplex.com/documentation" target="_blank"&gt;documentation on CodePlex&lt;/a&gt;. Might just take a moment&lt;/p&gt;
&lt;p&gt;…&lt;/p&gt;
&lt;p&gt;or two.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks to all the Beta testers and their feedback and also for more than 6000 downloads so far. I’m still surprised how large this project went.&lt;/p&gt;&lt;img src="http://myitforum.com/cs2/aggbug.aspx?PostID=159102" width="1" height="1"&gt;</description><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Webservice/default.aspx">Webservice</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Microsoft+Deployment/default.aspx">Microsoft Deployment</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/SCCM/default.aspx">SCCM</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Active+Directory/default.aspx">Active Directory</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/MDT/default.aspx">MDT</category></item><item><title>TechNet Radio Interview</title><link>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/06/20/technet-radio-interview.aspx</link><pubDate>Mon, 20 Jun 2011 10:01:42 GMT</pubDate><guid isPermaLink="false">8e8f7986-475c-475d-bdc9-a1b3a63b955b:158087</guid><dc:creator>maikkoster</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://myitforum.com/cs2/blogs/maikkoster/rsscomments.aspx?PostID=158087</wfw:commentRss><comments>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/06/20/technet-radio-interview.aspx#comments</comments><description>&lt;p&gt;I recently had an interview with &lt;a href="http://blogs.technet.com/b/johnbaker/" target="_blank"&gt;John Baker&lt;/a&gt; for TechNet Radio which has just been published. Check it out at &lt;a href="http://bit.ly/mMBOr8"&gt;http://bit.ly/mMBOr8&lt;/a&gt;. Thanks to John Baker and Chris Caldwell for taking the time.&amp;#160; At the end there is a demo of the new version 2 of the MDT Web FrontEnd and yes, I’m really late on the release ;-)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/image_6E652FDD.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://myitforum.com/cs2/blogs/maikkoster/image_thumb_18188504.png" width="401" height="334" /&gt;&lt;/a&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/image_6F2D6FFA.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://myitforum.com/cs2/blogs/maikkoster/image_thumb_144ABA67.png" width="403" height="335" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Note to myself:&lt;/u&gt; Remove the “&lt;strong&gt;So&lt;/strong&gt;” from my vocabulary and replace it with some more useful words.&lt;/p&gt;&lt;img src="http://myitforum.com/cs2/aggbug.aspx?PostID=158087" width="1" height="1"&gt;</description><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/TechNet+Radio/default.aspx">TechNet Radio</category></item><item><title>New Stuff in MDT 2012 – native VHD support</title><link>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/06/13/new-stuff-in-mdt-2012-native-vhd-support.aspx</link><pubDate>Mon, 13 Jun 2011 07:45:53 GMT</pubDate><guid isPermaLink="false">8e8f7986-475c-475d-bdc9-a1b3a63b955b:157977</guid><dc:creator>maikkoster</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://myitforum.com/cs2/blogs/maikkoster/rsscomments.aspx?PostID=157977</wfw:commentRss><comments>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/06/13/new-stuff-in-mdt-2012-native-vhd-support.aspx#comments</comments><description>&lt;p&gt;As probably most of you have seen already, the Beta 1 of the upcoming MDT 2012 has been published to connect (&lt;a href="https://connect.microsoft.com/site14/Microsoft%20Deployment%20Toolkit" target="_blank"&gt;Download link&lt;/a&gt;) recently (&lt;a href="http://blogs.technet.com/b/msdeployment/archive/2011/06/01/microsoft-deployment-toolkit-2012-beta-1-now-available.aspx" target="_blank"&gt;Announcement by Michael Niehaus&lt;/a&gt;). Main intent for this update is enabling support for the upcoming ConfigMgr 2012. But the team also included a couple other updates into this release like a “prettier” wizard, &lt;a href="http://blogs.technet.com/b/mniehaus/archive/2011/06/11/mdt-2012-beta-1-cross-platform-deployment.aspx" target="_blank"&gt;Cross-Platform support&lt;/a&gt;, etc. However some of the bigger changes “under the hood” did happen on the part that handles all drive and disk related activities like &lt;a href="http://blogs.technet.com/b/mniehaus/archive/2011/06/11/mdt-2012-beta-1-uefi-support.aspx" target="_blank"&gt;UEFI Support&lt;/a&gt;, creating partitions, formatting, etc.&lt;/p&gt;  &lt;p&gt;While the Cross-Platform support is really helpful if you need to deploy to different architectures and I’m for sure will have a look on the new wizard, actually my personal highlight in this version is the added support for VHD during deployments. So lets have a look on how that works.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Why VHD?&lt;/h3&gt;  &lt;p&gt;As you know, a &lt;a href="http://en.wikipedia.org/wiki/VHD_(file_format)" target="_blank"&gt;VHD&lt;/a&gt; is a file, that acts as a virtual hard drive. So almost anything you can do with a physical hard drive can also be done with a VHD, except that it is still simply a file (or several &lt;img style="border-bottom-style:none;border-right-style:none;border-top-style:none;border-left-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smiley" src="http://myitforum.com/cs2/blogs/maikkoster/wlEmoticon-smile_63DEFCE1.png" /&gt;). At the beginning they have been used only for “pure” virtualization purposes in Virtual PC and Hyper-V as virtual hard drives for virtual machines. But Windows 7 and Server 2008 R2 added &lt;a href="http://blogs.technet.com/b/virtualization/archive/2009/05/14/native-vhd-support-in-windows-7.aspx" target="_blank"&gt;native VHD support&lt;/a&gt;. So both are able to not only create and mount a VHD file as an additional “hard drive”. They also support booting from a VHD. This means, you could now have a computer with a single file on your hard drive and it’s booting from (or into?) this file. After you booted, the content of the VHD is your “C:\” drive and the “real” hard drive is “D:\”, “E:\” or whatever (depends on your settings). Doesn’t that sound funny?&lt;/p&gt;  &lt;p&gt;Well, funny is actually enough for me (and a couple others as well &lt;img style="border-bottom-style:none;border-right-style:none;border-top-style:none;border-left-style:none;" class="wlEmoticon wlEmoticon-winkingsmile" alt="Zwinkerndes Smiley" src="http://myitforum.com/cs2/blogs/maikkoster/wlEmoticon-winkingsmile_0A40E02D.png" /&gt; ) to start digging into it it. But there are a couple more benefits why you should have a look on it.&lt;/p&gt;  &lt;p&gt;First it’s simply a file. Backup is now copying a file. Move your “computer” to a different hardware (yes, you need to take care about drivers) or into a virtual machine and back by a simple file transfer. Have multiple VHDs on the same hard drive, gives you multi-boot without fiddling around with partitions and changing driver letters etc. Or even more funny, create differencing disk(s) based on a parent VHD and boot from these differencing disk(s). Want to test a new Service Pack on your non-virtual computer? Create a differencing disk, boot into this differencing disk. Do some heavy testing. If it is good merge the differencing disk back into the parent VHD. If not, just boot back into the parent VHD and delete the differencing one. Due to this we are now able to move some of the features we appreciate from virtual machines into the world of physical computers.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;MDT 2012 – Base support for VHD&lt;/h3&gt;  &lt;p&gt;Now lets have a look on the support, that the new version of MDT 2012 gives us for this. First, there are two new templates that can be used to create new Task Sequences with added VHD support. &lt;/p&gt;  &lt;p&gt;- &lt;strong&gt;Deploy to VHD Client Task Sequence&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;- &lt;strong&gt;Deploy to VHD Server Task Sequence&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The difference to the standard Client and Server templates is minimal. The new templates just contain three additional steps in the Preinstall phase:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/SNAGHTML1868914_7EAB22ED.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="SNAGHTML1868914" border="0" alt="SNAGHTML1868914" src="http://myitforum.com/cs2/blogs/maikkoster/SNAGHTML1868914_thumb_3FF62587.png" width="759" height="677" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;- &lt;strong&gt;Create VHD Disk&lt;/strong&gt; –&amp;gt; Creates a new VHD Disk on the local hard drive and mounts it&lt;/p&gt;  &lt;p&gt;-&lt;strong&gt; Format and Partition VHD&lt;/strong&gt; –&amp;gt; Formats and partitions the new mounted VHD Disk&lt;/p&gt;  &lt;p&gt;- &lt;strong&gt;Clear OSDDiskIndex Variable&lt;/strong&gt; –&amp;gt; Clears the global variable “OSDDiskIndex” that got set by the “Create VHD Disk” step. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The rest of the Task Sequence is identical to the Standard Task Sequences. So if you would like to use this feature, it’s actually a piece of cake as you just do the same that you did to create your “normal” Task Sequences. And you end up with your Computer booting into Windows 7 / Windows Server 2008 R2 from a VHD. You will find this VHD on the local hard drive in the &lt;strong&gt;VHD&lt;/strong&gt; Subfolder. Named with the TaskSequenceID and some random characters. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;A bit more curious on how that works under the hood or how to tweak it? Then read on:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Some MDT 2012 VHD Deep Dive&lt;/h3&gt;  &lt;p&gt;As we have just seen, it’s pretty easy to get MDT creating and using a VHD instead of the hard drive itself. What is really great already (Big thank you to Michael and Keith ;-)). &lt;/p&gt;  &lt;p&gt;However as with everything in MDT, it works fine and easy out of the box, but can also be tweaked to whatever (well almost) what you want. So let’s have a deeper look into this new functionality. For the beginning, we check how the script is being called in the step that creates the VHD Disk. For easier reading, I just copied the command line to the Description:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/image_thumb3_thumb_47DDA21C.png"&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image_thumb3_thumb" border="0" alt="image_thumb3_thumb" src="http://myitforum.com/cs2/blogs/maikkoster/image_thumb3_thumb_thumb_330BA99C.png" width="514" height="336" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;We see it’s being called with two parameters:&lt;/p&gt;  &lt;p&gt;The first is called &lt;strong&gt;VHDOutPutVariable&lt;/strong&gt; and gets a value of &lt;strong&gt;OSDDiskIndex&lt;/strong&gt;. Using this parameter, we can define into what property the disk index of the VHD file will be stored. And as OSDDiskIndex is used, this is actually the reason why we need to clear that value after the disk has been portioned and formatted (Step 3 for the three new steps).&lt;/p&gt;  &lt;p&gt;The second parameter is &lt;strong&gt;VHDCreateFileName&lt;/strong&gt; which is set to &lt;strong&gt;RANDOM&lt;/strong&gt; here. What that does is creating a name starting with the Task SequenceID and some random characters. But we could supply our own name here.&lt;/p&gt;  &lt;p&gt;Beside the naming, that doesn’t give us much options. But the script itself offers us some additional parameters as well:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;VHDCreateSource&lt;/strong&gt; –&amp;gt; Name (and path) of a source VHD Disk. The script will make a copy of the specified source disk and use this copy as the new VHD Disk. Interesting if you&amp;#160; have a central repository of prepared VHD disk with syspreped base images. If using a custom source, make sure that you tweak the rest of your Task Sequence accordingly. E.g. the whole content of it would get formatted in the next step &lt;img style="border-bottom-style:none;border-right-style:none;border-top-style:none;border-left-style:none;" class="wlEmoticon wlEmoticon-winkingsmile" alt="Zwinkerndes Smiley" src="http://myitforum.com/cs2/blogs/maikkoster/wlEmoticon-winkingsmile_0A40E02D.png" /&gt; . &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;VHDCreateDiffVHD&lt;/strong&gt; –&amp;gt; If a value is set, it will create a Differencing disk based on the new VHD that has just been created and use this differencing disk to continue the installation. You can use RANDOM to create a random file name as for the VHD disk or supply a custom name. This option will come into play if you are using an already prepared VHD as source for your new VHD (e.g. a syspreped base image). Again, it requires some custom changes. Well, actually this option will work with the default task sequence, but it doesn’t really make sense.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;VHDCreateSizeMax&lt;/strong&gt; –&amp;gt; Specify the maximum size in MB of the VHD file. That might be an interesting parameter, if you want to store something else on the hard drive as well. On default, MDT will size the VHD to 8&lt;u&gt;0%&lt;/u&gt; of your current free space on the partition it will place the VHD on. Now you need to be aware, that even if the VHD disk type is set to expandable, meaning the VHD disk size will only be as large as the used space within the VHD, it will &lt;strong&gt;blow up&lt;/strong&gt; to the configured size as soon as you boot. So if your VHD has been configured to a size of 100GB, but uses only 15GB of space after everything has been installed, it normally has a size of 15GB as long as the computer hasn’t booted yet into this VHD. If it now boots the VHD, the size of the VHD will increase to 100GB(!) immediately. So if you plan to use several VHDs for Multiboot on the same computer, be sure to configure them for a smaller size. Otherwise you will experience a Bluescreen as soon as the computer boots and there isn’t enough space on the hard drive for the VHD to expand to its configured size. A pretty nasty thing thing if you are starting your experiments with VHDs and don’t take care about it. If the configured max size is actually larger then the mentioned 80% of the free space, it will always use the smallest value. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;VHDCreateType&lt;/strong&gt; –&amp;gt; sets the type of the VHD disk. Can be either FIXED or EXPANDABLE. Default is EXPANDABLE. Pretty self explaining. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;There is another parameter (well actually a MDT property) that will be used by the script which is &lt;strong&gt;DestinationLogicalDrive&lt;/strong&gt;. That property normally holds the partition MDT shall deploy the OS to. It should get discovered automatically but if you want to deploy the VHDs to a different hard drive/partition, you might want to adjust this property.&lt;/p&gt;  &lt;p&gt;And finally after the script has been executed, it will write a new property called “&lt;strong&gt;VHDDisks&lt;/strong&gt;” that contains the Partition Index of the new VHDDisk.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now as we know that MDT treats all parameters as properties, we can define those properties in our Rules (&lt;strong&gt;customsettings.ini&lt;/strong&gt;) as well. But we need to define them as &lt;strong&gt;custom properties&lt;/strong&gt;, as they haven’t been added (yet) as standard MDT properties.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Tip:&lt;/u&gt; In case you are interested, see ZTIGather.xml for a list of all standard MDT properties that well be evaluated on default by the Gather step. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Test the script locally&lt;/h3&gt;  &lt;p&gt;As this script is just creating one (or two) new VHDs and mounts it to the computer, we can even run this script locally to test the behavior. Just two things to notice:&lt;/p&gt;  &lt;p&gt;First, you need to &lt;strong&gt;run it elevated&lt;/strong&gt; as it is calling &lt;strong&gt;Diskpart.exe&lt;/strong&gt; internally.&lt;/p&gt;  &lt;p&gt;Second, the script will run only if the &lt;strong&gt;DeploymentType&lt;/strong&gt; is “&lt;strong&gt;NewComputer&lt;/strong&gt;”. So we need to pass this properly into the script call.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now to run this script we could call the following from an elevated command prompt:&lt;/p&gt;  &lt;p&gt;cscript.exe ZTIVHDCreate.wsf /DeploymentType:NEWCOMPUTER /VHDOutPutVariable:OSDDiskIndex /VHDCreateFileName:RANDOM /Debug:True&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now looking at the &lt;strong&gt;ZTIVHDCreate.log&lt;/strong&gt; from C:\MININT\SMSOSD\OSDLOGS we see how it parsed the properties, prepared the name, path and size and after some more details that I skipped in the screenshot, that everything went well:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/image_704C5E63.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://myitforum.com/cs2/blogs/maikkoster/image_thumb_15A62C05.png" width="822" height="223" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;And we will see the new VHD created in the VHD folder&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/image_6627976B.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://myitforum.com/cs2/blogs/maikkoster/image_thumb_76BF9259.png" width="635" height="122" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;and mounted to our Computer:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/image_69E53C3B.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://myitforum.com/cs2/blogs/maikkoster/image_thumb_1B0476DC.png" width="556" height="105" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now as we know how to call it, we can test more fancy stuff like using a differencing disk and giving it proper names&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;cscript.exe ZTIVHDCreate.wsf /DeploymentType:NEWCOMPUTER /VHDOutPutVariable:OSDDiskIndex /VHDCreateFileName:MyParent.vhd /VHDCreateDiffVHD:MyDiffDisk.vhd /Debug:True&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/image_19BFDDFD.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://myitforum.com/cs2/blogs/maikkoster/image_thumb_58452BA3.png" width="627" height="152" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;etc. &lt;/p&gt;  &lt;p&gt;So lets download the new MDT 2012 Beta 1 and start some testing.&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;img style="border-bottom-style:none;border-right-style:none;border-top-style:none;border-left-style:none;" class="wlEmoticon wlEmoticon-winkingsmile" alt="Zwinkerndes Smiley" src="http://myitforum.com/cs2/blogs/maikkoster/wlEmoticon-winkingsmile_0A40E02D.png" /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Be aware that this information is based on the current Beta 1 so that might change until the final release. But I will update this post if anything changes, so be sure to get back to it.&lt;/p&gt;&lt;img src="http://myitforum.com/cs2/aggbug.aspx?PostID=157977" width="1" height="1"&gt;</description><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/MDT/default.aspx">MDT</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/MDT+2012/default.aspx">MDT 2012</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/VHD/default.aspx">VHD</category></item><item><title>Step-by-Step: Handling WMI Events permanently using VBScript</title><link>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/05/30/step-by-step-handling-wmi-events-permanently-using-vbscript.aspx</link><pubDate>Mon, 30 May 2011 11:58:00 GMT</pubDate><guid isPermaLink="false">8e8f7986-475c-475d-bdc9-a1b3a63b955b:157801</guid><dc:creator>maikkoster</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://myitforum.com/cs2/blogs/maikkoster/rsscomments.aspx?PostID=157801</wfw:commentRss><comments>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/05/30/step-by-step-handling-wmi-events-permanently-using-vbscript.aspx#comments</comments><description>&lt;p&gt;This could be called part 4 of WMI magician &lt;a href="http://myitforum.com/cs2/blogs/koppalfens/default.aspx" target="_blank"&gt;Kim Oppalfens&lt;/a&gt; 3 part series about &lt;a href="http://myitforum.com/cs2/blogs/koppalfens/archive/tags/WMI+Eventing/default.aspx" target="_blank"&gt;WMI eventing in SCCM&lt;/a&gt;. In his series he first covered the basics of WMI eventing using wbemtest to create the event query and dig a bit through the returning objects. Then he guided us through a simple VBScript that monitored folders in SCCM to &lt;a href="http://myitforum.com/cs2/blogs/koppalfens/archive/2010/05/17/create-securable-configuration-manager-folders-using-wmi-eventing-of-course.aspx" target="_blank"&gt;implement “securable” Configuration Manager folders&lt;/a&gt;. A pretty neat solution as folders aren’t securable objects within SCCM. However one drawback of his initial script is, that it needs to be running to be able to monitor events and do its magic. So as soon as the script stops due to user logging off, reboot of the server, etc. it will no longer handle any event. Pretty ugly for a solution that shall enhance SCCM usage all the time. I had the same requirement for the script I’ve published in my last post about &lt;a href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/05/12/versioning-monitoring-sccm-task-sequences.aspx" target="_blank"&gt;Monitoring SCCM Task Sequences&lt;/a&gt; and other event scripts as well. &lt;/p&gt;
&lt;p&gt;So lets fill this gap and get it working all the time. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;What do we need ?&lt;/h3&gt;
&lt;p&gt;To let Kim&amp;#39;s magic happen all the time, we need three things:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;1. The event query&lt;/h3&gt;
&lt;p&gt;It’s provided in the original script already:&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; * &lt;span class="kwrd"&gt;FROM&lt;/span&gt; __InstanceCreationEvent WITHIN 5 &lt;span class="kwrd"&gt;WHERE&lt;/span&gt; TargetInstance ISA &lt;span class="str"&gt;&amp;#39;SMS_ObjectContainerItem&amp;#39;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This queries WMI every 5 seconds for all “&lt;em&gt;SMS_ObjectContainerItem&lt;/em&gt;” objects being created. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To implement this query in WMI we need to create a new &lt;em&gt;“&lt;a href="http://msdn.microsoft.com/en-us/library/aa394639.aspx" target="_blank"&gt;__EventFilter&lt;/a&gt;”&lt;/em&gt; object. We use the following VBScript snippet:&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;Set&lt;/span&gt; oEventFilterClass = oWbemService.&lt;span class="kwrd"&gt;Get&lt;/span&gt;(&lt;span class="str"&gt;&amp;quot;__EventFilter&amp;quot;&lt;/span&gt;)
&lt;span class="kwrd"&gt;Set&lt;/span&gt; oEventFilter = oEventFilterClass.SpawnInstance_()

oEventFilter.Name = &lt;span class="str"&gt;&amp;quot;SCCMFolderMonitorEvent&amp;quot;&lt;/span&gt;
oEventFilter.QueryLanguage = &lt;span class="str"&gt;&amp;quot;WQL&amp;quot;&lt;/span&gt;
sQuery = &lt;span class="str"&gt;&amp;quot;SELECT * FROM __InstanceCreationEvent WITHIN 5 WHERE TargetInstance ISA &amp;#39;SMS_ObjectContainerItem&amp;#39;&amp;quot;&lt;/span&gt;
oEventFilter.Query = sQuery
oEventFilter.EventNamespace = &lt;span class="str"&gt;&amp;quot;root\sms\site_XXX&amp;quot;&lt;/span&gt;

oEventFilter.Put_()&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We first get the class for &lt;em&gt;“__EventFilter”&lt;/em&gt; and create a new instance of it. Then we supply some necessary properties like the query language, the query itself and the namespace for the event. I also gave the Filter a name, so that we are able to reference it later if we e.g. would like to remove the event filter again. If no name is specified, it will be set to a GUID, making it a bit more complicated to find.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;2. The event consumer&lt;/h3&gt;
&lt;p&gt;Now as we have our Event Filter, we need an Event Consumer. The event consumer should call our script that is handling the events we get from our event query. We are not going to cover what the script is actually doing with this event objects or what is required to get it working (the “dummy” object that holds the permission etc.). Please see &lt;a title="http://myitforum.com/cs2/blogs/koppalfens/archive/2010/05/17/create-securable-configuration-manager-folders-using-wmi-eventing-of-course.aspx" href="http://myitforum.com/cs2/blogs/koppalfens/archive/2010/05/17/create-securable-configuration-manager-folders-using-wmi-eventing-of-course.aspx"&gt;Create &amp;quot;securable&amp;quot; Configuration Manager folders using WMI eventing of course&lt;/a&gt; for more details or see the script as its pretty well commented.&lt;/p&gt;
&lt;p&gt;As mentioned by Kim in his series, there are a couple built-in event consumers available in WMI already. One of them is called “&lt;em&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa384749(v=vs.85).aspx" target="_blank"&gt;ActiveScriptEventConsumer&lt;/a&gt;&lt;/em&gt;” that “&lt;em&gt;runs a predefined script in an arbitrary scripting language&lt;/em&gt;”. Sounds like what we need. So we use the following VBScript snippet to create the ActiveScriptEventConsumer:&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;Set&lt;/span&gt; oConsumerClass = oWbemService.&lt;span class="kwrd"&gt;Get&lt;/span&gt;(&lt;span class="str"&gt;&amp;quot;ActiveScriptEventConsumer&amp;quot;&lt;/span&gt;)
&lt;span class="kwrd"&gt;Set&lt;/span&gt; oConsumer = oConsumerClass.SpawnInstance_()

ScriptPath = Replace(WScript.ScriptFullName, WScript.ScriptName, &lt;span class="str"&gt;&amp;quot;&amp;quot;&lt;/span&gt;) 
oConsumer.Name = &lt;span class="str"&gt;&amp;quot;SCCMFolderMonitorConsumer&amp;quot;&lt;/span&gt;
oConsumer.ScriptFileName = WScript.ScriptFullName 
oConsumer.ScriptingEngine = &lt;span class="str"&gt;&amp;quot;VBScript&amp;quot;&lt;/span&gt;

oConsumer.Put_&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Again, we first get the class “ActiveScriptEventConsumer” and create a new instance of it. We define the scripting engine, which is VBScript in our case and can supply either the script itself as a string, or the path to the script. In this example I simply reference the script itself. This way we can create a script that registers and unregisters itself or executes the event handling, depending on the caller and keep everything at one place. As a sidenote, the WScript object is only available if the script is called by a user. On the event it’s not running in &lt;a href="http://en.wikipedia.org/wiki/Windows_Script_Host" target="_blank"&gt;Windows Script Host (WSH)&lt;/a&gt; so no WScript object during execution!&lt;/p&gt;
&lt;p&gt;You: Sounds nice, but how can we detect if the user or the event consumer called the script? &lt;/p&gt;
&lt;p&gt;Me: Well, if the script is called by the event consumer, it supplies an object “&lt;em&gt;TargetEvent&lt;/em&gt;” that contains the event object. Or nothing if called by the user. I leave this up to you to implement (You could actually cheat and look into the script I’ve published to &lt;a href="http://mdtcustomizations.codeplex.com/releases/view/67134" target="_blank"&gt;CodePlex&lt;/a&gt; &lt;img style="BORDER-BOTTOM-STYLE:none;BORDER-RIGHT-STYLE:none;BORDER-TOP-STYLE:none;BORDER-LEFT-STYLE:none;" class="wlEmoticon wlEmoticon-winkingsmile" alt="Zwinkerndes Smiley" src="http://myitforum.com/cs2/blogs/maikkoster/wlEmoticon-winkingsmile_40E16944.png" /&gt; )&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;3. Binding the Event Query to the Event Consumer&lt;/h3&gt;
&lt;p&gt;And now the last part is gluing those two things together. We do this by a WMI object called “&lt;a href="http://msdn.microsoft.com/en-us/library/aa394647" target="_blank"&gt;__FilterToConsumerBinding&lt;/a&gt;&lt;em&gt;&lt;/em&gt;”. Let’s have a look on another VBScript snippet:&lt;/p&gt;&lt;pre class="csharpcode"&gt;oEventFilter.Refresh_()
oConsumer.Refresh_()

&lt;span class="kwrd"&gt;Set&lt;/span&gt; oBindingClass = oWbemService.&lt;span class="kwrd"&gt;Get&lt;/span&gt;(&lt;span class="str"&gt;&amp;quot;__FilterToConsumerBinding&amp;quot;&lt;/span&gt;)
&lt;span class="kwrd"&gt;Set&lt;/span&gt; oBinding = oBindingClass.SpawnInstance_()

oBinding.Filter = oEventFilter.Path_
oBinding.Consumer = oConsumer.Path_

oBinding.Put_()&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Important thing to note here is, that we need to refresh our newly created Event Filter and Event Consumer objects first to update their “&lt;em&gt;Path&lt;/em&gt;” property. Now as before, we get the class &lt;em&gt;“__FiltertoConsumerBinding”&lt;/em&gt; and create a new instance, set the Filter and consumer to the appropriate entries and are done!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If everything went well, it will now query every 5 seconds for new &lt;a href="http://msdn.microsoft.com/en-us/library/cc144997.aspx" target="_blank"&gt;SMS_ObjectContainerItem&lt;/a&gt; objects&amp;nbsp; and if found, call the supplied script that should handle the event object appropriately. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;A couple things to highlight:&lt;/p&gt;
&lt;h3&gt;a Script called from &lt;a href="http://msdn.microsoft.com/en-us/library/aa384749(v=vs.85).aspx" target="_blank"&gt;ActiveScriptEventConsumer&lt;/a&gt; runs as local System on default !!!&lt;/h3&gt;
&lt;p&gt;There aren’t many limits on what local System can do to your “local System”. So be sure you have tested your script thoroughly, especially if it “does” something (like the sample script).&lt;/p&gt;
&lt;p&gt;Make sure you have tight permission set on the script so it can’t be exchanged by someone else, gaining permission he isn’t supposed to have.&lt;/p&gt;
&lt;p&gt;As mentioned already, the ActiveScriptEventConsumer does not use &lt;a href="http://support.microsoft.com/kb/188135/en-us" target="_blank"&gt;WSH&lt;/a&gt; to run the script. By this, you don’t have the &lt;a href="http://msdn.microsoft.com/en-us/library/at5ydy31(v=vs.85).aspx" target="_blank"&gt;WScript&lt;/a&gt; object available and can’t use its methods in the code executed by the Event handler.&lt;/p&gt;
&lt;p&gt;As running in system context, the script can’t interact with the user. Avoid any message or input boxes and be sure to have at least some error handling.&lt;/p&gt;
&lt;p&gt;As it can’t interact with the user, troubleshooting/debugging the script if something fails is pretty tough. Please see my &lt;a href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/05/12/versioning-monitoring-sccm-task-sequences.aspx" target="_blank"&gt;last post&lt;/a&gt; on some more information about this. I recommend adding extensive logging to your script that can be enabled or disabled if required.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Based on my script from the &lt;a href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/05/12/versioning-monitoring-sccm-task-sequences.aspx" target="_blank"&gt;last post&lt;/a&gt;, I’ve rewritten the sample that Kim provided for this permanent event consuming and, with his permission, &lt;a href="http://mdtcustomizations.codeplex.com/releases/view/67134" target="_blank"&gt;posted it to CodePlex&lt;/a&gt;. Be sure to properly test the script before using it in a production environment, as it will make changes to SCCM. It is provided AS IS and neither I nor Kim will be liable for any damage or problem this script might cause. The actually processing of the event object is more or less the same, I’ve just rewritten the parts for permanent event consuming, added some logging capabilities and refactored it to my preferred naming conventions.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://mdtcustomizations.codeplex.com/releases/view/67134" target="_blank"&gt;DOWNLOAD HERE&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you have other kewl ideas on what you could do with WMI eventing, just drop me a note and I will happily reference what you did (or publish it for you, if you don’t want to publish it yourself). &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also be sure to check out a new CodePlex project called “&lt;a href="http://powerevents.codeplex.com/" target="_blank"&gt;PowerEvents for Windows PowerShell&lt;/a&gt;” published by &lt;a href="http://trevorsullivan.net/" target="_blank"&gt;Trevor Sullivan&lt;/a&gt;. It’s an awesome way of doing the same I’ve shown here with PowerShell. Which reminds me on spending much more time on PowerShell &lt;img style="BORDER-BOTTOM-STYLE:none;BORDER-RIGHT-STYLE:none;BORDER-TOP-STYLE:none;BORDER-LEFT-STYLE:none;" class="wlEmoticon wlEmoticon-winkingsmile" alt="Zwinkerndes Smiley" src="http://myitforum.com/cs2/blogs/maikkoster/wlEmoticon-winkingsmile_40E16944.png" /&gt;&lt;/p&gt;&lt;img src="http://myitforum.com/cs2/aggbug.aspx?PostID=157801" width="1" height="1"&gt;</description><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/SCCM/default.aspx">SCCM</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/SMS/default.aspx">SMS</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/vbscript/default.aspx">vbscript</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/WMI/default.aspx">WMI</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Step+by+Step/default.aspx">Step by Step</category></item><item><title>Versioning / Monitoring SCCM Task Sequences</title><link>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/05/12/versioning-monitoring-sccm-task-sequences.aspx</link><pubDate>Thu, 12 May 2011 09:12:46 GMT</pubDate><guid isPermaLink="false">8e8f7986-475c-475d-bdc9-a1b3a63b955b:157481</guid><dc:creator>maikkoster</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://myitforum.com/cs2/blogs/maikkoster/rsscomments.aspx?PostID=157481</wfw:commentRss><comments>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/05/12/versioning-monitoring-sccm-task-sequences.aspx#comments</comments><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;One thing I’m really missing in SCCM is some kind of versioning or history especially for those quite complex Task Sequences, sometimes consisting of hundreds of steps, each with a bunch of properties. And how often did it happen that you came back to the office and one of your Task Sequences suddenly behaved differently, just to figure out that “someone” changed “something” without telling anybody, especially not you? Or have you ever been working on a Task Sequence, just to recognize that you missed something important and this single time haven’t duplicated or exported this Task Sequence before? And now you are stuck, trying to remember what you just changed to get it working again.&lt;/p&gt;  &lt;p&gt;Well, if you now start thinking, this post is for You!&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;img style="border-bottom-style:none;border-right-style:none;border-top-style:none;border-left-style:none;" class="wlEmoticon wlEmoticon-winkingsmile" alt="Zwinkerndes Smiley" src="http://myitforum.com/cs2/blogs/maikkoster/wlEmoticon-winkingsmile_40E610E3.png" /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I just published a script to &lt;a href="http://mdtcustomizations.codeplex.com/releases/view/65824" target="_blank"&gt;CodePlex&lt;/a&gt; that runs on a Primary/Central and monitors all or specific Task Sequences for changes. If a change happened it will export either the previous or the current version of the Task Sequence into a XML file that could then be used to see what has been changed or to restore an older state by importing this xml back into SCCM. It has a bunch of properties that can be used to tweak this process to your specific needs and after it has been started once, runs in the background, not matter if you log off or even reboot the server. So using this script gives you a real history of your Task Sequences that you can use for backup purposes, Versioning and change tracking.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;First Steps – The “Installation”&lt;/h3&gt;  &lt;p&gt;&lt;strong&gt;First &lt;/strong&gt;-&amp;#160; &lt;a href="http://mdtcustomizations.codeplex.com/releases/view/65824" target="_blank"&gt;get the script from CodePlex&lt;/a&gt; and save it to a local folder on the server that you would like to monitor. As Task Sequences can only be edited on the server they have been created on, it might make sense to manage them on one or just a few servers to keep the managing and also the monitoring easy. Be sure to remove the security flag from the script as you downloaded it from the internet (&lt;u&gt;Unblock&lt;/u&gt;).&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Second &lt;/strong&gt;- execute the script with &lt;u&gt;administrative privileges&lt;/u&gt;. On W2K8&amp;#160; and above it needs to run elevated. If everything works, you should see a message box stating that the event filter and consumer have been created.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;That’s actually all you need to do to get it working !!!&lt;/strong&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;From now on, WMI will monitor all changes on any Task Sequence and if a change happened, it will call this script again (Don’t move the script after you executed it the first time). The script will then get some additional information from SCCM like the person that changed it and finally export the Task Sequence into an XML file. This XML file is already prepared in a way that you can import it back again into SCCM. Additionally you can now compare different versions to see the changes. I will write an additional blog post outlining this in more detail.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Making some adjustments&lt;/h3&gt;  &lt;p&gt;As you have seen, the script works right out of the box. But depending on your environment and your needs, it might be necessary to adjust the behavior a bit. You might want to have it export the Task Sequences to a different path. Add a date-time identifier instead of a version, use it just for OSD Task Sequences or would like to include or exclude specific Task Sequences. Well, the script is flexible enough to cover those demands. It has a couple variables defined at the beginning, that you can use to tweak it to your needs. And as the script gets called every time a change happens, this updated behavior will actually take place on the next execution already.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;You will find the following variables at the top of the script:&lt;/p&gt;  &lt;p&gt;- &lt;strong&gt;ExportPath&lt;/strong&gt; : Specifies the location the Task Sequences will be exported to. Default is “&lt;em&gt;C:\SCCMTSMonitor\&lt;/em&gt;”&lt;/p&gt;  &lt;p&gt;- &lt;strong&gt;UsePrevious&lt;/strong&gt; : If set to “&lt;em&gt;True&lt;/em&gt;” it will export the previous version of the Task Sequence. Default is “&lt;em&gt;False&lt;/em&gt;” so it exports the current version.&lt;/p&gt;  &lt;p&gt;- &lt;strong&gt;CreateSubfolders&lt;/strong&gt; : If set to “&lt;em&gt;True&lt;/em&gt;”, which is the default, it will create a subfolder per Task Sequence at the location specified by ExportPath.&lt;/p&gt;  &lt;p&gt;- &lt;strong&gt;UseName&lt;/strong&gt; : If set to “&lt;em&gt;True&lt;/em&gt;”, it will use the Task Sequence name instead of the Package ID as name for the XML File. Default is “&lt;em&gt;False&lt;/em&gt;”, so it will use the Package ID.&lt;/p&gt;  &lt;p&gt;- &lt;strong&gt;UseVersion&lt;/strong&gt; : If set to “&lt;em&gt;True&lt;/em&gt;”, which is the default, it will add a version identifier to the name of the XML file.&lt;/p&gt;  &lt;p&gt;- &lt;strong&gt;VersionLength&lt;/strong&gt; : Defines the length of the version identifier. Default is 3 digits.&lt;/p&gt;  &lt;p&gt;- &lt;strong&gt;AddDate&lt;/strong&gt; : If set to “&lt;em&gt;True&lt;/em&gt;”, it will add the current Date to the name of the XML File. Default it “&lt;em&gt;False&lt;/em&gt;”.&lt;/p&gt;  &lt;p&gt;- &lt;strong&gt;AddTime&lt;/strong&gt; : If set to “&lt;em&gt;True&lt;/em&gt;”, it will add the current time to the name of the XML File. Default is “&lt;em&gt;False&lt;/em&gt;”.&lt;/p&gt;  &lt;p&gt;- &lt;strong&gt;UseOSDTSOnly&lt;/strong&gt; : If set to “&lt;em&gt;True&lt;/em&gt;”, it will limit the export to OSD Task Sequences only. No custom Task Sequence will be exported then. Default is “&lt;em&gt;False&lt;/em&gt;” to cover all Task Sequences.&lt;/p&gt;  &lt;p&gt;- &lt;strong&gt;IncludePackages&lt;/strong&gt; : comma separated list of PackageIDs that shall be included in the export. Default is “&lt;em&gt;*&lt;/em&gt;” which will export all Task Sequences except the ones specified by ExcludePackages.&lt;/p&gt;  &lt;p&gt;- &lt;strong&gt;ExcludePackages&lt;/strong&gt; : comma separated list of PackageIDs that shall be excluded from the export. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So on default it will export the current version of every changed Task Sequence, create a subfolder per Task Sequence, use the PackageID as name and add a three-digit version identifier. Which I think should be OK for most common scenarios. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;“Uninstall” the script&lt;/h3&gt;  &lt;p&gt;As mentioned, the script registers within the WMI namespace and with this survives reboots. To unregister it, simply execute the script again with administrative privileges/elevated. If successful it should show a message box stating that it removed the event filter and consumer. Next execution will register it again. If you e.g. want to move the script to a different folder, just run it once to unregister it, move it to the new location and execute it again to create the filter an consumer again. Pretty simple.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Logging / Troubleshooting&lt;/h3&gt;  &lt;p&gt;As the script runs in system context, it’s quite difficult to figure out what’s going on if it doesn’t do what it is expected to do. To give some “feedback” the script is writing to a log file that is located at the same location where the Task Sequences will be exported to. On default it will show only informational and error messages. But as mentioned in the “&lt;strong&gt;Making some adjustments&lt;/strong&gt;” part, it’s possible to change the behavior of the script during runtime. One of the additional variables not listed there is called “&lt;strong&gt;Debug&lt;/strong&gt;”, which is set to “&lt;em&gt;False&lt;/em&gt;” on default. Just set it to “&lt;em&gt;True&lt;/em&gt;” and the script will be a bit more verbose on what it is doing &lt;img style="border-bottom-style:none;border-right-style:none;border-top-style:none;border-left-style:none;" class="wlEmoticon wlEmoticon-winkingsmile" alt="Zwinkerndes Smiley" src="http://myitforum.com/cs2/blogs/maikkoster/wlEmoticon-winkingsmile_40E610E3.png" /&gt; . The logging routine has been taken from MDT and only slightly adjusted. So preferred Log Viewer is &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=5A47B972-95D2-46B1-AB14-5D0CBCE54EB8" target="_blank"&gt;Trace32 from the ConfigMgr Toolkit&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Additionally WMI also writes some log information itself. On Servers and Clients before Vista/W2K8 it was a lot easier. WMI wrote text based log filed that could be found at “%SystemRoot%\System32\wbem\Logs\”. On Vista/W2K8 and above it’s using the default Event tracing for Windows (ETW), so you need to enable it in the Event Viewer and it’s writing to a binary file. See &lt;a title="http://msdn.microsoft.com/en-us/library/aa826686(v=vs.85).aspx" href="http://msdn.microsoft.com/en-us/library/aa826686(v=vs.85).aspx" target="_blank"&gt;Tracing WMI activity&lt;/a&gt; for more information.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I hope you find this script useful. Even if I still consider it a Beta version at the moment, it has been tested on 32 and 64 Bit Systems and is in use in some larger environments already. And as it is mainly reading/gathering information, it shouldn’t have any negative side-effects. But again, this script is provided AS-IS. Be sure to properly test it before using it in your production environment and be sure to regularly check &lt;a href="http://mdtcustomizations.codeplex.com/releases/view/65824" target="_blank"&gt;the CodePlex page&lt;/a&gt; for an updated version. If you like what it does, you can also review it on CodePlex and be sure to spread the word so others can benefit from it as well. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;As always, I really appreciate any feedback. If you find a bug or would like to suggest an additional feature just get back to me.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I you are interested in some additional information about WMI eventing, especially if it comes to SCCM be sure to check out the following sources:&lt;/p&gt;  &lt;p&gt;- Blog from &lt;a href="http://myitforum.com/cs2/blogs/koppalfens/default.aspx" target="_blank"&gt;the “quiet shy” WMI guy aka Kim Oppalfens&lt;/a&gt; (&lt;a href="http://myitforum.com/cs2/blogs/koppalfens/archive/2010/04/27/wmi-event-basics.aspx" target="_blank"&gt;WMI Event basics&lt;/a&gt;). Please be sure to bug him about his still missing Part 3 of his series of WMI eventing Blog posts he started after last years MMS. &lt;img style="border-bottom-style:none;border-right-style:none;border-top-style:none;border-left-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smiley" src="http://myitforum.com/cs2/blogs/maikkoster/wlEmoticon-smile_205ED131.png" /&gt;&lt;/p&gt;  &lt;p&gt;- CodePlex Project &lt;a href="http://powerevents.codeplex.com/" target="_blank"&gt;PowerEvents for Windows PowerShell&lt;/a&gt; by &lt;a href="http://trevorsullivan.net/" target="_blank"&gt;Trevor Sullivan&lt;/a&gt;. Really nice way on managing WMI Events with PowerShell instead of VBScript. &lt;/p&gt;&lt;img src="http://myitforum.com/cs2/aggbug.aspx?PostID=157481" width="1" height="1"&gt;</description><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/SCCM/default.aspx">SCCM</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/SMS/default.aspx">SMS</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/vbscript/default.aspx">vbscript</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Task+Sequence/default.aspx">Task Sequence</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/WMI/default.aspx">WMI</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/ConfigMgr/default.aspx">ConfigMgr</category></item><item><title>Easily access information from any database and publish it via a web service – Part 2 – The Web Service</title><link>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/04/07/easily-access-information-from-any-database-and-publish-it-via-a-web-service-part-2-the-web-service.aspx</link><pubDate>Thu, 07 Apr 2011 10:55:19 GMT</pubDate><guid isPermaLink="false">8e8f7986-475c-475d-bdc9-a1b3a63b955b:156408</guid><dc:creator>maikkoster</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://myitforum.com/cs2/blogs/maikkoster/rsscomments.aspx?PostID=156408</wfw:commentRss><comments>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/04/07/easily-access-information-from-any-database-and-publish-it-via-a-web-service-part-2-the-web-service.aspx#comments</comments><description>&lt;p&gt;After we have configured the connection to our Database and created our model (&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/04/07/easily-access-information-from-any-database-and-publish-it-via-a-web-service-part-1-the-database.aspx" target="_blank"&gt;see the last post for more details&lt;/a&gt;), we will jump now to the creation of our new Web Service.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Create a Web Service&lt;/h3&gt;  &lt;p&gt;Lets save our changes and add a new item. As mentioned already in &lt;a href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/04/04/michael-niehaus-ris-style-naming-web-service-step-by-step.aspx" target="_blank"&gt;my last post&lt;/a&gt;, I personally prefer the “older” asmx style web services most of the time. So we choose “&lt;strong&gt;Web Service&lt;/strong&gt;” template for now (if you can’t find it easily, simply search for it) and give it a name. I’ll use MDT.asmx for this demo.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/AddItem2_thumb2_0BDDAF98.png"&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="AddItem2_thumb2" border="0" alt="AddItem2_thumb2" src="http://myitforum.com/cs2/blogs/maikkoster/AddItem2_thumb2_thumb_68CD3E27.png" width="517" height="293" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now we see the source code of that newly created web service (Yes, it’s VB.Net, see &lt;a href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/04/04/michael-niehaus-ris-style-naming-web-service-step-by-step.aspx" target="_blank"&gt;my last post&lt;/a&gt; for more information about that) and it contains only one function called “HelloWorld”. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/HelloWorld_thumb2_33E038EA.png"&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="HelloWorld_thumb2" border="0" alt="HelloWorld_thumb2" src="http://myitforum.com/cs2/blogs/maikkoster/HelloWorld_thumb2_thumb_517213E9.png" width="589" height="223" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Lets simply rename it to “GetRoles”, as we want it to return a list of Roles, and specify what it returns exactly. In our case it’s a List of &lt;strong&gt;RoleIdentity&lt;/strong&gt;. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/helloworld2_thumb4_41169C30.png"&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="helloworld2_thumb4" border="0" alt="helloworld2_thumb4" src="http://myitforum.com/cs2/blogs/maikkoster/helloworld2_thumb4_thumb_3F65D05C.png" width="461" height="155" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now we need to connect to the database. We create a simple object for that and call it “&lt;strong&gt;context&lt;/strong&gt;”.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/helloworld3_thumb1_52A686FB.png"&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="helloworld3_thumb1" border="0" alt="helloworld3_thumb1" src="http://myitforum.com/cs2/blogs/maikkoster/helloworld3_thumb1_thumb_7110C7E4.png" width="435" height="130" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Finally we just use the context to get a all the Roles and convert them into the list that we want to return. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/helloworld4_thumb2_0F7B08CE.png"&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="helloworld4_thumb2" border="0" alt="helloworld4_thumb2" src="http://myitforum.com/cs2/blogs/maikkoster/helloworld4_thumb2_thumb_2DE549B7.png" width="399" height="126" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now we can debug/run the web service, call this new function and voila, have a list of Roles with just two lines of code. &lt;img style="border-bottom-style:none;border-right-style:none;border-top-style:none;border-left-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smiley" src="http://myitforum.com/cs2/blogs/maikkoster/wlEmoticon-smile_7A3CDD58.png" /&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/xml1_thumb2_12CC7AA9.png"&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="xml1_thumb2" border="0" alt="xml1_thumb2" src="http://myitforum.com/cs2/blogs/maikkoster/xml1_thumb2_thumb_25DD8188.png" width="577" height="360" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;OK, the XML result is not really great to look at and probably doesn’t cause a wave of excitement, but as we know, it’s quite easy consumable by our scripts. More importantly, we are now able to create web service functions for all information that we would like to publish like let’s say the Roles of a computer based on it’s Mac Address&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/ComputerRoles_4E4C3DCF.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="ComputerRoles" border="0" alt="ComputerRoles" src="http://myitforum.com/cs2/blogs/maikkoster/ComputerRoles_thumb_11480C3D.png" width="535" height="103" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;or call the Stored procedure and return a list of Packages&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/RetreivePackages_thumb3_5D9F9FDE.png"&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="RetreivePackages_thumb3" border="0" alt="RetreivePackages_thumb3" src="http://myitforum.com/cs2/blogs/maikkoster/RetreivePackages_thumb3_thumb_630E1082.png" width="535" height="90" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;And a lot more. The nice thing about this way is, that you have a lot of control about what happens exactly. You can filter out unwanted stuff, do some manipulation/calculation on the items etc. This kind of web service is also a lot easier to use from a scripted environment like MDT. The “bad” thing about it is, that it’s a lot of typing. So lets see how to use a more automatic way for this.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Create a WCF Web Service&lt;/h3&gt;  &lt;p&gt;Michael Niehaus posted a quite similar example some time ago in his post &lt;a title="http://blogs.technet.com/b/mniehaus/archive/2009/10/27/using-the-mdt-database-from-a-web-service-without-writing-code.aspx" href="http://blogs.technet.com/b/mniehaus/archive/2009/10/27/using-the-mdt-database-from-a-web-service-without-writing-code.aspx" target="_blank"&gt;using the MDT Database from a web service without writing code&lt;/a&gt;. Have a look in his post for some more background information and to see how we can make more use of it. &lt;/p&gt;  &lt;p&gt;First we add a new item to our project. This time we need to choose the “&lt;strong&gt;WCF Data Service&lt;/strong&gt;” template with a nice name. Let’s use MDTWCF.svc&amp;#160; &lt;img style="border-bottom-style:none;border-right-style:none;border-top-style:none;border-left-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smiley" src="http://myitforum.com/cs2/blogs/maikkoster/wlEmoticon-smile_7A3CDD58.png" /&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/WCF1_thumb1_687C8126.png"&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="WCF1_thumb1" border="0" alt="WCF1_thumb1" src="http://myitforum.com/cs2/blogs/maikkoster/WCF1_thumb1_thumb_77CFE335.png" width="509" height="288" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;What we see in the source now are two “&lt;strong&gt;TODOs&lt;/strong&gt;”. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/WCF2_thumb2_1C14C7B8.png"&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="WCF2_thumb2" border="0" alt="WCF2_thumb2" src="http://myitforum.com/cs2/blogs/maikkoster/WCF2_thumb2_thumb_2448ED4F.png" width="568" height="230" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The first one is to specify which model to use. Well, we want to use the one we created &lt;a href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/04/07/easily-access-information-from-any-database-and-publish-it-via-a-web-service-part-1-the-database.aspx" target="_blank"&gt;in our last post&lt;/a&gt;. The next one is to specify what we would like to publish and what access we want to give via this web service. For now let’s give Read-Only access to all entities from the model. That can be achieved with a one-liner&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/WCF3_thumb1_6F5BE811.png"&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="WCF3_thumb1" border="0" alt="WCF3_thumb1" src="http://myitforum.com/cs2/blogs/maikkoster/WCF3_thumb1_thumb_32E37367.png" width="574" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Running this example now and pointing it to the list of Roles again, gives a slightly different look, but still the same content&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/WCF7_thumb2_16860B7A.png"&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="WCF7_thumb2" border="0" alt="WCF7_thumb2" src="http://myitforum.com/cs2/blogs/maikkoster/WCF7_thumb2_thumb_6960F8DE.png" width="721" height="321" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The beauty of this way is, that it also supports things like filtering, paging etc. out of the box. Let’s just get the first 5 computers with “MMS” in the name and order it by MacAddress. The URL for this looks like: &lt;strong&gt;http://YourWebServer/MDTWCF.svc/ComputerIdentities?$filter=startswith(Description, &amp;#39;MMS&amp;#39;)&amp;amp;$top=5&amp;amp;$orderby=MacAddress&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;and the result&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/WCF8_thumb2_0A4445B9.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="WCF8_thumb2" border="0" alt="WCF8_thumb2" src="http://myitforum.com/cs2/blogs/maikkoster/WCF8_thumb2_thumb_5025530C.png" width="546" height="420" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Again, it looks a bit strange, but as said already, it’s not meant to be consumed by a human. It’s human readable to ease troubleshooting but is typically consumed by a script, application, etc. For a working example, that makes use of such a web service have a look at another post from Michael Niehaus about &lt;a title="http://blogs.technet.com/b/mniehaus/archive/2009/10/28/mdt-2010-wizard-example-role-selection.aspx" href="http://blogs.technet.com/b/mniehaus/archive/2009/10/28/mdt-2010-wizard-example-role-selection.aspx" target="_blank"&gt;MDT 2010 wizard example role selection&lt;/a&gt;. You might also check out &lt;a title="http://www.odata.org/developers/protocols/uri-conventions#QueryStringOptions" href="http://www.odata.org/developers/protocols/uri-conventions#QueryStringOptions" target="_blank"&gt;OData URI Conventions - Query String Options&lt;/a&gt; or &lt;a title="http://msdn.microsoft.com/en-us/library/dd728283.aspx" href="http://msdn.microsoft.com/en-us/library/dd728283.aspx" target="_blank"&gt;Accessing Data Service Resources&lt;/a&gt; to get a list of the possible query strings you can use querying this WCF based Data Services.&lt;/p&gt;  &lt;p&gt;I personally like those WCF based web services mainly for giving fast access to a data source and have all those nice features like filtering, sorting, etc. included. However if I have some restrictions on what to show or want to manipulate the data, I still prefer the “old style” asmx web services as they give me more possibilities with less code.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Rather long post and there is probably a ton more to say about this. But that should be enough to give you an idea. Again, find &lt;a href="http://mdtcustomizations.codeplex.com/releases/view/63779" target="_blank"&gt;the full source code on CodePlex&lt;/a&gt; with some sample functions. Feel free to add and change whatever you like, just make sure you adjust the connection (point to the right SQL Server/Database in the connection String of the web.config as show in the post &lt;a href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/04/05/implementing-a-very-simple-maintenance-mode-in-mdt-litetouch.aspx" target="_blank"&gt;Implementing a very simple Maintenance Mode for MDT LiteTouch&lt;/a&gt;). If you created something really fancy/useful with it, please share it again with the community. &lt;/p&gt;  &lt;p&gt;It’s all about contributing and giving something back. &lt;img style="border-bottom-style:none;border-right-style:none;border-top-style:none;border-left-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smiley" src="http://myitforum.com/cs2/blogs/maikkoster/wlEmoticon-smile_7A3CDD58.png" /&gt;&lt;/p&gt;    &lt;p&gt;As always, feel free to contact me with any problem or feedback you have. &lt;/p&gt;&lt;img src="http://myitforum.com/cs2/aggbug.aspx?PostID=156408" width="1" height="1"&gt;</description><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Webservice/default.aspx">Webservice</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/MDT/default.aspx">MDT</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Entity+Framework/default.aspx">Entity Framework</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Development/default.aspx">Development</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/MMS/default.aspx">MMS</category></item><item><title>Easily access information from any database and publish it via a web service – Part 1 – The Database</title><link>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/04/07/easily-access-information-from-any-database-and-publish-it-via-a-web-service-part-1-the-database.aspx</link><pubDate>Thu, 07 Apr 2011 08:34:00 GMT</pubDate><guid isPermaLink="false">8e8f7986-475c-475d-bdc9-a1b3a63b955b:156401</guid><dc:creator>maikkoster</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://myitforum.com/cs2/blogs/maikkoster/rsscomments.aspx?PostID=156401</wfw:commentRss><comments>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/04/07/easily-access-information-from-any-database-and-publish-it-via-a-web-service-part-1-the-database.aspx#comments</comments><description>&lt;p&gt;OK, (probably) my two last post regarding my MMS 2011 sessions, if I haven’t missed something important &lt;img style="BORDER-BOTTOM-STYLE:none;BORDER-RIGHT-STYLE:none;BORDER-TOP-STYLE:none;BORDER-LEFT-STYLE:none;" class="wlEmoticon wlEmoticon-smile" alt="Smiley" src="http://myitforum.com/cs2/blogs/maikkoster/wlEmoticon-smile_1BADF970.png" /&gt; .&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To be able to make our Deployments more dynamic and as unattended as possible, we need to have all the information available, that we need to take decisions automatically . We typically use information from the local hardware, the customsettings.ini and maybe the MDT Database. If we are really advanced, we also make use of some web services like &lt;a href="http://mdtcustomizations.codeplex.com/" target="_blank"&gt;the Deployment Web Service&lt;/a&gt; to drive our deployment.&lt;/p&gt;
&lt;p&gt;But what if the necessary information is somewhere else? Maybe you have already an Asset Management System or other Databases? Well, MDT can, as we all know, query almost any database. You just need to tell it how and what. But what if you can’t really access this database as your security guys simply won’t open Named pipes for that? Or you would just like to publish a subset of the available information or need to do some processing on the data first, before handing it out to the client?&lt;/p&gt;
&lt;p&gt;Here again, web services might be an interesting choice. And in this post I’m showing you how you can easily access almost any relational database and publish this information via a web service. I will use Microsoft Visual Web Developer 2010 Express for this demo (&lt;a href="http://www.microsoft.com/express/Web/" target="_blank"&gt;download it for free at Microsoft&lt;/a&gt;) and as with the last couple posts, I will publish &lt;a href="http://mdtcustomizations.codeplex.com/releases/view/63779" target="_blank"&gt;the complete source code to CodePlex&lt;/a&gt;. As Database, I simply use the MDT Database, but it could be any database, so see it just as a sample. Also this post shall just give ideas and cheer you on implementing your own stuff. &lt;img style="BORDER-BOTTOM-STYLE:none;BORDER-RIGHT-STYLE:none;BORDER-TOP-STYLE:none;BORDER-LEFT-STYLE:none;" class="wlEmoticon wlEmoticon-smile" alt="Smiley" src="http://myitforum.com/cs2/blogs/maikkoster/wlEmoticon-smile_1BADF970.png" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;All right, lets start!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Create the project&lt;/h3&gt;
&lt;p&gt;Again, we first open Visual Studio and create a new Project. I chose the “ASP.Net Empty Web application” template to create one. This way we have nice, clean web based project to start from and don’t have any pre-configured junk in there. Just give it a useful name and a few seconds later, we are ready to start.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/NewProject_29140C76.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title="NewProject" border="0" alt="NewProject" src="http://myitforum.com/cs2/blogs/maikkoster/NewProject_thumb_0A7A1BCD.png" width="592" height="340" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Connect to a Database&lt;/h3&gt;
&lt;p&gt;In a former Post I wrote already about &lt;a title="http://myitforum.com/cs2/blogs/maikkoster/archive/2009/10/15/using-linq-and-the-entity-framework-to-query-sms-sccm.aspx" href="http://myitforum.com/cs2/blogs/maikkoster/archive/2009/10/15/using-linq-and-the-entity-framework-to-query-sms-sccm.aspx" target="_blank"&gt;using LINQ and the Entity Framework to query SMS/SCCM&lt;/a&gt;. And I will make again use of the &lt;a href="http://en.wikipedia.org/wiki/ADO.NET_Entity_Framework" target="_blank"&gt;Entity Framework&lt;/a&gt; to establish our connection to the database. Why would I want to do this? Well, the Entity Framework is an Object-Relational-Mapper. It will take a table/view/Stored Procedure from the database, create a new class based on it and automatically map them. So instead of having to deal with DataTables and columns and such stuff, we have “real” objects and properties, that (mostly)simply map to a column of a table with the same or different name. Yes, that’s very simplified but I’m not a developer and this post is also not targeted to developers &lt;img style="BORDER-BOTTOM-STYLE:none;BORDER-RIGHT-STYLE:none;BORDER-TOP-STYLE:none;BORDER-LEFT-STYLE:none;" class="wlEmoticon wlEmoticon-winkingsmile" alt="Zwinkerndes Smiley" src="http://myitforum.com/cs2/blogs/maikkoster/wlEmoticon-winkingsmile_02A2035E.png" /&gt;&lt;/p&gt;
&lt;p&gt;OK, lets add a new item to our almost empty project (Right-click on the project –&amp;gt; Add Item). We choose the “&lt;strong&gt;ADO.Net Entity Data Model&lt;/strong&gt;” for this. Give it a useful name and click on Add.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/AddEDM2_1B31A0AE.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title="AddEDM2" border="0" alt="AddEDM2" src="http://myitforum.com/cs2/blogs/maikkoster/AddEDM2_thumb_3FE2B825.png" width="595" height="337" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It will open a wizard, that asks us to either automatically generate a model for us or if we want to create our own. Well, as we are lazy, we will let it generate one.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/AddEDM3_35CE16FA.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title="AddEDM3" border="0" alt="AddEDM3" src="http://myitforum.com/cs2/blogs/maikkoster/AddEDM3_thumb_4D191B6B.png" width="443" height="401" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To enable the wizard to generate something, we need to tell it the database to connect to. To do so we need to specify the connection by either choose an existing one, or adding a new one by clicking on “&lt;strong&gt;New Connection&lt;/strong&gt;” to connect to a new database.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/DBCon2_2A74DCF0.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title="DBCon2" border="0" alt="DBCon2" src="http://myitforum.com/cs2/blogs/maikkoster/DBCon2_thumb_4EB9C172.png" width="701" height="432" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The Note about storing sensitive information pops up only as I specified a SQL user with password to connect. It won’t show up if you use integrated security. Just configure it the way it’s appropriate for your environment. I simply prefer SQL accounts for such tasks.&lt;/p&gt;
&lt;p&gt;The wizard now connects to the database and returns a list of all Tables, Views and Stored Procedures. Select whatever you need from your database. I’d also suggest to check the “pluralize” option. The option for including the foreign key should be checked by default. You can also select just a few tables for now and come back later at any time to add more or even update existing tables, that e.g. got a new column.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/DBCon4_5AAB8BD9.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title="DBCon4" border="0" alt="DBCon4" src="http://myitforum.com/cs2/blogs/maikkoster/DBCon4_thumb_735AB31C.png" width="715" height="368" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Clicking on &lt;strong&gt;Finish&lt;/strong&gt; will now generate a Model based on the selected items. Next we will see a graphical representation of that model. Let’s have a quick look on a part of it. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/edm1_515F2ACB.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title="edm1" border="0" alt="edm1" src="http://myitforum.com/cs2/blogs/maikkoster/edm1_thumb_162B4F00.png" width="551" height="341" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We will immediately see that the wizard took the table name and created a class (Entity) with the same name. And all the columns became properties of this entity. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/edm2_2B5954A8.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title="edm2" border="0" alt="edm2" src="http://myitforum.com/cs2/blogs/maikkoster/edm2_thumb_7091ABD1.png" width="436" height="218" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It even converted existing relationships between tables, as we can see between the LocationIdentity and LocationIdentity_Gateways entities. The connection is implemented with something called Navigation properties. The Location entity contains a list of Gateways and each Gateway entity contains a reference to exactly one location entity. They are called Navigation properties, as we can use them to easily navigate between them, as they work both ways.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/edm3_2D662DA4.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title="edm3" border="0" alt="edm3" src="http://myitforum.com/cs2/blogs/maikkoster/edm3_thumb_5F7D5821.png" width="534" height="406" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We could now implement some changes that are independent of the Database. For example we could give some properties a different name that seems more appropriate for our project, and they would still map to the correct column. But we can also right click somewhere on the background and click on “&lt;strong&gt;Update from Database&lt;/strong&gt;” and this will open up the wizard again, we have seen before, giving us the chance to add more tables/views or update existing ones.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/edm4_1EAB5BF2.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title="edm4" border="0" alt="edm4" src="http://myitforum.com/cs2/blogs/maikkoster/edm4_thumb_71B5F916.png" width="448" height="263" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The last thing I would like to mention is how we can use Stored Procedures, as that could become a bit tricky sometimes. We have selected one Stored procedure already during the wizard, but sadly, that isn’t enough to be able to use it. We need to create a new function in our model and map it to that particular stored procedure. Often its enough to simply double-click on the Stored procedure (You can find it in the Model Explorer in the “Store” node) or right-click somewhere on the background of the model and choose Add –&amp;gt; Function Import …&lt;/p&gt;
&lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/edm5_2EF6ADDE.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title="edm5" border="0" alt="edm5" src="http://myitforum.com/cs2/blogs/maikkoster/edm5_thumb_34651E82.png" width="453" height="171" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This opens a new wizard where we can specify a name for the function, the stored procedure it shall map to and (here comes the troubling part) what to do with the result of the Stored Procedure. Often the result maps quite easily to some scalar types (String, Integer, etc.) or an already existing Entity. If not, the Wizard gives us the possibility to get the column information and create a new complex type that we can use for this. However this doesn’t work all the time and as we expected already doesn’t do in our case. It says the store procedure doesn’t return any columns which isn’t really true but lets don’t argue with the wizard.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/edm6_3D71AA03.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title="edm6" border="0" alt="edm6" src="http://myitforum.com/cs2/blogs/maikkoster/edm6_thumb_771443ED.png" width="522" height="446" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now we need to create a complex type ourselves. Luckily this isn’t complicated at all. We simply right-click again somewhere on the background of the model and choose Add –&amp;gt; Complex Type&lt;/p&gt;
&lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/edm7_760C2E43.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title="edm7" border="0" alt="edm7" src="http://myitforum.com/cs2/blogs/maikkoster/edm7_thumb_1B95ABA5.png" width="516" height="153" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;After giving it a name, we add a couple Properties by right-clicking on our new complex type and choose Add –&amp;gt; Scalar Property –&amp;gt; String&lt;/p&gt;
&lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/edm8_59AEC656.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title="edm8" border="0" alt="edm8" src="http://myitforum.com/cs2/blogs/maikkoster/edm8_thumb_7E5FDDCD.png" width="429" height="317" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;to add two new properties. “&lt;strong&gt;ARPName&lt;/strong&gt;“ and “&lt;strong&gt;Packages&lt;/strong&gt;“ as these are the names of the columns the stored procedure returns.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/edm9_2CF5E6B0.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title="edm9" border="0" alt="edm9" src="http://myitforum.com/cs2/blogs/maikkoster/edm9_thumb_527F6411.png" width="281" height="282" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now we can double-click again on the Stored Procedure “&lt;strong&gt;RetrievePackages&lt;/strong&gt;” and now map the result to this new complex type&lt;/p&gt;
&lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/edm10_461140E8.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title="edm10" border="0" alt="edm10" src="http://myitforum.com/cs2/blogs/maikkoster/edm10_thumb_08A0DC61.png" width="329" height="396" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;OK, we know now how to connect to a database and create a model from it that fits our needs. &lt;a href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/04/07/easily-access-information-from-any-database-and-publish-it-via-a-web-service-part-2-the-web-service.aspx" target="_blank"&gt;In the next post&lt;/a&gt;, we will jump right into the creation of our new Web Service to publish our new model.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The &lt;a href="http://mdtcustomizations.codeplex.com/releases/view/63779" target="_blank"&gt;full source is published to CodePlex&lt;/a&gt;. If you download either the source or pre-compiled binaries, just make sure you adjust the connection string to &lt;u&gt;Your&lt;/u&gt; MDT Database (see my last post &lt;a title="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/04/05/implementing-a-very-simple-maintenance-mode-in-mdt-litetouch.aspx" href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/04/05/implementing-a-very-simple-maintenance-mode-in-mdt-litetouch.aspx" target="_blank"&gt;Implementing a (very) simple Maintenance Mode in MDT LiteTouch&lt;/a&gt; for more information on how to adjust the Connection String.&lt;/p&gt;&lt;img src="http://myitforum.com/cs2/aggbug.aspx?PostID=156401" width="1" height="1"&gt;</description><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Webservice/default.aspx">Webservice</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/MDT/default.aspx">MDT</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Entity+Framework/default.aspx">Entity Framework</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Database/default.aspx">Database</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Development/default.aspx">Development</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/MMS/default.aspx">MMS</category></item><item><title>Implementing a (very) simple Maintenance mode in MDT Litetouch</title><link>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/04/05/implementing-a-very-simple-maintenance-mode-in-mdt-litetouch.aspx</link><pubDate>Tue, 05 Apr 2011 08:48:06 GMT</pubDate><guid isPermaLink="false">8e8f7986-475c-475d-bdc9-a1b3a63b955b:156322</guid><dc:creator>maikkoster</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://myitforum.com/cs2/blogs/maikkoster/rsscomments.aspx?PostID=156322</wfw:commentRss><comments>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/04/05/implementing-a-very-simple-maintenance-mode-in-mdt-litetouch.aspx#comments</comments><description>&lt;p&gt;While preparing for a session about MDT enhancements at &lt;a href="http://www.mms-2011.com/" target="_blank"&gt;the MMS 2011&lt;/a&gt; (find the video at &lt;a href="http://www.deploymentresearch.com/Videos/MMS2011Videos.aspx" target="_blank"&gt;DeploymentResearch&lt;/a&gt;), &lt;a href="http://deploymentbunny.com/" target="_blank"&gt;Mikael Nyström&lt;/a&gt; had a very interesting idea for a web service demo. The idea was to implement something simple that allows to set a single or all locations into some kind of “Maintenance Mode”. Meaning if you have some server maintenance to do or maybe some global issues and you don’t want to have any new deployments starting, just go to a webpage and “switch off” the deployment for that particular location or even globally. So some kind of baby version of the ConfigMgr Maintenance Windows.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Having just two hours preparation allowed only a pretty simple implementation, but I think this idea has potential for further extensions as it might become handy. I especially dislike the current fact that I had to change an existing table. But more on this later.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;To implement this “initial” simple version, I just added a column to the “&lt;strong&gt;LocationIdentity&lt;/strong&gt;” table to store the Maintenance Information. And this “Maintenance information” is a pretty simple “&lt;strong&gt;YES&lt;/strong&gt;” or “NO”. Well, as with most of those kind of configurations in MDT, anything else than a “YES” implicitly results to a “NO”.&lt;/p&gt;  &lt;p&gt;Now all we need are four things to get it working:&lt;/p&gt;  &lt;p&gt;1. &lt;strong&gt;Add a new column&lt;/strong&gt; called “&lt;strong&gt;Maintenance&lt;/strong&gt;” to the &lt;strong&gt;LocationIdentity&lt;/strong&gt; table of the MDT Database&lt;/p&gt;  &lt;p&gt;2. &lt;strong&gt;A Webpage&lt;/strong&gt; that allows us to configure these values&lt;/p&gt;  &lt;p&gt;3. &lt;strong&gt;A Webservice&lt;/strong&gt; that interprets and returns the result to the Client Computer&lt;/p&gt;  &lt;p&gt;4. &lt;strong&gt;A script &lt;/strong&gt;that calls the webservice, interprets the result and stops the deployment if necessary&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;The Database&lt;/h3&gt;  &lt;p&gt;To add the new column to the MDT database, you can simply use the SQL Management Studio. Even the free Express version will do it (&lt;a href="http://www.microsoft.com/express/Database/" target="_blank"&gt;Express Editions at Microsoft&lt;/a&gt;). &lt;/p&gt;  &lt;p&gt;- Open SQL Management Studio (Express)&lt;/p&gt;  &lt;p&gt;- connect to the MDT database&lt;/p&gt;  &lt;p&gt;- expand the MDT Database node&lt;/p&gt;  &lt;p&gt;- expand the “Tables” node&lt;/p&gt;  &lt;p&gt;- right click on LocationIdentity –&amp;gt; Design&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/Design_3DB1E9E8.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="Design" border="0" alt="Design" src="http://myitforum.com/cs2/blogs/maikkoster/Design_thumb_5490BB64.png" width="444" height="407" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;- Create new columns with the name “Maintenance” and type of “nvarchar(50)” simply because it’s the default &lt;img style="border-bottom-style:none;border-right-style:none;border-top-style:none;border-left-style:none;" class="wlEmoticon wlEmoticon-winkingsmile" alt="Zwinkerndes Smiley" src="http://myitforum.com/cs2/blogs/maikkoster/wlEmoticon-winkingsmile_251226CB.png" /&gt;.&amp;#160; Optionally set the Default Value to “NO”.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/Design2_6B8F16D3.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="Design2" border="0" alt="Design2" src="http://myitforum.com/cs2/blogs/maikkoster/Design2_thumb_5C0C0504.png" width="441" height="408" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;- Save your changes&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;The Webpage&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://mdtcustomizations.codeplex.com/releases/view/63779" target="_blank"&gt;The download on CodePlex&lt;/a&gt; contains a webpage that allows you to easily switch the maintenance mode for either each location individually or even globally. It has been written against .Net 4 so make sure you have it installed on your web server. It is based on the ASP.Net MVC 2 templates (see &lt;a title="http://www.asp.net/mvc" href="http://www.asp.net/mvc"&gt;http://www.asp.net/mvc&lt;/a&gt; for more details about ASP.Net MVC). As it is available in source feel free to change whatever you need. There is just one thing you need to adjust to your local environment and that is to update the connection string and point it to the correct MDT database. You can do this by either using the “Connection Strings” item from the IIS Manager &lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/image_7931AD0E.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://myitforum.com/cs2/blogs/maikkoster/image_thumb_2D362695.png" width="536" height="334" /&gt;&lt;/a&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/IIS2_288FF60E.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="IIS2" border="0" alt="IIS2" src="http://myitforum.com/cs2/blogs/maikkoster/IIS2_thumb_1B496CFB.png" width="318" height="337" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;or just open the web.config file from the root of this web page with your favorite XML editor.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/webconfig1b_432C6C5A.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="webconfig1b" border="0" alt="webconfig1b" src="http://myitforum.com/cs2/blogs/maikkoster/webconfig1b_thumb_3A5C640E.png" width="633" height="86" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/webconfig2_4BEC4ED9.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="webconfig2" border="0" alt="webconfig2" src="http://myitforum.com/cs2/blogs/maikkoster/webconfig2_thumb_34719AA8.png" width="832" height="73" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The connection string itself seems a bit long. Just make sure you only edit the “real” connection string that you will see in the screenshots above. You can use any valid connection string format like “Data Source=SQ01;Initial Catalog=MDT2010;Integrated Security=SSPI;” to use the account of the Application pool or to connect with the credentials of a specific SQL user account as shown in the example. I personally prefer the latter. Find more information about connections strings at &lt;a href="http://www.connectionstrings.com"&gt;www.connectionstrings.com&lt;/a&gt;. Just make sure that the account used has read and write access to that table.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now we can open the web page at &lt;a href="http://YourWebServer/YourWebPage/"&gt;http://YourWebServer/YourWebPage/&lt;/a&gt; and it should look like this (well, with your locations)&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/Web_6D3BCEA8.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="Web" border="0" alt="Web" src="http://myitforum.com/cs2/blogs/maikkoster/Web_thumb_2E86D142.png" width="509" height="326" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;You remember that blue background, don’t you?&amp;#160;&amp;#160; &lt;img style="border-bottom-style:none;border-right-style:none;border-top-style:none;border-left-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smiley" src="http://myitforum.com/cs2/blogs/maikkoster/wlEmoticon-smile_68296B2C.png" /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;The Web Service&lt;/h3&gt;  &lt;p&gt;The Web Service is now pretty easy. If you have the web page running the web service should work out of the box as it re-uses the same connection. To verify just open the page &lt;a href="http://YourWebServer/YourWebPage/Maintenance.asmx"&gt;http://YourWebServer/YourWebPage/Maintenance.asmx&lt;/a&gt; and you should be able to see the function “GetMaintenanceStatus”. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/Webservice1_47A22B7A.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="Webservice1" border="0" alt="Webservice1" src="http://myitforum.com/cs2/blogs/maikkoster/Webservice1_thumb_2A4CD3B0.png" width="386" height="230" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now you can also test the function from that page if you like. It takes just one parameter “&lt;strong&gt;LocationIdentifier&lt;/strong&gt;”. In our example this is only the default Gateway. But it’s easy to use something like Active Directory sites for this (the upcoming Version 2 of the MDT Web FrontEnd adds support for using ADSites to identify the MDT location). &lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/Webservice2_24258715.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="Webservice2" border="0" alt="Webservice2" src="http://myitforum.com/cs2/blogs/maikkoster/Webservice2_thumb_267F0913.png" width="421" height="329" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;and we get a result as XML&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/Webservice3_719203D5.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="Webservice3" border="0" alt="Webservice3" src="http://myitforum.com/cs2/blogs/maikkoster/Webservice3_thumb_70B99DEB.png" width="353" height="59" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;The Script&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://mdtcustomizations.codeplex.com/releases/view/63779" target="_blank"&gt;In the download&lt;/a&gt; you will also find a script called Z_Maintenance.vbs. It has been written as a UserExit script so it’s meant to be called directly from the Gather step of MDT as this one is called as first in your Deployment process and so yields to a good point to decide if the process should continue. To get it working, just copy this script to your MDT Scripts folder and adjust your Rules file according to the sample CustomSettings.ini provided in the download as well. You actually just need to add a new section and have it called at the very beginning of your Task Sequence. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/csini2_0F9011CA.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="csini2" border="0" alt="csini2" src="http://myitforum.com/cs2/blogs/maikkoster/csini2_thumb_5B7B7276.png" width="691" height="256" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;After this, make sure you &lt;strong&gt;update&lt;/strong&gt; your DeploymentShare!&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now if the Gather step is called at the beginning of your deployment, it will query this Web Service function and call the UserExit script to evaluate the result. If maintenance mode is set, it will return an error to the gather step and by this stop all further processing. And just to be sure it also sets the MDT property “OSInstall” to “NO” that would also stop all MDT TaskSequences if executed anyhow.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/Gather_386B0106.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="Gather" border="0" alt="Gather" src="http://myitforum.com/cs2/blogs/maikkoster/Gather_thumb_0141730D.png" width="668" height="507" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;As you can see above, the Gather step just freaks out now and no further deployments are possible. It will, however not stop already running deployments. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Final thoughts&lt;/h3&gt;  &lt;p&gt;As mentioned already, I really dislike modifying existing tables in the MDT database, as this could have side effects that I try to avoid if possible. To make something more useful out of this it should have some more possibilities:&lt;/p&gt;  &lt;p&gt;- It should be stored in a separate table(s), that just links to the location. &lt;/p&gt;  &lt;p&gt;- It would be nice to be able to configure Time periods to define the maintenance windows.&amp;#160; &lt;/p&gt;  &lt;p&gt;- Time periods should be either one-time or recurring on different periods. &lt;/p&gt;  &lt;p&gt;- Have it link/sync/re-use existing maintenance information as available in other tools like &lt;a href="http://technet.microsoft.com/en-us/library/bb694295.aspx" target="_blank"&gt;ConfigMgr&lt;/a&gt;, OpsMgr, &lt;a href="http://www.nagios.org/" target="_blank"&gt;Nagios&lt;/a&gt;, …&lt;/p&gt;  &lt;p&gt;- Integrate into the &lt;a href="http://mdtwebfrontend.codeplex.com/" target="_blank"&gt;MDT Web FrontEnd&lt;/a&gt; and the &lt;a href="http://mdtcustomizations.codeplex.com/" target="_blank"&gt;Deployment Web service&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;- …&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If you like the idea, I encourage you to share your thoughts about the design and implementation. Feel free to take the source and do whatever you want. &lt;/p&gt;&lt;img src="http://myitforum.com/cs2/aggbug.aspx?PostID=156322" width="1" height="1"&gt;</description><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Webservice/default.aspx">Webservice</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/MDT/default.aspx">MDT</category><category domain="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/MMS/default.aspx">MMS</category></item><item><title>Michael Niehaus RIS style naming web service - Step by Step</title><link>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/04/04/michael-niehaus-ris-style-naming-web-service-step-by-step.aspx</link><pubDate>Mon, 04 Apr 2011 10:36:00 GMT</pubDate><guid isPermaLink="false">8e8f7986-475c-475d-bdc9-a1b3a63b955b:156285</guid><dc:creator>maikkoster</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://myitforum.com/cs2/blogs/maikkoster/rsscomments.aspx?PostID=156285</wfw:commentRss><comments>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/04/04/michael-niehaus-ris-style-naming-web-service-step-by-step.aspx#comments</comments><description>&lt;p&gt;One of the interestingly often asked question is how to properly name a computer. And it’s sometimes incredible to see how much time people can spend on that rather boring and actually not really helpful topic. Anyway, one solution a couple people really like is to have some kind of prefix and then just add a sequential number to it. In RIS deployments you have the option to do exactly that but with MDT this doesn’t work on default, forcing you to add your own bits to make this work. A couple people took this challenge already and published some working solutions:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.deploymentresearch.com/Blog.aspx" target="_blank"&gt;Johan Arwidmark&lt;/a&gt; created a solution that is based on a simple Stored Procedure. Find the download and explanation at &lt;a href="http://www.deployvista.com/Blog/JohanArwidmark/tabid/78/EntryID/120/language/sv-SE/Default.aspx" target="_blank"&gt;Generate Computernames in MDT 2010&lt;/a&gt;. You might also want to have a look on &lt;a href="http://runebelune.blogspot.com/" target="_blank"&gt;Rune Bakkens&lt;/a&gt; slightly extended version at &lt;a title="http://runebelune.blogspot.com/2011/03/generate-computer-names-in-mdt-2010sccm.html" href="http://runebelune.blogspot.com/2011/03/generate-computer-names-in-mdt-2010sccm.html"&gt;http://runebelune.blogspot.com/2011/03/generate-computer-names-in-mdt-2010sccm.html&lt;/a&gt;. The beauty of this implementation is, that it works with what you have available already and it’s quite easy to extend and customize to your needs. Especially the post by Rune shows some interesting ideas. All it takes is somebody with some basic TSQL knowledge. The “bad” thing about it is, that the naming happens completely within MDT or better to say the database. So no verification if that name exists already in Active Directory etc.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And here the “Godfather of MDT” &lt;a href="http://blogs.technet.com/b/mniehaus/" target="_blank"&gt;Michael Niehaus&lt;/a&gt; stepped in and wrote a “simple” web service that does the same, but is storing this information in Active Directory instead. Actually quite identical to what RIS/WDS is doing. It also creates the computer account and stores the UUID as a property. This way computers get the same name back if they were created already. On his blog he posted the complete source code on how to do that, but he actually didn’t supply a compiled version. He left it to the readers to do that. As a lot of people asked on how to do that exactly, I did a demo on this during the web service session I had together with &lt;a href="http://www.techlog.org/" target="_blank"&gt;Kenneth&lt;/a&gt; at &lt;a href="http://www.mms-2011.com/topic/details/BE34" target="_blank"&gt;MMS 2011&lt;/a&gt;. And I promised to &lt;a href="http://mdtcustomizations.codeplex.com/releases/view/63779" target="_blank"&gt;publish this to CodePlex&lt;/a&gt; as well, so here you are &lt;img style="BORDER-BOTTOM-STYLE:none;BORDER-RIGHT-STYLE:none;BORDER-TOP-STYLE:none;BORDER-LEFT-STYLE:none;" class="wlEmoticon wlEmoticon-winkingsmile" alt="Zwinkerndes Smiley" src="http://myitforum.com/cs2/blogs/maikkoster/wlEmoticon-winkingsmile_39C25CF1.png" /&gt;. I’ll also go through what we did step-by-step, just to demonstrate, that taking such examples from the web, adjusting and getting them to work in your environment doesn’t need to be difficult. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Compiling the example code – Step by Step&lt;/h3&gt;
&lt;p&gt;1. &lt;strong&gt;Get the source code&lt;/strong&gt; from Michaels Blog Post (&lt;a href="http://blogs.technet.com/b/mniehaus/archive/2009/12/06/ris-style-naming-with-mdt-2010-use-a-web-service.aspx" target="_blank"&gt;Link&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;1b. The example is written in &lt;strong&gt;C#&lt;/strong&gt;. If you prefer &lt;strong&gt;VB.Net&lt;/strong&gt; (as I do) over C# then just have it converted to VB.net first, using one of the freely available online converters. I normally use &lt;a href="http://www.developerfusion.com/tools/convert/csharp-to-vb/" target="_blank"&gt;developerFusions converter&lt;/a&gt; for this. The following steps will cover C# and VB.Net if they differ at some aspect.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2. &lt;strong&gt;Open Visual Studio&lt;/strong&gt;. You actually don’t need a full version for this. I used &lt;strong&gt;Visual Studio 2010 Web Developer Express&lt;/strong&gt; in this demo, that can be downloaded for free at Microsoft. (&lt;a href="http://www.microsoft.com/express/Downloads/" target="_blank"&gt;Express Downloads&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;3. &lt;strong&gt;Create a new ASP.Net Web Service Project.&lt;/strong&gt; If you can’t find it in the list of project templates, just search for “&lt;strong&gt;web service&lt;/strong&gt;”. Microsoft sometimes likes to “hide” the “older” stuff from us. Especially if they would like us to use some “newer” things like WCF in this case &lt;img style="BORDER-BOTTOM-STYLE:none;BORDER-RIGHT-STYLE:none;BORDER-TOP-STYLE:none;BORDER-LEFT-STYLE:none;" class="wlEmoticon wlEmoticon-smile" alt="Smiley" src="http://myitforum.com/cs2/blogs/maikkoster/wlEmoticon-smile_270D633A.png" /&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/NewProject_6D8A5342.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title="NewProject" border="0" alt="NewProject" src="http://myitforum.com/cs2/blogs/maikkoster/NewProject_thumb_43C6D84F.png" width="388" height="386" /&gt;&lt;/a&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/NewProject2_66C723F2.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title="NewProject2" border="0" alt="NewProject2" src="http://myitforum.com/cs2/blogs/maikkoster/NewProject2_thumb_6FD3AF73.png" width="673" height="386" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;4. &lt;strong&gt;Delete&lt;/strong&gt; the default &lt;strong&gt;Service1.asmx&lt;/strong&gt; (Optional).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;5. &lt;strong&gt;Add&lt;/strong&gt; a new item “&lt;strong&gt;Web service&lt;/strong&gt;” to the project (Right click on project –&amp;gt; Add Item –&amp;gt; Web Service) and give it the name “NameService.asmx”. Again, if you have problems finding it, just utilize the search.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/AddItem_5A9583FE.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title="AddItem" border="0" alt="AddItem" src="http://myitforum.com/cs2/blogs/maikkoster/AddItem_thumb_31AA6EF5.png" width="674" height="381" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;6. &lt;strong&gt;Mark&lt;/strong&gt; all existing code and simply &lt;strong&gt;replace&lt;/strong&gt; it with the code we got from Michaels Blog.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Tadaaa!!! We are done!&amp;nbsp;&amp;nbsp;&amp;nbsp; ….&amp;nbsp;&amp;nbsp; Well, not really &lt;img style="BORDER-BOTTOM-STYLE:none;BORDER-RIGHT-STYLE:none;BORDER-TOP-STYLE:none;BORDER-LEFT-STYLE:none;" class="wlEmoticon wlEmoticon-winkingsmile" alt="Zwinkerndes Smiley" src="http://myitforum.com/cs2/blogs/maikkoster/wlEmoticon-winkingsmile_39C25CF1.png" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Some required changes&lt;/h3&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now we need to tweak some minor things to get it working:&lt;/p&gt;
&lt;p&gt;1. We will see some issues with the &lt;strong&gt;System.DirectoryServices&lt;/strong&gt; namespace. To solve this, we need to add a reference to Systems.DirectoryServices.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; - On C# right-click on “References” –&amp;gt; Add Reference –&amp;gt; .NET –&amp;gt; System.DirectoryServices)&lt;/p&gt;
&lt;p&gt;&amp;nbsp; - On VB.Net you need to right-click the project –&amp;gt; Add Reference –&amp;gt; .NET –&amp;gt; System.DirectoryServices&lt;/p&gt;
&lt;table class="mceItemTable" cellspacing="0" cellpadding="2"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p align="center"&gt;&lt;strong&gt;C#&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;
&lt;p align="center"&gt;&lt;strong&gt;VB.Net&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/MissingDS_CS_43A68CB5.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title="MissingDS_CS" border="0" alt="MissingDS_CS" src="http://myitforum.com/cs2/blogs/maikkoster/MissingDS_CS_thumb_0636282E.png" width="536" height="99" /&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/MissingDS_VB_1257A255.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title="MissingDS_VB" border="0" alt="MissingDS_VB" src="http://myitforum.com/cs2/blogs/maikkoster/MissingDS_VB_thumb_02D49086.png" width="432" height="106" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/AddReference_CS_1CC850A8.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title="AddReference_CS" border="0" alt="AddReference_CS" src="http://myitforum.com/cs2/blogs/maikkoster/AddReference_CS_thumb_14647B51.png" width="347" height="273" /&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/AddReference_VB_391592C8.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title="AddReference_VB" border="0" alt="AddReference_VB" src="http://myitforum.com/cs2/blogs/maikkoster/AddReference_VB_thumb_3764C6F4.png" width="410" height="276" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/AddReference2_34DB9536.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title="AddReference2" border="0" alt="AddReference2" src="http://myitforum.com/cs2/blogs/maikkoster/AddReference2_thumb_5345D61F.png" width="419" height="344" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2. As our project has probably a different name as the one Michael used in his example, we need to adjust the namespace of our web service.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; - On C# we just need to &lt;strong&gt;rename&lt;/strong&gt; the Namespace to the name of our Project.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; - On VB.Net we need to &lt;strong&gt;remove&lt;/strong&gt; the namespace, as it uses the Project name as default namespace already.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;table class="mceItemTable" cellspacing="0" cellpadding="2"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p align="center"&gt;&lt;strong&gt;C#&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;
&lt;p align="center"&gt;&lt;strong&gt;VB.Net&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/Namespace_CSharp_0F41F208.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title="Namespace_CSharp" border="0" alt="Namespace_CSharp" src="http://myitforum.com/cs2/blogs/maikkoster/Namespace_CSharp_thumb_18BAB07E.png" width="469" height="219" /&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/Namespace_VB_1D50BB38.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title="Namespace_VB" border="0" alt="Namespace_VB" src="http://myitforum.com/cs2/blogs/maikkoster/Namespace_VB_thumb_621CDF6C.png" width="560" height="259" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you miss this or have a typo in the name, you will most probably see something like the following error, if you try to run the web service:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/ParseError_CS_462BAA74.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title="ParseError_CS" border="0" alt="ParseError_CS" src="http://myitforum.com/cs2/blogs/maikkoster/ParseError_CS_thumb_07963701.png" width="747" height="276" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To verify the name used by the web service, right-click on the NameService.asmx –&amp;gt; View Markup and verify that the names match&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/ViewMarkup_3E23E245.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title="ViewMarkup" border="0" alt="ViewMarkup" src="http://myitforum.com/cs2/blogs/maikkoster/ViewMarkup_thumb_3C731671.png" width="302" height="305" /&gt;&lt;/a&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/Map_Namespace_Class_CS_5351E7ED.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title="Map_Namespace_Class_CS" border="0" alt="Map_Namespace_Class_CS" src="http://myitforum.com/cs2/blogs/maikkoster/Map_Namespace_Class_CS_thumb_1FE5FEC4.png" width="634" height="222" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now it is already possible to execute and use the web service. However it has a minor “&lt;strong&gt;bug&lt;/strong&gt;” as all computer accounts will be created as &lt;strong&gt;disabled&lt;/strong&gt;. Not really that usable out-of-the-box. To solve this, we add another Active Directory property called “&lt;strong&gt;userAccountControl&lt;/strong&gt;” to the new computer account and set the value to &lt;strong&gt;4128&lt;/strong&gt;.&lt;/p&gt;
&lt;table class="mceItemTable" cellspacing="0" cellpadding="2"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p align="center"&gt;&lt;strong&gt;C#&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;
&lt;p align="center"&gt;&lt;strong&gt;VB.Net&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/UAC_CS_180DE655.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title="UAC_CS" border="0" alt="UAC_CS" src="http://myitforum.com/cs2/blogs/maikkoster/UAC_CS_thumb_61508B50.png" width="513" height="216" /&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/UAC_VB_1AF3253B.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title="UAC_VB" border="0" alt="UAC_VB" src="http://myitforum.com/cs2/blogs/maikkoster/UAC_VB_thumb_4B39F9F1.png" width="536" height="212" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If we know click on “&lt;strong&gt;Start Debugging&lt;/strong&gt;” (just press F5) we can test the web service using the built-in Development web server and generate new computer names. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/StartDebugging1_68CBD4F0.png"&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-BOTTOM:0px;BORDER-LEFT:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP:0px;BORDER-RIGHT:0px;PADDING-TOP:0px;" title="StartDebugging1" border="0" alt="StartDebugging1" src="http://myitforum.com/cs2/blogs/maikkoster/StartDebugging1_thumb_18A676B2.png" width="522" height="211" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For further information on how to integrate it into your Deployments, please have a look on &lt;a href="http://blogs.technet.com/b/mniehaus/archive/2009/12/06/ris-style-naming-with-mdt-2010-use-a-web-service.aspx" target="_blank"&gt;Michaels Post&lt;/a&gt; as it covers that already in more detail. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now we could add some additional logic like getting the default computer container if no OU has been specified (&lt;u&gt;Tip:&lt;/u&gt; There are &lt;a href="http://msdn.microsoft.com/en-us/library/ms675565(v=vs.85).aspx" target="_blank"&gt;well known GUIDs&lt;/a&gt; for those containers), or move the computer to the specified OU if it is currently somewhere else, etc. But as this is just a demo I leave this to &lt;strong&gt;You&lt;/strong&gt;. Feel free to &lt;strong&gt;implement your changes&lt;/strong&gt; and if you would like to share them, I’ll happily &lt;strong&gt;post&lt;/strong&gt; them to CodePlex so others can benefit from it as well.&lt;/p&gt;
&lt;p&gt;Find the complete source for C# and VB.Net on CodePlex at &lt;a href="http://mdtcustomizations.codeplex.com/releases/view/63779" target="_blank"&gt;this Download link&lt;/a&gt;. As a sidenote, the next version of the Deployment Webservice will have this function integrated already. With some more features for sure &lt;img style="BORDER-BOTTOM-STYLE:none;BORDER-RIGHT-STYLE:none;BORDER-TOP-STYLE:none;BORDER-LEFT-STYLE:none;" class="wlEmoticon wlEmoticon-smile" alt="Smiley" src="http://myitforum.com/cs2/blogs/maikkoster/wlEmoticon-smile_270D633A.png" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As always, feel free to contact me with any ideas or comments you have. I really appreciate feedback, and try to respond as quick as possible.&lt;/p&gt;&lt;img src="http://myitforum.com/cs2/aggbug.aspx?PostID=156285" width="1" height="1"&gt;</description></item></channel></rss>
