<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>David Ziembicki on Infrastructure Architecture : Scripting</title><link>http://blogs.technet.com/davidzi/archive/tags/Scripting/default.aspx</link><description>Tags: Scripting</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Everything you ever wanted to know about VHDs</title><link>http://blogs.technet.com/davidzi/archive/2009/08/16/everything-you-ever-wanted-to-know-about-vhds.aspx</link><pubDate>Sun, 16 Aug 2009 18:33:49 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3273946</guid><dc:creator>davidzi</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/davidzi/comments/3273946.aspx</comments><wfw:commentRss>http://blogs.technet.com/davidzi/commentrss.aspx?PostID=3273946</wfw:commentRss><wfw:comment>http://blogs.technet.com/davidzi/rsscomments.aspx?PostID=3273946</wfw:comment><description>&lt;p&gt;The Virtual Hard Disk Getting Started Guide is 61 pages of great info outlining all the relevant scenarios, configurations, and options for using VHD files. This was release about 3 weeks ago but I missed it at the time due to training and TechReady9. The guide outlines basic scenarios like booting Windows 7 or Server 2008 R2 from VHD as well as more advanced scenarios like migrating at VHD between physical and virtual environments, etc. If nothing else this is worth a quick read of the table of contents because you will likely see things in there that you didn’t realize you could do with VHDs. &lt;/p&gt;  &lt;p&gt;Here is the official description of the doc:&lt;/p&gt;  &lt;p&gt;“Windows Server® 2008 R2 and Windows® 7 is the first version of Windows to provide native support for virtual hard disks (VHDs). This guide describes the scenarios that guided the development of this feature, detailed steps about how to employ the functionality (including image creation, deployment, and maintenance), and the associated tools, scripts, and APIs.”&lt;/p&gt;  &lt;p&gt;&lt;a title="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=d2afacbb-5af6-45c2-b275-932116e27b0b" href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=d2afacbb-5af6-45c2-b275-932116e27b0b"&gt;http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=d2afacbb-5af6-45c2-b275-932116e27b0b&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;!-- AddThis Share Button BEGIN --&gt;&lt;SCRIPT type=text/javascript&gt;var addthis_pub="ziembd";&lt;/SCRIPT&gt;&lt;a onmouseover="return addthis_open(this, &amp;#39;&amp;#39;, &amp;#39;[URL]&amp;#39;, &amp;#39;[TITLE]&amp;#39;)" onmouseout="addthis_close()" onclick="return addthis_sendto()" href="http://www.addthis.com/bookmark.php?v=20" mce_href="http://www.addthis.com/bookmark.php?v=20"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" alt="Bookmark and Share" src="http://s7.addthis.com/static/btn/lg-share-en.gif" width="125" height="16" mce_src="http://s7.addthis.com/static/btn/lg-share-en.gif" /&gt;&lt;/a&gt; &lt;SCRIPT type="text/javascript" src="http://s7.addthis.com/js/200/addthis_widget.js" mce_src="http://s7.addthis.com/js/200/addthis_widget.js"&gt;&lt;/SCRIPT&gt;&lt;!-- AddThis Share Button END --&gt;&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3273946" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/davidzi/archive/tags/Scripting/default.aspx">Scripting</category><category domain="http://blogs.technet.com/davidzi/archive/tags/Virtualization/default.aspx">Virtualization</category><category domain="http://blogs.technet.com/davidzi/archive/tags/Hyper-V/default.aspx">Hyper-V</category><category domain="http://blogs.technet.com/davidzi/archive/tags/Windows+7/default.aspx">Windows 7</category><category domain="http://blogs.technet.com/davidzi/archive/tags/Desktop+Virtualization/default.aspx">Desktop Virtualization</category><category domain="http://blogs.technet.com/davidzi/archive/tags/VDI/default.aspx">VDI</category><category domain="http://blogs.technet.com/davidzi/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category></item><item><title>Dynamically Provisioning Customized Virtual Machines with VMM</title><link>http://blogs.technet.com/davidzi/archive/2009/06/30/dynamically-provisioning-customized-virtual-machines-with-vmm.aspx</link><pubDate>Wed, 01 Jul 2009 02:46:07 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3260197</guid><dc:creator>davidzi</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/davidzi/comments/3260197.aspx</comments><wfw:commentRss>http://blogs.technet.com/davidzi/commentrss.aspx?PostID=3260197</wfw:commentRss><wfw:comment>http://blogs.technet.com/davidzi/rsscomments.aspx?PostID=3260197</wfw:comment><description>&lt;p&gt;There’s a good &lt;a href="http://blogs.technet.com/chrad/archive/2009/06/30/scvmm-sample-unattend-xml-for-windows-server-2008-r2.aspx" target="_blank"&gt;technical post&lt;/a&gt; over on Chris Adam’s blog about how to dynamically provision customized virtual machines by using System Center Virtual Machine Manager and unattend.xml. The unattend.xml file is used in combination with a sysprep’d image and applies customization (things like computer name, installed roles, etc) that are specified in the XML file. Chris’s post explains how this can be done very easily in VMM.&lt;/p&gt;  &lt;p&gt;This post was timely as I have been working on some unattended installations and other automation for a customer I am working with. With all the focus on the back and forth with competitors at the virtualization layer, it almost seems like the workload and configuration &lt;strong&gt;inside&lt;/strong&gt; the VM is “getting no respect”. &lt;/p&gt;  &lt;p&gt;In any event, the unattended installation realm can be intimidating at first. There are multiple ways of accomplishing most tasks, there is an enormous amount of things in Windows that can be customized, etc. Microsoft makes a large number of resources available such as the &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=94bb6e34-d890-4932-81a5-5b50c657de08&amp;amp;DisplayLang=en" target="_blank"&gt;Windows Automated Installation Kit&lt;/a&gt;, &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=3BD8561F-77AC-4400-A0C1-FE871C461A89&amp;amp;displaylang=en" target="_blank"&gt;Microsoft Deployment Toolkit&lt;/a&gt;, etc. There are beta updates to these for Win7, R2, etc. that can be found on &lt;a href="http://www.bing.com/" target="_blank"&gt;Bing.com&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;For a very detailed treatment on all of these topics, check out the &lt;a href="http://www.windowsnetworking.com/articles_tutorials/Deploying-Vista-Understanding-Windows-AIK.html" target="_blank"&gt;Deploying Vista&lt;/a&gt; series over on WindowsNetworking.com Most of the content is the same for Windows 2008 servers as well. This &lt;a href="http://technet.microsoft.com/en-us/library/cc721929(WS.10).aspx" target="_blank"&gt;article on Technet&lt;/a&gt; is quick and direct step-by-step guide for a basic automated installation. Between the info Chris provided and some of these resources, you’ll be well on your way to dynamic VM provisioning.&lt;/p&gt;  &lt;br /&gt;&lt;!-- AddThis Share Button BEGIN --&gt;&lt;script type="text/javascript"&gt;var addthis_pub="ziembd";&lt;/script&gt;&lt;a onmouseover="return addthis_open(this, &amp;#39;&amp;#39;, &amp;#39;[URL]&amp;#39;, &amp;#39;[TITLE]&amp;#39;)" onmouseout="addthis_close()" onclick="return addthis_sendto()" href="http://www.addthis.com/bookmark.php?v=20"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px" alt="Bookmark and Share" src="http://s7.addthis.com/static/btn/lg-share-en.gif" width="125" height="16" /&gt;&lt;/a&gt;&lt;script type="text/javascript" src="http://s7.addthis.com/js/200/addthis_widget.js"&gt;&lt;/script&gt; &lt;!-- AddThis Share Button END --&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3260197" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/davidzi/archive/tags/Scripting/default.aspx">Scripting</category><category domain="http://blogs.technet.com/davidzi/archive/tags/Virtualization/default.aspx">Virtualization</category><category domain="http://blogs.technet.com/davidzi/archive/tags/Cloud+Computing/default.aspx">Cloud Computing</category><category domain="http://blogs.technet.com/davidzi/archive/tags/Hyper-V/default.aspx">Hyper-V</category><category domain="http://blogs.technet.com/davidzi/archive/tags/System+Center/default.aspx">System Center</category><category domain="http://blogs.technet.com/davidzi/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category></item><item><title>Head-to-Head: Workflow Studio vs PowerShell for Automation</title><link>http://blogs.technet.com/davidzi/archive/2009/06/28/head-to-head-workflow-studio-vs-powershell-for-automation.aspx</link><pubDate>Sun, 28 Jun 2009 21:07:11 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3259414</guid><dc:creator>davidzi</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/davidzi/comments/3259414.aspx</comments><wfw:commentRss>http://blogs.technet.com/davidzi/commentrss.aspx?PostID=3259414</wfw:commentRss><wfw:comment>http://blogs.technet.com/davidzi/rsscomments.aspx?PostID=3259414</wfw:comment><description>&lt;p&gt;&lt;font color="#000000"&gt;Here’s an &lt;a href="http://community.citrix.com/blogs/citrite/richcr/2009/06/28/Head-to-Head+with+Brandon+Shell+and+Jason+Conger+on+Workflow+Studio+vs+PowerShell+for+Automation" target="_blank"&gt;interesting and slightly amusing mock debate&lt;/a&gt; between &lt;/font&gt;&lt;a href="http://community.citrix.com/blogs/citrite/richcr/2009/06/28/Head-to-Head+with+Brandon+Shell+and+Jason+Conger+on+Workflow+Studio+vs+PowerShell+for+Automation"&gt;&lt;font color="#000000"&gt;Brandon Shell and Jason Conger on Citrix’s Workflow Studio vs PowerShell for automation&lt;/font&gt;&lt;/a&gt;. If you aren’t familiar with it, here is the description of what &lt;a href="http://citrix.com/English/ps2/products/product.asp?contentID=1297816&amp;amp;ntref=hp_nav_US" target="_blank"&gt;Workflow Studio&lt;/a&gt; is:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;“Citrix Workflow Studio™ is an infrastructure process automation platform that enables you to transform your datacenter into a dynamic delivery center.”&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;“Built on top of Windows PowerShell™ and Windows Workflow Foundation, Workflow Studio provides an easy-to-use, graphical interface for workflow composition that virtually eliminates scripting. Workflow Studio acts as the glue across the IT infrastructure allowing administrators to easily tie technology components together via workflows.”&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;The debate is amusing because in reality both guys understand that each has its place, one is a foundational component of the other, and the combination of the two can be extremely powerful. The core of the “debate” is one’s definition of automation: execution of atomic tasks with as little effort/code as possible (basic PowerShell) or event/workflow driven execution of multiple tasks with associated logic (advanced PowerShell and/or Workflow Studio). The first is an enabler for the latter. &lt;/p&gt;  &lt;p&gt;It’s been my opinion since Exchange 2007 and Virtual Machine Manager 2007 committed entirely to PowerShell and with the PowerShell team’s continued focus on simplicity and consistency, that this was the tipping point that was going to enable real automation and orchestration of IT infrastructures. Now with partners (Citrix) and competitors (VMware) alike building on and/or leveraging PowerShell, we’re going to see significant advancements in the state of the art this year.&amp;#160; &lt;/p&gt;  &lt;br /&gt;&lt;!-- AddThis Share Button BEGIN --&gt;&lt;script type="text/javascript"&gt;var addthis_pub="ziembd";&lt;/script&gt;&lt;a onmouseover="return addthis_open(this, &amp;#39;&amp;#39;, &amp;#39;[URL]&amp;#39;, &amp;#39;[TITLE]&amp;#39;)" onmouseout="addthis_close()" onclick="return addthis_sendto()" href="http://www.addthis.com/bookmark.php?v=20"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" alt="Bookmark and Share" src="http://s7.addthis.com/static/btn/lg-share-en.gif" width="125" height="16" /&gt;&lt;/a&gt;&lt;script type="text/javascript" src="http://s7.addthis.com/js/200/addthis_widget.js"&gt;&lt;/script&gt; &lt;!-- AddThis Share Button END --&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3259414" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/davidzi/archive/tags/Scripting/default.aspx">Scripting</category><category domain="http://blogs.technet.com/davidzi/archive/tags/Virtualization/default.aspx">Virtualization</category><category domain="http://blogs.technet.com/davidzi/archive/tags/Cloud+Computing/default.aspx">Cloud Computing</category><category domain="http://blogs.technet.com/davidzi/archive/tags/Hyper-V/default.aspx">Hyper-V</category><category domain="http://blogs.technet.com/davidzi/archive/tags/Datacenters/default.aspx">Datacenters</category><category domain="http://blogs.technet.com/davidzi/archive/tags/Citrix/default.aspx">Citrix</category><category domain="http://blogs.technet.com/davidzi/archive/tags/PowerShell/default.aspx">PowerShell</category></item><item><title>PowerShell Analyzer</title><link>http://blogs.technet.com/davidzi/archive/2007/01/19/powershell-analyzer.aspx</link><pubDate>Fri, 19 Jan 2007 15:23:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:602039</guid><dc:creator>davidzi</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/davidzi/comments/602039.aspx</comments><wfw:commentRss>http://blogs.technet.com/davidzi/commentrss.aspx?PostID=602039</wfw:commentRss><wfw:comment>http://blogs.technet.com/davidzi/rsscomments.aspx?PostID=602039</wfw:comment><description>&lt;P&gt;By now most of you have probably been exposed to PowerShell in one way or another. Like me, you probably realize how powerful it is and how important it is going to be to have a good understanding of it but you haven't had time to site down and really dig in to it. Of course a great resource is the PowerShell team's &lt;A class="" href="http://blogs.msdn.com/powershell/" target=_blank mce_href="http://blogs.msdn.com/powershell/"&gt;blog&lt;/A&gt;. Another great resource though is the PowerShell Analyzer. Here is the description from their website at &lt;A class="" href="http://www.powershellanalyzer.com/" target=_blank mce_href="http://www.powershellanalyzer.com/"&gt;http://www.powershellanalyzer.com/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"&lt;EM&gt;Powershell Analyzer is a rich interactive environment for Windows Powershell. Its goal is to be the powershell host of choice for IT professionals and system administrators. It has all the typical editor and IDE functionality that you would expect when working on a modern language, but it focuses on the real time interactive experience as if you were at the console, helping you compose the commands you want to use, and also giving you rich graphical visualization of the results."&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;There is a seven minute video that demonstrates a good bit of the features at this &lt;A class="" href="http://www.powershellanalyzer.com/demos/" mce_href="http://www.powershellanalyzer.com/demos/"&gt;link&lt;/A&gt;. Enjoy!&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=602039" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/davidzi/archive/tags/Scripting/default.aspx">Scripting</category></item><item><title>Controlling Printer Mappings via Group Policy &amp; Scripts</title><link>http://blogs.technet.com/davidzi/archive/2006/07/11/441151.aspx</link><pubDate>Tue, 11 Jul 2006 20:10:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:441151</guid><dc:creator>davidzi</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/davidzi/comments/441151.aspx</comments><wfw:commentRss>http://blogs.technet.com/davidzi/commentrss.aspx?PostID=441151</wfw:commentRss><wfw:comment>http://blogs.technet.com/davidzi/rsscomments.aspx?PostID=441151</wfw:comment><description>&lt;P&gt;&lt;FONT face=Arial&gt;A question came up this morning from a customer who wants to create a GPO that applies to a group of machines&amp;nbsp;and maps specific printers to those machines and does not allow logged on users to map additional printers to those machines or remove the already mapped printers.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;Unless running Windows Server 2003 R2, there isn't a specific GPO to map printers. In R2 with the Print Management console you can configure it to have a GPO map printers. It uses a combination of GPO and an executable to push printers by user or machine as described &lt;A href="http://technet2.microsoft.com/WindowsServer/en/Library/ab8d75f8-9b35-4e3e-a344-90d7799927231033.mspx?mfr=true"&gt;here&lt;/A&gt;. Absent that I’ve always done it via login script deployed via a GPO. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;In this case, the customer&amp;nbsp;wanted it scoped to certain machines so&amp;nbsp;we'd probably need to use a WMI filter on the GPO so it only runs the login script when the user is logging in to those machines. The sticking point is that a simple WMI filter query isn’t going to be able to query AD to see what OU the computer is in. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;A way around this would be to apply a machine startup script via GPO for those machines that creates an environment variable. Then have the user login script GPO with a WMI filter looking for that environment variable. If it’s there, run the GPO login script&amp;nbsp;to map printers, if not, don’t run. A little complicated but it’s really only 3 steps and a few lines of code. If WMI filtering isn’t available you could just have the login script check for the variable but it would run on all machines the user logs in to.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;The steps:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;1.&amp;nbsp;Machine startup script from GPO applied to desired computers creates an environment variable&lt;BR&gt;2.&amp;nbsp;User login script from GPO with a WMI Filter looking for the environment variable only runs if it’s there&lt;BR&gt;3.&amp;nbsp;Login script maps the appropriate printers&lt;BR&gt;4.&amp;nbsp;GPO (described below) disables user’s ability to add/delete printers&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;In the second half of the article below it outlines the GPO settings for disabling a user’s ability to both add and delete printers.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;&lt;A href="http://support.microsoft.com/?kbid=234270"&gt;http://support.microsoft.com/?kbid=234270&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;Following this methodology you should be able to mandate a set of printers that gets mapped on a machine and prohibit the user from changing the set. Of course this is much easier with Windows Server 2003 R2...&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=441151" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/davidzi/archive/tags/Scripting/default.aspx">Scripting</category></item></channel></rss>