<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://myitforum.com/cs2/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Maik Koster at myITforum.com</title><subtitle type="html">giving something back after taking a lot :-)</subtitle><id>http://myitforum.com/cs2/blogs/maikkoster/atom.aspx</id><link rel="alternate" type="text/html" href="http://myitforum.com/cs2/blogs/maikkoster/default.aspx" /><link rel="self" type="application/atom+xml" href="http://myitforum.com/cs2/blogs/maikkoster/atom.aspx" /><generator uri="http://communityserver.org" version="3.1.31113.47">Community Server</generator><updated>2011-05-12T11:12:46Z</updated><entry><title>Adding a generic search box to Teleriks ASP.Net MVC Grid</title><link rel="alternate" type="text/html" href="http://myitforum.com/cs2/blogs/maikkoster/archive/2012/04/26/adding-a-generic-search-box-to-teleriks-asp-net-mvc-grid.aspx" /><id>http://myitforum.com/cs2/blogs/maikkoster/archive/2012/04/26/adding-a-generic-search-box-to-teleriks-asp-net-mvc-grid.aspx</id><published>2012-04-26T07:13:00Z</published><updated>2012-04-26T07:13:00Z</updated><content type="html">&lt;p&gt;In the new version of the &lt;a href="http://mdtwebfrontend.codeplex.com/releases/view/86208" target="_blank"&gt;MDT Web FrontEnd&lt;/a&gt;, I make use of some components from &lt;a href="http://www.telerik.com/products/aspnet-mvc.aspx" target="_blank"&gt;Teleriks extensions for ASP.Net MVC&lt;/a&gt;. Especially the &lt;a href="http://www.telerik.com/products/aspnet-mvc/grid.aspx" target="_blank"&gt;grid&lt;/a&gt;, as it comes with all the necessary stuff like sorting, filtering, paging, etc. There is also a &lt;a href="http://www.telerik.com/purchase/faqs/aspnet-mvc.aspx" target="_blank"&gt;free/open source&lt;/a&gt; version available, that can easily be added to your own projects using NuGet. &lt;/p&gt;  &lt;p&gt;So enough marketing &lt;img style="border-bottom-style:none;border-left-style:none;border-top-style:none;border-right-style:none;" class="wlEmoticon wlEmoticon-winkingsmile" alt="Winking smile" src="http://myitforum.com/cs2/blogs/maikkoster/wlEmoticon-winkingsmile_107C6A8C.png" /&gt;, however, one of the things that I miss in the default implementation is the ability to have a single text box that can be used for searching. On default,&amp;nbsp; the grid adds the ability to search per column with different operators (contains, Begins with, Ends with, etc.). What is nice and enables some more complex searches. But it takes a couple more clicks to use them and pretty often I just want to type in some text and have it search over all content, maybe including columns that aren’t visible or even over content that isn’t even available to the grid at all.&lt;/p&gt;  &lt;p&gt;As I’ve seen a couple similar questions and requests about this, I thought it might be helpful to write down and publish a solution on how that could be implemented. I’ve published a working demo project to &lt;a href="http://www.telerik.com/community/code-library/aspnet-mvc/grid/generic-search-box-for-asp-net-mvc-grid.aspx" target="_blank"&gt;Teleriks Code library&lt;/a&gt; so that you can just Copy&amp;amp;Paste the stuff you need and implement it in your own projects. It’s based on the Default &lt;a href="http://www.asp.net/mvc" target="_blank"&gt;ASP.Net MVC 3 template&lt;/a&gt;. I just added the &lt;a href="http://nuget.org/packages/TelerikMvcExtensions" target="_blank"&gt;Telerik ASP.Net MVC extensions via NuGet&lt;/a&gt;. However it’s written in VB.Net, mainly as I prefer this language and also because there aren’t many examples in VB.Net. So be nice with me &lt;img style="border-bottom-style:none;border-left-style:none;border-top-style:none;border-right-style:none;" class="wlEmoticon wlEmoticon-smilewithtongueout" alt="Smile with tongue out" src="http://myitforum.com/cs2/blogs/maikkoster/wlEmoticon-smilewithtongueout_2501BA0A.png" /&gt;&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;p&gt;OK, let’s start. The first thing we need is a textbox, where we can type in the string we would like to search for.&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;GridSearch&amp;quot; &lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;/pre&gt;

&lt;p&gt;Now we need a controller action, that can take a search string and returns our objects based on that search string. Let’s call it &amp;quot;&lt;b&gt;_Select&lt;/b&gt;”&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&amp;lt;GridAction()&amp;gt;
&lt;span class="kwrd"&gt;Function&lt;/span&gt; _Select(&lt;span class="kwrd"&gt;Optional&lt;/span&gt; searchstring &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt; = &lt;span class="str"&gt;&amp;quot;&amp;quot;&lt;/span&gt;) &lt;span class="kwrd"&gt;As&lt;/span&gt; ActionResult

    &lt;span class="kwrd"&gt;Return&lt;/span&gt; View(&lt;span class="kwrd"&gt;New&lt;/span&gt; GridModel(Of ComputerIdentity)(context.GetAll(searchstring)))

&lt;span class="kwrd"&gt;End&lt;/span&gt; Function &lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;As you can see, we take an optional string (avoids dealing with nothing) and pass this string to a different function that returns our objects based on that string. How we implement this search, what properties etc. is completely up to ourselves and doesn’t really matter at the moment. In my case I just do a search about all properties/columns. Additionally we decorate this function with the “&lt;b&gt;GridAction&lt;/b&gt;” attribute and return a &lt;b&gt;GridModel&lt;/b&gt;. That’s Telerik specific and will just enable all the magic for sorting, paging, etc. I’m not digging deeper into this as its already well &lt;a href="http://demos.telerik.com/aspnet-mvc/grid" target="_blank"&gt;documented&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now all we need to do is hook into each call from the grid and add our custom search string to the list of parameters before they are send to our controller. For refresh, sorting, paging and filtering (yes, we could combine this with column based filtering), we can make use of the “&lt;b&gt;onDataBinding&lt;/b&gt;” event. This is the necessary code to have the Grid call a javascript function at runtime:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;.ClientEvents(&lt;span class="kwrd"&gt;Sub&lt;/span&gt;(Events)
                  Events.OnDataBinding(&lt;span class="str"&gt;&amp;quot;Grid_onDataBinding&amp;quot;&lt;/span&gt;)
              &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt;) _&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;and the corresponding javascript function&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;function&lt;/span&gt; Grid_onDataBinding(e) {
    &lt;span class="kwrd"&gt;var&lt;/span&gt; searchString = $(&lt;span class="str"&gt;&amp;#39;#GridSearch&amp;#39;&lt;/span&gt;).val();

    e.data = {
        SearchString: searchString
    };
}&lt;/pre&gt;

&lt;pre class="csharpcode"&gt;&amp;nbsp;&lt;/pre&gt;

&lt;p&gt;Here we just get any value from our search box and add it to the data sent to our action method. If the grid shall also support insert, update and delete operations, we need to hook into two additional events, as “&lt;b&gt;onDataBinding&lt;/b&gt;” isn’t called for them. For Insert and Update its “&lt;b&gt;OnSave&lt;/b&gt;” and for Delete it’s “&lt;b&gt;OnDelete&lt;/b&gt;”. For our purposes, we can target them to a single function. Let’s call it “&lt;b&gt;Grid_onChange&lt;/b&gt;”:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;.ClientEvents(&lt;span class="kwrd"&gt;Sub&lt;/span&gt;(events)
                  events.OnDataBinding(&lt;span class="str"&gt;&amp;quot;Grid_onDataBinding&amp;quot;&lt;/span&gt;)
                  events.OnDelete(&lt;span class="str"&gt;&amp;quot;Grid_onChange&amp;quot;&lt;/span&gt;)
                  events.OnSave(&lt;span class="str"&gt;&amp;quot;Grid_onChange&amp;quot;&lt;/span&gt;)
              &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt;)&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;and the corresponding Javascript function&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;function&lt;/span&gt; Grid_onChange(e) {
    &lt;span class="kwrd"&gt;var&lt;/span&gt; searchString = $(&lt;span class="str"&gt;&amp;#39;#GridSearch&amp;#39;&lt;/span&gt;).val();

    e.values.SearchString = searchString;
} &lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;As you can see, there is a small difference in the way how we add the search string information, as we add it to the list of values this time. This would actually be enough to get it working. If we type anything in the search box and click on the grid to refresh, sort, whatever, it would immediately filter the results. We could also add a search button to have it explicitly filter the results. But how about a nicer solution? I want it to automatically filter the values, whenever someone types something in there. We could hook into the &lt;b&gt;onChange&lt;/b&gt; event of the textbox, but that doesn’t cover all possible scenarios. Let’s try a different approach. &lt;/p&gt;

&lt;p&gt;We define a local variable in our Javascript, that stores the search text that has been used the last time the grid has been updated. Now we just need to regularly check if that value differs from the value in the textbox and if so, force the Grid to refresh.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;var&lt;/span&gt; OldSearchValue = &lt;span class="str"&gt;&amp;#39;&amp;#39;&lt;/span&gt;;
&lt;span class="kwrd"&gt;var&lt;/span&gt; timeout = 200;

&lt;span class="kwrd"&gt;function&lt;/span&gt; checkSearchChanged() {
    &lt;span class="kwrd"&gt;var&lt;/span&gt; CurrentSearchValue = $(&lt;span class="str"&gt;&amp;#39;#GridSearch&amp;#39;&lt;/span&gt;).val();

    &lt;span class="kwrd"&gt;if&lt;/span&gt; (CurrentSearchValue != OldSearchValue) {
        OldSearchValue = CurrentSearchValue;
        $(&lt;span class="str"&gt;&amp;#39;#GridComputers&amp;#39;&lt;/span&gt;).data(&lt;span class="str"&gt;&amp;#39;tGrid&amp;#39;&lt;/span&gt;).ajaxRequest();
    } &lt;span class="kwrd"&gt;else&lt;/span&gt; {
        setTimeout(checkSearchChanged, timeout);
    }
} &lt;/pre&gt;

&lt;p&gt;This function will ensure, that if the text in the search box has changed, it will force the grid to update the data. If not, it will call itself again after the specified timeout to check for changes again. I use 200 ms which “feels” like almost immediately but just tweak it to whatever feels appropriate to you.&lt;/p&gt;

&lt;p&gt;Now we need to initiate this function at least one time, so it can call itself after that. The most appropriate time for this is, when the grid has finished loading its data for the first time. For this, we have another Client event, we could hook into called “&lt;b&gt;onComplete&lt;/b&gt;”. This will also ensure, that it re-starts this process every time it has been updated. So our Client events definition now looks like&lt;/p&gt;

&lt;pre class="csharpcode"&gt;.ClientEvents(&lt;span class="kwrd"&gt;Sub&lt;/span&gt;(events)
                  events.OnDataBinding(&lt;span class="str"&gt;&amp;quot;Grid_onDataBinding&amp;quot;&lt;/span&gt;)
                  events.OnDelete(&lt;span class="str"&gt;&amp;quot;Grid_onChange&amp;quot;&lt;/span&gt;)
                  events.OnSave(&lt;span class="str"&gt;&amp;quot;Grid_onChange&amp;quot;&lt;/span&gt;)
                  events.OnComplete(&lt;span class="str"&gt;&amp;quot;Grid_onComplete&amp;quot;&lt;/span&gt;)
              &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt;) &lt;/pre&gt;

&lt;p&gt;and the Javascript function&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;function&lt;/span&gt; Grid_onComplete(e) {
    setTimeout(checkSearchChanged, timeout);
} &lt;/pre&gt;

&lt;p&gt;Now to make it pretty, I want to have the search box within the Toolbar on top of the grid. Currently the grid doesn’t allow you to mix standard buttons like “&lt;b&gt;Insert&lt;/b&gt;” with a custom template to add a textbox. So let’s use some &lt;a href="http://jquery.com/" target="_blank"&gt;jQuery&lt;/a&gt; magic here and simply move the textbox to the toolbar. Normally one would use the Page “load” or “ready“ event, but if you get the grid dynamically via AJAX call, that might not work. Instead we will use the “O&lt;b&gt;nLoad&lt;/b&gt;” event of the Grid, that gets called when the grid itself is ready. &lt;/p&gt;

&lt;pre class="csharpcode"&gt;.ClientEvents(&lt;span class="kwrd"&gt;Sub&lt;/span&gt;(events)
                  events.OnDataBinding(&lt;span class="str"&gt;&amp;quot;Grid_onDataBinding&amp;quot;&lt;/span&gt;)
                  events.OnDelete(&lt;span class="str"&gt;&amp;quot;Grid_onChange&amp;quot;&lt;/span&gt;)
                  events.OnSave(&lt;span class="str"&gt;&amp;quot;Grid_onChange&amp;quot;&lt;/span&gt;)
                  events.OnComplete(&lt;span class="str"&gt;&amp;quot;Grid_onComplete&amp;quot;&lt;/span&gt;)
                  events.OnLoad(&lt;span class="str"&gt;&amp;quot;Grid_onLoad&amp;quot;&lt;/span&gt;)
              &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt;)&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;and the Javascript function&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;function&lt;/span&gt; Grid_onLoad(e) {
    $(&lt;span class="str"&gt;&amp;#39;#GridSearch&amp;#39;&lt;/span&gt;).addClass(&lt;span class="str"&gt;&amp;#39;search&amp;#39;&lt;/span&gt;).appendTo($(&lt;span class="str"&gt;&amp;#39;#GridComputers &amp;gt; .t-toolbar.t-grid-toolbar.t-grid-top&amp;#39;&lt;/span&gt;));
} &lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I also add a custom class “&lt;b&gt;search&lt;/b&gt;” to the textbox, so that we can configure a “&lt;b&gt;float: right;&lt;/b&gt;” via CSS. This will move it nicely to the right of the toolbar, without to interfere with any of the other buttons in the toolbar. If there is no button in the toolbar, the toolbar won’t be rendered at all and we would be able to move the search box then. In this case just add a custom button to it as a placeholder. And instead of moving the textbox, we replace the placeholder with it. The final view could now look like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/image_76A8345C.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" alt="image" src="http://myitforum.com/cs2/blogs/maikkoster/image_thumb_477648C5.png" border="0" width="605" height="189" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is just an initial implementation that can be extended in a lot of ways. As mentioned, a sample project, where you can see all this in action, has been published on &lt;a href="http://www.telerik.com/community/code-library/aspnet-mvc/grid/generic-search-box-for-asp-net-mvc-grid.aspx" target="_blank"&gt;Teleriks Code library&lt;/a&gt;. It also contains the methods that implement the same for Insert, Update and Delete. And in case you don’t want to download it and just want to see all samples above at once, here the full source of the view. It’s based on a list of computers that will be generated at runtime:&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&amp;lt;script type=&lt;span class="str"&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt;&amp;gt;
    &lt;span class="kwrd"&gt;var&lt;/span&gt; OldSearchValue = &lt;span class="str"&gt;&amp;#39;&amp;#39;&lt;/span&gt;;
    &lt;span class="kwrd"&gt;var&lt;/span&gt; timeout = 100;

    &lt;span class="rem"&gt;// Called when the Grid has finished its initial load&lt;/span&gt;
    &lt;span class="kwrd"&gt;function&lt;/span&gt; Grid_onLoad(e) {
        &lt;span class="rem"&gt;// Move Search Box into toolbar and add &amp;quot;search&amp;quot; class&lt;/span&gt;
        $(&lt;span class="str"&gt;&amp;#39;#GridSearch&amp;#39;&lt;/span&gt;).addClass(&lt;span class="str"&gt;&amp;#39;search&amp;#39;&lt;/span&gt;).appendTo($(&lt;span class="str"&gt;&amp;#39;#GridComputers &amp;gt; .t-toolbar.t-grid-toolbar.t-grid-top&amp;#39;&lt;/span&gt;));
    }

    &lt;span class="rem"&gt;// Called each time the Grid has been updated (paging/sorting/filtering)&lt;/span&gt;
    &lt;span class="rem"&gt;// re-establish Timeout method&lt;/span&gt;
    &lt;span class="kwrd"&gt;function&lt;/span&gt; Grid_onComplete(e) {
        setTimeout(checkSearchChanged, timeout);
    }


    &lt;span class="rem"&gt;// Called each time the grid is bound to a new query&lt;/span&gt;
    &lt;span class="rem"&gt;// Pass search box text to controller&lt;/span&gt;
    &lt;span class="kwrd"&gt;function&lt;/span&gt; Grid_onDataBinding(e) {
        &lt;span class="kwrd"&gt;var&lt;/span&gt; searchString = $(&lt;span class="str"&gt;&amp;#39;#GridSearch&amp;#39;&lt;/span&gt;).val();

        e.data = {
            SearchString: searchString
        };
    }


    &lt;span class="rem"&gt;// Called each time the grid has changed (Add/Update/Delete)&lt;/span&gt;
    &lt;span class="rem"&gt;// Pass search box text to controller&lt;/span&gt;
    &lt;span class="kwrd"&gt;function&lt;/span&gt; Grid_onChange(e) {
        &lt;span class="kwrd"&gt;var&lt;/span&gt; searchString = $(&lt;span class="str"&gt;&amp;#39;#GridSearch&amp;#39;&lt;/span&gt;).val();

        e.values.SearchString = searchString;
    }

    &lt;span class="rem"&gt;// Checks regularly if the search box has changed&lt;/span&gt;
    &lt;span class="rem"&gt;// Requests a Grid update on any change&lt;/span&gt;
    &lt;span class="kwrd"&gt;function&lt;/span&gt; checkSearchChanged() {
        &lt;span class="kwrd"&gt;var&lt;/span&gt; CurrentSearchValue = $(&lt;span class="str"&gt;&amp;#39;#GridSearch&amp;#39;&lt;/span&gt;).val();

        &lt;span class="kwrd"&gt;if&lt;/span&gt; (CurrentSearchValue != OldSearchValue) {
            OldSearchValue = CurrentSearchValue;
            $(&lt;span class="str"&gt;&amp;quot;#GridComputers&amp;quot;&lt;/span&gt;).data(&lt;span class="str"&gt;&amp;quot;tGrid&amp;quot;&lt;/span&gt;).ajaxRequest();
        } &lt;span class="kwrd"&gt;else&lt;/span&gt; {
            setTimeout(checkSearchChanged, timeout);
        }
    }
&amp;lt;/script&amp;gt;&lt;/pre&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;GridSearch&amp;quot; &lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre class="csharpcode"&gt;&amp;lt;%: Html.Telerik _
        .Grid(Of ComputerIdentity)() _
        .Name(&lt;span class="str"&gt;&amp;quot;GridComputers&amp;quot;&lt;/span&gt;) _
        .DataKeys(&lt;span class="kwrd"&gt;Function&lt;/span&gt;(key) key.Add(&lt;span class="kwrd"&gt;Function&lt;/span&gt;(computer) computer.ID)) _
        .DataBinding(&lt;span class="kwrd"&gt;Sub&lt;/span&gt;(binding)
                         binding.Ajax.&lt;span class="kwrd"&gt;Select&lt;/span&gt;(&lt;span class="str"&gt;&amp;quot;_Select&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;Home&amp;quot;&lt;/span&gt;)
                         binding.Ajax.Insert(&lt;span class="str"&gt;&amp;quot;_Insert&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;Home&amp;quot;&lt;/span&gt;)
                         binding.Ajax.Update(&lt;span class="str"&gt;&amp;quot;_Update&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;Home&amp;quot;&lt;/span&gt;)
                         binding.Ajax.Delete(&lt;span class="str"&gt;&amp;quot;_Delete&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;Home&amp;quot;&lt;/span&gt;)
                     &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt;) _
        .ClientEvents(&lt;span class="kwrd"&gt;Sub&lt;/span&gt;(events)
                          events.OnLoad(&lt;span class="str"&gt;&amp;quot;Grid_onLoad&amp;quot;&lt;/span&gt;)
                          events.OnComplete(&lt;span class="str"&gt;&amp;quot;Grid_onComplete&amp;quot;&lt;/span&gt;)
                          events.OnDataBinding(&lt;span class="str"&gt;&amp;quot;Grid_onDataBinding&amp;quot;&lt;/span&gt;)
                          events.OnDelete(&lt;span class="str"&gt;&amp;quot;Grid_onChange&amp;quot;&lt;/span&gt;)
                          events.OnSave(&lt;span class="str"&gt;&amp;quot;Grid_onChange&amp;quot;&lt;/span&gt;)
                      &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt;) _
        .Editable(&lt;span class="kwrd"&gt;Sub&lt;/span&gt;(editing)
                      editing.DisplayDeleteConfirmation(&lt;span class="kwrd"&gt;True&lt;/span&gt;)
                      editing.Mode(GridEditMode.PopUp)
                  &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt;) _
        .Columns(&lt;span class="kwrd"&gt;Sub&lt;/span&gt;(columns)
                     columns.Bound(&lt;span class="kwrd"&gt;Function&lt;/span&gt;(computer) computer.Name)
                     columns.Bound(&lt;span class="kwrd"&gt;Function&lt;/span&gt;(computer) computer.Description).Hidden(&lt;span class="kwrd"&gt;True&lt;/span&gt;)
                     columns.Bound(&lt;span class="kwrd"&gt;Function&lt;/span&gt;(computer) computer.SerialNumber)
                     columns.Bound(&lt;span class="kwrd"&gt;Function&lt;/span&gt;(computer) computer.MACAddress)
                     columns.Bound(&lt;span class="kwrd"&gt;Function&lt;/span&gt;(computer) computer.AssetTag).Hidden(&lt;span class="kwrd"&gt;True&lt;/span&gt;)
                     columns.Bound(&lt;span class="kwrd"&gt;Function&lt;/span&gt;(computer) computer.UUID).Hidden(&lt;span class="kwrd"&gt;True&lt;/span&gt;)
                     columns.Command(&lt;span class="kwrd"&gt;Sub&lt;/span&gt;(command)
                                        command.Edit.ButtonType(GridButtonType.ImageAndText)
                                        command.Delete.ButtonType(GridButtonType.ImageAndText)
                                     &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt;).IncludeInContextMenu(&lt;span class="kwrd"&gt;False&lt;/span&gt;)
                 &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt;) _
        .ColumnContextMenu _
        .Pageable(&lt;span class="kwrd"&gt;Sub&lt;/span&gt;(paging)
                      paging.PageSize(20)
                  &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt;) _
        .Sortable(&lt;span class="kwrd"&gt;Sub&lt;/span&gt;(sorting)
                      sorting.OrderBy(&lt;span class="kwrd"&gt;Sub&lt;/span&gt;(OrderBy)
                                          OrderBy.Add(&lt;span class="kwrd"&gt;Function&lt;/span&gt;(computer) computer.Name)
                                      &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt;)
                  &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt;) _
        .ToolBar(&lt;span class="kwrd"&gt;Sub&lt;/span&gt;(toolbar)
                     toolbar.Insert()
                 &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt;)
%&amp;gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;img src="http://myitforum.com/cs2/aggbug.aspx?PostID=161045" width="1" height="1"&gt;</content><author><name>maikkoster</name><uri>http://myitforum.com/cs2/members/maikkoster.aspx</uri></author><category term="Frontend" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Frontend/default.aspx" /><category term="Development" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Development/default.aspx" /><category term="JavaScript" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/JavaScript/default.aspx" /><category term="Telerik" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Telerik/default.aspx" /><category term="jQuery" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/jQuery/default.aspx" /></entry><entry><title>MDT Web FrontEnd Beta 2.0.2 published – Call for Help !</title><link rel="alternate" type="text/html" href="http://myitforum.com/cs2/blogs/maikkoster/archive/2012/04/20/mdt-web-frontend-beta-2-0-2-published-call-for-help.aspx" /><id>http://myitforum.com/cs2/blogs/maikkoster/archive/2012/04/20/mdt-web-frontend-beta-2-0-2-published-call-for-help.aspx</id><published>2012-04-20T14:42:23Z</published><updated>2012-04-20T14:42:23Z</updated><content type="html">&lt;p&gt;I just released &lt;a href="http://mdtwebfrontend.codeplex.com/releases/view/86208" target="_blank"&gt;Beta 2.0.2 of the MDT Web FrontEnd&lt;/a&gt;. As promised, I will keep on publishing new releases in short cycles, so you can have bug fixes and new features as soon as possible.&lt;/p&gt;  &lt;p&gt;This it going to be a very important update and I urge you to &lt;a href="http://mdtwebfrontend.codeplex.com/releases/view/86208" target="_blank"&gt;download Version 2.0.2&lt;/a&gt; as soon as possible, as it contains a whole bunch of fixes. Especially the MDT Database configuration, ConfigMgr Discovery and Active Directory Site discovery were pretty flaky if using an Internet Explorer &amp;lt; 9. IE9 and FireFox were and are working fine.&lt;/p&gt;  &lt;p&gt;If upgrading from 2.0.1 be sure to also replace the web.config file (normally you can leave the web.config file as it just contains some configuration information and by keeping it, you will also keep your database connection setting), as I had to add some breaking changes into it. I will publish a separate post on How To upgrade those versions pretty soon.&lt;/p&gt;  &lt;p&gt;Yesterday &lt;a href="http://deploymentresearch.com/" target="_blank"&gt;Johan Arwidmark&lt;/a&gt; and &lt;a href="http://deploymentbunny.com/" target="_blank"&gt;Mikael Nystrom&lt;/a&gt; presented their session “Why You Should Integrate Microsoft Deployment Toolkit 2012 with Configuration Manager 2012” at MMS 2012. It was one of the best sessions I’ve seen for a while. If you haven’t had the chance to attend it in person, just sit down and watch this session On-Demand on &lt;a href="https://vts.inxpo.com/scripts/Server.nxp?LASCmd=L:0&amp;amp;AI=1&amp;amp;InitialDisplay=1&amp;amp;ClientBrowser=0&amp;amp;ShowKey=8751" target="_blank"&gt;Digital MMS&lt;/a&gt; (search for “Arwidmark” or “Nystrom”). You might recognize something at the end.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;As you can see on the &lt;a href="http://mdtwebfrontend.codeplex.com" target="_blank"&gt;FrontEnd&lt;/a&gt;, my UI skills aren’t really, hm .. well .. . Let’s keep it at that. I would like to ask for some help on the UI part. So if you are good at designing frontends or simply have a liking for UI and aren’t at war with CSS, I really would appreciate, if you could support this project. Please contact me. &lt;/p&gt;  &lt;p&gt;Additionally, I would also need some of you, that are willing to translate the FrontEnd into different languages. It currently supports English, German, French, Dutch, Swedish and Russian (Localization will be enabled in one of the next Beta versions). So if you think it should be available in another language, and you can also master that language, please feel free to contact me.&lt;/p&gt;  &lt;p&gt;Finally, I also need some help on &lt;a href="http://mdtwebfrontend.codeplex.com/documentation" target="_blank"&gt;documentation&lt;/a&gt;. With this new version and the short release cycles, there is a real need on creating/updating&amp;#160; documentation for the FrontEnd on how different things are working. Again, if you would like to support this project, and think that this would be something you could do, please don’t hesitate to contact me.&lt;/p&gt;  &lt;p&gt;For all the above please contact me either via “Maik DOT Koster AT gmx DOT de” or via CodePlex. If you want to submit a problem/bug or request a feature, please file it on CodePlex (&lt;a href="http://mdtwebfrontend.codeplex.com/discussions" target="_blank"&gt;Discussions&lt;/a&gt;&amp;#160; - &lt;a href="http://mdtwebfrontend.codeplex.com/workitem/list/basic" target="_blank"&gt;Issue Tracker&lt;/a&gt;). That makes it easier to keep track.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Thanks to all who are using and testing this FrontEnd. Please keep testing the feedback coming. &lt;/p&gt;&lt;img src="http://myitforum.com/cs2/aggbug.aspx?PostID=161018" width="1" height="1"&gt;</content><author><name>maikkoster</name><uri>http://myitforum.com/cs2/members/maikkoster.aspx</uri></author><category term="Microsoft Deployment" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Microsoft+Deployment/default.aspx" /><category term="SCCM" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/SCCM/default.aspx" /><category term="Frontend" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Frontend/default.aspx" /><category term="MDT 2012" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/MDT+2012/default.aspx" /></entry><entry><title>Installing the new MDT Web FrontEnd Beta</title><link rel="alternate" type="text/html" href="http://myitforum.com/cs2/blogs/maikkoster/archive/2012/04/18/installing-the-new-mdt-web-frontend-beta.aspx" /><id>http://myitforum.com/cs2/blogs/maikkoster/archive/2012/04/18/installing-the-new-mdt-web-frontend-beta.aspx</id><published>2012-04-17T23:12:03Z</published><updated>2012-04-17T23:12:03Z</updated><content type="html">&lt;p&gt;As written in my &lt;a href="http://myitforum.com/cs2/blogs/maikkoster/archive/2012/04/17/mdt-2012-released-mdt-web-frontend-version-2-first-beta-released.aspx" target="_blank"&gt;last Blog Post&lt;/a&gt;, the first Beta of the MDT Web FrontEnd Version 2 has just been published. If you plan to test this version (what I really would appreciate), keep in mind, that it’s a Beta version. It shouldn’t be used in production. It’s provided “AS IS”, you know the game.&lt;/p&gt;  &lt;p&gt;The Beta has been tested on Windows Server 2008 R2 and Windows Server 2008 64 and 32 Bit. The only real requirement is the .Net Framework 4.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Just follow these few steps, to get the Beta running:&lt;/p&gt;  &lt;p&gt;- &lt;a href="http://mdtwebfrontend.codeplex.com/releases/view/86208" target="_blank"&gt;Download the Beta Version from CodePlex&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;- Make sure that you unblock the file&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/image_1266DAF5.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_782671D0.png" width="350" height="125" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;- Extract the content of the zip file to a folder of your choice. I would recommend the Web Root of your web server (e.g. C:\Inetpub\wwwroot). If necessary, rename the folder to something more appropriate.&lt;/p&gt;  &lt;p&gt;- Open IIS Manager, I suggest to create a new application pool for the FrontEnd. Be sure to configure .Net Framework 4 for it. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/image_2462F8B5.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_3BADFD26.png" width="349" height="120" /&gt;&lt;/a&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/image_0B3778B0.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_69D7D313.png" width="259" height="236" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;- Make sure you set an appropriate user account for the application pool. It should have enough permission to access the MDT Database (or enough permission to create it, if it doesn’t exist already), connect to Active Directory to query for AD Sites, connect to ConfigMgr and also query some view in the ConfigMgr Database. You can also configure different accounts to be used later in the FrontEnd.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/SNAGHTML3783d01_6E6DDDCD.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="SNAGHTML3783d01" border="0" alt="SNAGHTML3783d01" src="http://myitforum.com/cs2/blogs/maikkoster/SNAGHTML3783d01_thumb_7297B592.png" width="551" height="456" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now expand the web root, right-click the folder and convert it to an application. If you extracted it to a different location, create a new application and point to this folder&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/image_6DF1850B.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_7A12FF32.png" width="366" height="224" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;- Make sure that Windows authentication is enabled, and anonymous Authentication is disabled.&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/SNAGHTML393dc7b_706A90FC.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="SNAGHTML393dc7b" border="0" alt="SNAGHTML393dc7b" src="http://myitforum.com/cs2/blogs/maikkoster/SNAGHTML393dc7b_thumb_0ED4D1E6.png" width="551" height="179" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now you should be able to open the MDT Web FrontEnd and see the welcome page.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/image_3EAF73A7.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_04C030BB.png" width="489" height="83" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you get an error message stating something like “The Web server is configured to not list the contents of this directory or something similar. It’s most likely, that the .Net Framework 4 hasn’t correctly registered with IIS.&lt;/p&gt;  &lt;p&gt;To register it again, just run the following command from an elevated prompt on a 64 Bit Windows:&lt;/p&gt;  &lt;p&gt;%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir&lt;/p&gt;  &lt;p&gt;Or this command on a 32 Bit version:&lt;/p&gt;  &lt;p&gt;%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -ir&lt;/p&gt;  &lt;p&gt;If you can’t find this path, check the %windir%\Microsoft.NET\Framework64 or %windir%\Microsoft.NET\Framework\ folder, as you might have a slightly different Framework version.&lt;/p&gt;  &lt;p&gt;After that, you should be able to open the web page.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Next step now should be to configure access to the MDT Database. For this click on “Configuration – MDT related settings”&lt;/p&gt;  &lt;p&gt;Type in the name of your Database server and click on “Save Changes”. The page should now reload and present you with a list of databases to choose from. If not, you might have a typo in the name or the account simply doesn’t have permission to access the Database server. Check the “Status” for more information.&lt;/p&gt;  &lt;p&gt;Now choose the appropriate Database (or type in a Name for a new database) and click on “Evaluate Database”. It will verify the version of the database. Now click on “Upgrade Database”, to run the database scripts, that will add all the Frontend extensions to an existing MDT Database, or even create a completely new database.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/SNAGHTML39f4a5b_186D1A4F.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="SNAGHTML39f4a5b" border="0" alt="SNAGHTML39f4a5b" src="http://myitforum.com/cs2/blogs/maikkoster/SNAGHTML39f4a5b_thumb_3BA9E927.png" width="597" height="648" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Make sure you check the “Enable enhanced features” option and Save the changes!&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Next step is to get the Active Directory Sites. Click on “Configuration – Active Directory Configuration”. Click on “Get AD Sites” to start the AD Site Discovery. Optionally specify the Domain to query, and the credentials to be used for this. The discovery will fill the grid further down the page. Use this to e.g. edit the name of the Location or mark some of them to be hidden from the frontend, when selecting AD sites.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/image_5C21030C.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_7729AC4D.png" width="554" height="467" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;Last step is to discover your ConfigMgr environment, if available. Click on “Configuration – SCCM Configuration”. Specify the name of your central ConfigMgr server, optionally define username and password, and click on “Get Primaries” to discover the ConfigMgr environment. It will now connect to each available primary and gather some information like SiteCode, Providerversion and configured database. You can edit this data later in the grid shown below:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myitforum.com/cs2/blogs/maikkoster/image_0D3017E0.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_03A7339D.png" width="595" height="452" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;That’s it. Now the FrontEnd is ready for use.&lt;/p&gt;  &lt;p&gt;As mentioned already, it’s Beta code, there is still some stuff to do. So please help by testing it, filing problems and making suggestions on how to make it even better.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://mdtwebfrontend.codeplex.com/releases/view/86208" target="_blank"&gt;Download the current Beta now from CodePlex&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;And please make use of the &lt;a href="http://mdtwebfrontend.codeplex.com/workitem/list/basic" target="_blank"&gt;Issue Tracker&lt;/a&gt; and the &lt;a href="http://mdtwebfrontend.codeplex.com/discussions" target="_blank"&gt;Discussions&lt;/a&gt; Forum.&lt;/p&gt;&lt;img src="http://myitforum.com/cs2/aggbug.aspx?PostID=160996" width="1" height="1"&gt;</content><author><name>maikkoster</name><uri>http://myitforum.com/cs2/members/maikkoster.aspx</uri></author><category term="Microsoft Deployment" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Microsoft+Deployment/default.aspx" /><category term="Frontend" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Frontend/default.aspx" /><category term="Database" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Database/default.aspx" /><category term="ConfigMgr" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/ConfigMgr/default.aspx" /><category term="MDT 2012" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/MDT+2012/default.aspx" /></entry><entry><title>MDT 2012 released - MDT Web FrontEnd Version 2 – First Beta released</title><link rel="alternate" type="text/html" href="http://myitforum.com/cs2/blogs/maikkoster/archive/2012/04/17/mdt-2012-released-mdt-web-frontend-version-2-first-beta-released.aspx" /><id>http://myitforum.com/cs2/blogs/maikkoster/archive/2012/04/17/mdt-2012-released-mdt-web-frontend-version-2-first-beta-released.aspx</id><published>2012-04-17T21:27:09Z</published><updated>2012-04-17T21:27:09Z</updated><content type="html">&lt;p&gt;A long time ago in a Deployment galaxy far, far away … only a few Jedi were left to fight the dark forces of manual operating system installations. They created powerful tools to support their fight and hardened them in tough battles against habit and ignorance. &lt;/p&gt;  &lt;p&gt;New young Jedis saw their heroic efforts, and joined their fight and over the years the light forces got stronger and stronger. Now its time for YOU to join.&lt;/p&gt;  &lt;p&gt;Today the Microsoft Deployment Toolkit 2012 has been released (Download at &lt;a title="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;=tm&amp;amp;id=25175" href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;=tm&amp;amp;id=25175"&gt;http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;=tm&amp;amp;id=25175&lt;/a&gt;). If you deploy Microsoft Operating Systems and don’t use this Toolkit, you are doing something wrong. &lt;img style="border-bottom-style:none;border-left-style:none;border-top-style:none;border-right-style:none;" class="wlEmoticon wlEmoticon-winkingsmile" alt="Winking smile" src="http://myitforum.com/cs2/blogs/maikkoster/wlEmoticon-winkingsmile_596338DF.png" /&gt;&lt;/p&gt;  &lt;p&gt;I really would love to be in Las Vegas right now and join you all at MMS 2012. But as I couldn’t make it, I had some time left to finally, after so many months of promising, publish the first public Beta of the new MDT Web FrontEnd Version 2 (&lt;a href="http://mdtwebfrontend.codeplex.com/releases/view/86208" target="_blank"&gt;Download at CodePlex&lt;/a&gt;).&lt;/p&gt;  &lt;p&gt;What started as some small extensions to Version 1 of the FrontEnd turned into a complete re-write to be able to keep it flexible enough for the future. It definitely took a lot more time as expected and I kept telling “It will be finished soon” for way to long. Thanks for your patience and support. It’s still not finished yet. But it’s ready enough to start some testing and it will give you a lot of new things that will help to ease your life:&lt;/p&gt;  &lt;p&gt;It will discover your ConfigMgr Primaries and allow you to search for Packages (ConfigMgr 2007/2012) and for Applications (ConfigMgr 2012). &lt;/p&gt;  &lt;p&gt;All lists now support free searching, sorting and paging. &lt;/p&gt;  &lt;p&gt;You will be able to define a MDT Location by Active Directory sites and not only by Gateways. &lt;/p&gt;  &lt;p&gt;You can assign Roles to Roles and by this create a Hierarchy of Roles to ease management of complex configurations.&lt;/p&gt;  &lt;p&gt;The page is theme able and localizable.&lt;/p&gt;  &lt;p&gt;And soon it will also support the MDT Monitoring for LTI and ZTI.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt; To point this out, it’s BETA Software! Don’t use it in production. Don’t expect it to be error free. It’s provided “AS IS”. &lt;/p&gt;  &lt;p&gt;If that doesn’t stop you, I really urge you to &lt;a href="http://mdtwebfrontend.codeplex.com/releases/view/86208" target="_blank"&gt;Download&lt;/a&gt; the software and start testing. I plan to release new versions in short cycles of 1-2 weeks to keep track and have a stable, feature-rich Final Release as soon as possible. So be sure to regularly get back to the &lt;a href="http://mdtwebfrontend.codeplex.com/releases/view/86208" target="_blank"&gt;CodePlex page&lt;/a&gt; for updates. Or even better, just subscribe for release notifications.&lt;/p&gt;  &lt;p&gt;If you experience any issues or problems, find some errors/bugs or would like to request a sadly missed feature, please report them on CodePlex at the &lt;a href="http://mdtwebfrontend.codeplex.com/workitem/list/basic" target="_blank"&gt;Issue Tracker&lt;/a&gt; or start a &lt;a href="http://mdtwebfrontend.codeplex.com/discussions" target="_blank"&gt;Discussion&lt;/a&gt;. I will respond to them as quick as possible.&lt;/p&gt;  &lt;p&gt;Expect a short instruction on how to install the Web FrontEnd Beta in the next Blog post coming soon. &lt;/p&gt;  &lt;p&gt;As always, I really appreciate some feedback (Yes I do!), so don’t hesitate to post your comments to CodePlex or just contact me directly. &lt;/p&gt;&lt;img src="http://myitforum.com/cs2/aggbug.aspx?PostID=160994" width="1" height="1"&gt;</content><author><name>maikkoster</name><uri>http://myitforum.com/cs2/members/maikkoster.aspx</uri></author><category term="Microsoft Deployment" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Microsoft+Deployment/default.aspx" /><category term="MDT" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/MDT/default.aspx" /><category term="Frontend" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Frontend/default.aspx" /><category term="ConfigMgr" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/ConfigMgr/default.aspx" /><category term="MDT 2012" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/MDT+2012/default.aspx" /></entry><entry><title>Versioning / Monitoring SCCM Task Sequences – Update for SCCM 2012</title><link rel="alternate" type="text/html" href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/11/10/versioning-monitoring-sccm-task-sequences-update-for-sccm-2012.aspx" /><id>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/11/10/versioning-monitoring-sccm-task-sequences-update-for-sccm-2012.aspx</id><published>2011-11-10T17:23:53Z</published><updated>2011-11-10T17:23:53Z</updated><content type="html">&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;</content><author><name>maikkoster</name><uri>http://myitforum.com/cs2/members/maikkoster.aspx</uri></author><category term="SCCM" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/SCCM/default.aspx" /><category term="SMS" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/SMS/default.aspx" /><category term="vbscript" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/vbscript/default.aspx" /><category term="Task Sequence" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Task+Sequence/default.aspx" /><category term="WMI" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/WMI/default.aspx" /><category term="ConfigMgr" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/ConfigMgr/default.aspx" /></entry><entry><title>2011 Microsoft MVP Award - Setup &amp; Deployment</title><link rel="alternate" type="text/html" href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/10/02/2011-microsoft-mvp-award-setup-amp-deployment.aspx" /><id>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/10/02/2011-microsoft-mvp-award-setup-amp-deployment.aspx</id><published>2011-10-02T18:06:06Z</published><updated>2011-10-02T18:06:06Z</updated><content type="html">&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;</content><author><name>maikkoster</name><uri>http://myitforum.com/cs2/members/maikkoster.aspx</uri></author></entry><entry><title>Mouse without Borders</title><link rel="alternate" type="text/html" href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/09/16/mouse-without-borders.aspx" /><id>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/09/16/mouse-without-borders.aspx</id><published>2011-09-16T09:06:20Z</published><updated>2011-09-16T09:06:20Z</updated><content type="html">&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;</content><author><name>maikkoster</name><uri>http://myitforum.com/cs2/members/maikkoster.aspx</uri></author><category term="kewl tool" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/kewl+tool/default.aspx" /></entry><entry><title>WSUS Offline Update – Installing Windows updates without an Internet connection and WSUS</title><link rel="alternate" type="text/html" href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/09/09/wsus-offline-update-installing-windows-updates-without-an-internet-connection-and-wsus.aspx" /><id>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/09/09/wsus-offline-update-installing-windows-updates-without-an-internet-connection-and-wsus.aspx</id><published>2011-09-09T12:47:56Z</published><updated>2011-09-09T12:47:56Z</updated><content type="html">&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;</content><author><name>maikkoster</name><uri>http://myitforum.com/cs2/members/maikkoster.aspx</uri></author><category term="WSUS Offline Update" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/WSUS+Offline+Update/default.aspx" /></entry><entry><title>Deployment Web service 7.3 - SCCM Client Center support</title><link rel="alternate" type="text/html" href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/08/30/deployment-web-service-7-3-sccm-client-center-support.aspx" /><id>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/08/30/deployment-web-service-7-3-sccm-client-center-support.aspx</id><published>2011-08-30T16:28:37Z</published><updated>2011-08-30T16:28:37Z</updated><content type="html">&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;</content><author><name>maikkoster</name><uri>http://myitforum.com/cs2/members/maikkoster.aspx</uri></author><category term="Webservice" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Webservice/default.aspx" /><category term="Microsoft Deployment" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Microsoft+Deployment/default.aspx" /><category term="SCCM" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/SCCM/default.aspx" /><category term="MDT" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/MDT/default.aspx" /></entry><entry><title>Deployment Web service 7.3 – Basic security</title><link rel="alternate" type="text/html" href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/08/30/deployment-web-service-7-3-basic-security.aspx" /><id>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/08/30/deployment-web-service-7-3-basic-security.aspx</id><published>2011-08-30T15:14:34Z</published><updated>2011-08-30T15:14:34Z</updated><content type="html">&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;</content><author><name>maikkoster</name><uri>http://myitforum.com/cs2/members/maikkoster.aspx</uri></author><category term="Webservice" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Webservice/default.aspx" /><category term="Microsoft Deployment" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Microsoft+Deployment/default.aspx" /><category term="SCCM" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/SCCM/default.aspx" /><category term="Active Directory" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Active+Directory/default.aspx" /><category term="MDT" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/MDT/default.aspx" /></entry><entry><title>Deployment Web service – Version 7.3 published</title><link rel="alternate" type="text/html" href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/08/30/deployment-web-service-version-7-3-published.aspx" /><id>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/08/30/deployment-web-service-version-7-3-published.aspx</id><published>2011-08-30T07:56:00Z</published><updated>2011-08-30T07:56:00Z</updated><content type="html">&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;</content><author><name>maikkoster</name><uri>http://myitforum.com/cs2/members/maikkoster.aspx</uri></author><category term="Webservice" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Webservice/default.aspx" /><category term="Microsoft Deployment" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Microsoft+Deployment/default.aspx" /><category term="SCCM" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/SCCM/default.aspx" /><category term="Active Directory" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Active+Directory/default.aspx" /><category term="MDT" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/MDT/default.aspx" /></entry><entry><title>TechNet Radio Interview</title><link rel="alternate" type="text/html" href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/06/20/technet-radio-interview.aspx" /><id>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/06/20/technet-radio-interview.aspx</id><published>2011-06-20T10:01:42Z</published><updated>2011-06-20T10:01:42Z</updated><content type="html">&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;</content><author><name>maikkoster</name><uri>http://myitforum.com/cs2/members/maikkoster.aspx</uri></author><category term="TechNet Radio" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/TechNet+Radio/default.aspx" /></entry><entry><title>New Stuff in MDT 2012 – native VHD support</title><link rel="alternate" type="text/html" href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/06/13/new-stuff-in-mdt-2012-native-vhd-support.aspx" /><id>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/06/13/new-stuff-in-mdt-2012-native-vhd-support.aspx</id><published>2011-06-13T07:45:53Z</published><updated>2011-06-13T07:45:53Z</updated><content type="html">&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;</content><author><name>maikkoster</name><uri>http://myitforum.com/cs2/members/maikkoster.aspx</uri></author><category term="MDT" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/MDT/default.aspx" /><category term="MDT 2012" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/MDT+2012/default.aspx" /><category term="VHD" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/VHD/default.aspx" /></entry><entry><title>Step-by-Step: Handling WMI Events permanently using VBScript</title><link rel="alternate" type="text/html" href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/05/30/step-by-step-handling-wmi-events-permanently-using-vbscript.aspx" /><id>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/05/30/step-by-step-handling-wmi-events-permanently-using-vbscript.aspx</id><published>2011-05-30T11:58:00Z</published><updated>2011-05-30T11:58:00Z</updated><content type="html">&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;</content><author><name>maikkoster</name><uri>http://myitforum.com/cs2/members/maikkoster.aspx</uri></author><category term="SCCM" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/SCCM/default.aspx" /><category term="SMS" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/SMS/default.aspx" /><category term="vbscript" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/vbscript/default.aspx" /><category term="WMI" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/WMI/default.aspx" /><category term="Step by Step" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Step+by+Step/default.aspx" /></entry><entry><title>Versioning / Monitoring SCCM Task Sequences</title><link rel="alternate" type="text/html" href="http://myitforum.com/cs2/blogs/maikkoster/archive/2011/05/12/versioning-monitoring-sccm-task-sequences.aspx" /><id>http://myitforum.com/cs2/blogs/maikkoster/archive/2011/05/12/versioning-monitoring-sccm-task-sequences.aspx</id><published>2011-05-12T09:12:46Z</published><updated>2011-05-12T09:12:46Z</updated><content type="html">&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;</content><author><name>maikkoster</name><uri>http://myitforum.com/cs2/members/maikkoster.aspx</uri></author><category term="SCCM" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/SCCM/default.aspx" /><category term="SMS" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/SMS/default.aspx" /><category term="vbscript" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/vbscript/default.aspx" /><category term="Task Sequence" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/Task+Sequence/default.aspx" /><category term="WMI" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/WMI/default.aspx" /><category term="ConfigMgr" scheme="http://myitforum.com/cs2/blogs/maikkoster/archive/tags/ConfigMgr/default.aspx" /></entry></feed>
