<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>christianwb</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/christianwb/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/christianwb/feed.xml</link>
    <description>System Center and App-V Fun...from an Automator&amp;#039;s Point of View</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:24:09 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Orchestrator Runbook Finder</title>
      <link>https://docs.microsoft.com/archive/blogs/christianwb/orchestrator-runbook-finder</link>
      <pubDate>Tue, 13 Sep 2016 15:20:52 GMT</pubDate>
      <dc:creator><![CDATA[ChristianWB]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/christianwb/?p=65</guid>
      <description><![CDATA[Once you have been working with Orchestrator for a long time, you may end up with different...]]></description>
      <content:encoded><![CDATA[Once you have been working with Orchestrator for a long time, you may end up with different hierarchies of folders where you have your Runbooks organized. Sometimes these are logical and easy to understand, and sometimes it can be very difficult to find the Runbook you need. Orchestrator does natively provide a search utility to help you find these Runbooks in the Orchestrator Web Console, and as an alternative, I have created a PowerShell script GUI to perform this search.

<strong>Web Console Search Utility</strong>

<a href="https://msdnshared.blob.core.windows.net/media/2016/09/webConsoleFilter.gif"><img width="566" height="249" class="alignnone  wp-image-105" alt="webConsoleFilter" src="https://msdnshared.blob.core.windows.net/media/2016/09/webConsoleFilter-300x132.gif" /></a>

My intuition suggested that this information would be easily found in the database, so I performed a web search and found <a href="https://automationnext.wordpress.com/2014/07/15/sql-query-to-get-absolute-path-of-all-orchestrator-runbooks/">https://automationnext.wordpress.com/2014/07/15/sql-query-to-get-absolute-path-of-all-orchestrator-runbooks/</a>. This blog provided a database query that provided about 80% of the information required. After poking through the database structure, I was able to add to this query to also return the Runbook names.

As an automation engineer, I found it easy to write the script to get the information: it took me about 45 minutes to not only figure out the database query, but to then add it to a PowerShell script to return the required information. GUIs are a whole different story though. After downloading and installing Visual Studio and referencing <a href="https://gallery.technet.microsoft.com/scriptcenter/PowerShell-GUI-dc224be6">Chris Conte’s content</a> on using an XAML file to create the form, I then worked to provide a front end GUI to the script I had already written. The following is the product created.

Two files are required for the script to work: an XAML file and a PS1 file. Basic instructions are to put the XAML and PS1 files in the same directory and execute the PS1 file with an account that has at minimum read rights to the Orchestrator database.  Once launched, you will see the following:

<strong>PowerShell Search Utility</strong>

<a href="https://msdnshared.blob.core.windows.net/media/2016/09/OrchSearcherLaunched.gif"><img width="562" height="277" class="alignnone wp-image-95" alt="OrchSearcherLaunched" src="https://msdnshared.blob.core.windows.net/media/2016/09/OrchSearcherLaunched-300x148.gif" /></a>

<strong>Note: The connection string is built dynamically using the Orchestrator SQL Server name and connects to the default database name Orchestrator. If your database is on a non-default instance, you may need to find the SQL port used by the instance and append the hostname with : and the port number: labsql:1433. If you have a non-default database name, the script will need to be edited.</strong>

After entering the hostname of the SQL server where the Orchestrator database resides and a search string, select the Search button. The script will return any Runbook name that contains that string along with the Orchestrator Designer folder path to where it exists.

Once you initiate Search and the data is returned, three more fields are available: the Save to File button, a text field to enter the file path, and a message label.

<a href="https://msdnshared.blob.core.windows.net/media/2016/09/OrchSearcherAfterSearch.gif"><img width="555" height="394" class="alignnone wp-image-85" alt="OrchSearcherAfterSearch" src="https://msdnshared.blob.core.windows.net/media/2016/09/OrchSearcherAfterSearch-300x213.gif" /></a>

The main reason I added the Save to File option is that when a lot of data is returned, you may not see it all in the form window. Having it in a file also makes it editable, selectable, etc.

Hope this is helpful to all. Please provide feedback on making it better. Happy automating!

References:

<a href="https://gallery.technet.microsoft.com/scriptcenter/PowerShell-GUI-dc224be6">https://gallery.technet.microsoft.com/scriptcenter/PowerShell-GUI-dc224be6</a>

<a href="https://automationnext.wordpress.com/2014/07/15/sql-query-to-get-absolute-path-of-all-orchestrator-runbooks/">https://automationnext.wordpress.com/2014/07/15/sql-query-to-get-absolute-path-of-all-orchestrator-runbooks/</a>

Included files: <a href="https://msdnshared.blob.core.windows.net/media/2016/09/Runbook-Searcher.zip">Runbook Searcher</a>]]></content:encoded>
    </item>
    <item>
      <title>SCCM Applications...even in 2007</title>
      <link>https://docs.microsoft.com/archive/blogs/christianwb/sccm-applications-even-in-2007</link>
      <pubDate>Mon, 16 Jun 2014 10:39:00 GMT</pubDate>
      <dc:creator><![CDATA[ChristianWB]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/christianwb/2014/06/16/sccm-applications-even-in-2007/</guid>
      <description><![CDATA[BLUF: Yes!&nbsp; I can create an application in SCCM 2007&hellip;I just can&rsquo;t target user...]]></description>
      <content:encoded><![CDATA[<p><b>BLUF: Yes!&nbsp; I can create an application in SCCM 2007&hellip;I just can&rsquo;t target user collections.</b></p>
<p><b>Configuration Manager 2012 Application Model</b></p>
<p>System Center Configuration Manager 2012 brought a new delivery method for software: Applications.&nbsp; Applications bring the intelligence of who\what needs the software from the collection to the Application.&nbsp; The two main differences between Packages and Applications are detection method and requirements (there are others).&nbsp; There is also the supersedence feature,&nbsp;and that can&nbsp;technically be covered here as well...but I will leave that to you to figure out.</p>
<p>The main feature I will discuss here is the detection method.&nbsp; I love this!&nbsp; The Application does a local check on the machine&nbsp;prior to taking an action.&nbsp; If&nbsp;it&nbsp;detects the software exists already, it takes no install action; and if&nbsp;the deployment type is uninstall, it only takes an action if it does detect it...all dynamically on the local machine not using possibly old data from software\hardware inventory.</p>
<p><b>How can I do this with Configuration Manager 2007?</b></p>
<p>Unfortunately I have still had the need to manage SCCM 2007 environments after being spoiled with this new delivery method in SCCM 2012.&nbsp;&nbsp;One delivery method that I have been using for years&nbsp;came to&nbsp;mind in the interim: Task Sequences.&nbsp; What, you say: those&nbsp;are for Operating System Delivery.&nbsp;Yes&nbsp;they are, but they can be used for so much more.&nbsp;They can be used for simple things like initiating a Software Updates cycle with an Install Software Updates task, or they can be used for small or complex application installs that may require a controlled restart between actions: something that packages do not handle well.</p>
<p><i>--On a quick aside, task sequences are also good for installing applications that include large data source size, as they automatically delete the content on completion.</i></p>
<p><b>Conditions</b></p>
<p>What task sequences bring to the table are conditions (on the Options tab of every task).&nbsp; These can be set to many things, but the important options for this scenario&nbsp;are file or folder&nbsp;information, registry settings, or even WMI.&nbsp; These conditions, like Applications, are verified locally on the machines prior to running the specified task.&nbsp; These conditions allow you to put the intelligence in the Task Sequence instead of in the collection.</p>
<p><em>--Applications bring the option to deploy to All Workstations; using this type of application deployment does the same as no action will take place unless the condition is true.</em></p>
<p><b>Install Example</b></p>
<p>For the installation of an application, one way (one of many ways) to check to see if an application with a specific version exists is to look at file properties.&nbsp; To show an example of how to check for two different criteria, we will look for the existence of an x86 version of Java on both x86 or x64 bit operating systems &ndash; since the uninstall string should be the same for both.&nbsp; To do this we need to use an <i>If statement</i> and select <i>Any condition</i>.&nbsp; At this point, now we select a file condition and browse to both %ProgramFiles% and %ProgramFiles(x86)% and to Java\bin\java.exe, separately.&nbsp; After selecting each file, we then have the option to only check for its existence, to check for a specific version, or other attributes of the file.&nbsp; In this case, we want to check for version, as we are getting ready to install a specific version and don&rsquo;t want to take any action if the application is already installed.&nbsp; We do this for both file locations.</p>
<p><b>Uninstall Example</b></p>
<p>When I uninstall an MSI based application, I generally use the syntax msiexec.exe /x &lt;ProductID&gt; /qn.&nbsp; So how do I know this command string (uninstall action) is required to be called?&nbsp; In an Application, I would point straight at the MSI and it detects the ProductID for me.&nbsp; In 2007, to detect the existence of the application prior to trying to uninstall it, I look for it in the registry:</p>
<p>HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\&lt;ProductID&gt; or</p>
<p>HKLM\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\&lt;ProductID&gt;</p>
<p>With this information, you can now use the registry condition to verify the software&rsquo;s existence prior to uninstalling it.&nbsp; In this case we can just look for the existence of the registry key prior to taking action.</p>
<p><b>Summary</b></p>
<p>This methodology is great for applications that have dependencies or ones that do not uninstall older versions of their software prior to installation of the current version: say Java for instance!&nbsp; Some people write complex scripts to uninstall older versions, where we can use Queries to find out what versions are installed on our networks, and create a task for each version: see my article on <a href="/b/christianwb/archive/2014/03/17/using-configmgr-application-model-to-uninstall-old-software.aspx">SCCM 2012 Uninstall Applications</a> for more pointers on this.</p>
<p>As I mentioned in my BLUF (which means bottom line up front, btw), the one downside of this method of application delivery is that you cannot target user collections.&nbsp; Since the feature was created for Operating System Deployment (a computer task), Microsoft did not provide the option to deploy (advertise) Task Sequences to users.&nbsp; This downside is pretty minor though...</p>
<p>As always....enjoy and keep on automating!!!</p>
<p></p>]]></content:encoded>
    </item>
    <item>
      <title>Creating Uninstall Applications (NOT packages) - SCCM 2012</title>
      <link>https://docs.microsoft.com/archive/blogs/christianwb/creating-uninstall-applications-not-packages-sccm-2012</link>
      <pubDate>Mon, 17 Mar 2014 18:31:00 GMT</pubDate>
      <dc:creator><![CDATA[ChristianWB]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/christianwb/2014/03/17/creating-uninstall-applications-not-packages-sccm-2012/</guid>
      <description><![CDATA[BLUF: Who said creating an application to JUST run a one line script could not be easy?!
Old...]]></description>
      <content:encoded><![CDATA[<p><b><span style="font-size:medium;">BLUF: Who said creating an application to JUST run a one line script could not be easy?!</span></b></p>
<p><b><span style="font-size:medium;">Old Software Cleanup</span></b></p>
<p>It is not uncommon to have a lot of old software (usually vulnerable to security risks) on your network.&nbsp; Some applications don&rsquo;t always uninstall older versions when installing newer versions, so cleaning up this software is important.</p>
<p>An uninstall script is usually a one liner.&nbsp; Creating Applications in Configuration Manager 2012 for scripts is generally a lot more work than just creating a non-content package to run a one-line script.&nbsp; Unfortunately you cannot use the supersedence feature of Configuration Manager Applications with packages.&nbsp; To use the supersedence feature in Applications, you need at minimum two things: Uninstall String, and Detection Method.&nbsp; With MSI installed applications, one piece of information is required to meet both of these requirements: Product ID or GUID.</p>
<p><b><span style="font-size:medium;">Preparations</span></b></p>
<ul>
<li>
<p>Find current versions of software on the network</p>
</li>
<li>
<p>Create base MSI application (any will do)</p>
</li>
<li>
<p>Create Uninstall applications<b><br /></b></p>
</li>
</ul>
<p><strong>Finding the software</strong></p>
<p>How do you know if you have more than one version of software on the network?&nbsp; I use queries (Monitoring-&gt;Queries) and usually return Display Name and Version with a query for Installed Applications.Display Name&nbsp;like %&lt;softwareName&gt;%.&nbsp; To make this&nbsp;process a little easier, I would suggest returning Product ID as well.&nbsp; This value will return a GUID for MSI installed applications.&nbsp; As all of us SCCM administrators know, this value is very important when looking for a way to uninstall an application (msiexec.exe /x {GUID} /qn).</p>
<p>I like to have my data in Excel when working with it.&nbsp; To do this, select one entry from the query results, select Ctrl-a to select all results, select Ctrl-c to copy the data, and select Ctrl-v to paste it into Excel.</p>
<p><b><i>Note: If the&nbsp;Product IDs returned are not GUIDs, more research will need to be done to collect the uninstall strings and detection methods for your software.&nbsp; Uninstall string is usually found in the registry in HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\&lt;ProductID&gt; and HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\&lt;ProductID&gt; for x64 systems.&nbsp; Examples of Detection Methods are file versions or registry settings.</i></b></p>
<p><b>Create Base MSI application</b></p>
<p>As the requirements indicate, the MSI needed for this step is not important.&nbsp; Once one MSI application is created (feel free to copy an existing one), there are just a few updates that need to be made to it to make it your base Uninstall Application.</p>
<p>Once you have created the MSI application, open the Properties window of the Application.&nbsp; Change the name to something like Uninstall Application Template on both the General Information and Application Catalog tabs.&nbsp; Then open the Properties of the Deployment Type from the Deployment Type tab.&nbsp; Change the Name of the existing DT to Uninstall &lt;application&gt;.&nbsp; On the Content tab, delete the contents of the Content location.&nbsp; On the Programs tab, change the Install program to dummy.msi as this is a required field, but we will not be using it.&nbsp; Select OK twice to close the Properties windows and save the new application.</p>
<p><b><b><span style="font-size:medium;">Application Creation</span></b></b></p>
<p><b>Create Uninstall Applications</b></p>
<p>This base MSI application can now be used to create the applications for uninstall.&nbsp; All we really need to change in the copied application is the Name for meaning, the Uninstall&nbsp;program for the correct action, and the Detection&nbsp;Rule Clause&nbsp;so that the installed application can be found for action.&nbsp; I am sure you can change names without instruction, so I will leave this to you.&nbsp; This is where the spreadsheet comes in nicely; just copy the GUID and get ready to paste in two to three places.&nbsp; Now all we have to do is create one uninstall application per old application.&nbsp; The first place to paste the GUID&nbsp;is in the Uninstall program, the second may or may not be the Product code field on the Programs tab (seen it without and with), and the last in the Detection Rule Clause on the Detection Method tab.&nbsp; Now we are ready to rid ourselves of this old software.</p>
<p><b>Setup Applications for Uninstall</b></p>
<p>On the Properties window of the Application, the last tab is Supersedence.&nbsp; This tab allows you to select an existing application to be superseded and there is a checkbox for Uninstall.&nbsp; Brilliant!Just enter each of the Uninstall applications, select the checkbox and be done.&nbsp; You don&rsquo;t even have to look for what computers need the old application removed.&nbsp; If the newest application targets a machine that has any version of the application installed, it will install the newest version and uninstall all older versions, per the supersedence rules. I have not verified, but I think that if the newest application is already installed, and the superseded applications are added post, they will still uninstall given the requirements of the application for install.</p>
<p><b>Summary</b></p>
<p>The applications that customers have sought most to uninstall are Java and Adobe products as they seem to just hang around; I&#39;ve even done VLC Player.&nbsp; This model has proven well to clean up your network.</p>
<p>If you are looking for an even easier way to keep your network clean, AppV 5.0 SP2 has brought an easy way to manage these same type of applications.&nbsp; My previous blog speaks about this: http://blogs.technet.com/b/christianwb/archive/2014/03/15/configmgr-2012-app-v-5-0-and-internet-explorer-plug-ins.aspx.</p>
<p>As always....enjoy and keep on automating!!!</p>]]></content:encoded>
    </item>
    <item>
      <title>ConfigMgr 2012, App-V 5.0, and Locally Installed Applications</title>
      <link>https://docs.microsoft.com/archive/blogs/christianwb/configmgr-2012-app-v-5-0-and-locally-installed-applications</link>
      <pubDate>Sat, 15 Mar 2014 04:45:00 GMT</pubDate>
      <dc:creator><![CDATA[ChristianWB]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/christianwb/2014/03/15/configmgr-2012-app-v-5-0-and-locally-installed-applications/</guid>
      <description><![CDATA[Update: Very important change relative to App-V 5.0 SP2
As of App-V 5.0 SP2, most virtual...]]></description>
      <content:encoded><![CDATA[<p><strong>Update: Very important change relative to App-V 5.0 SP2<br /></strong></p>
<p><em>As of App-V 5.0 SP2, most virtual applications that would normally be used as Internet Explorer plug-ins now integrate seamlessly with Internet Explorer.&nbsp; All that needs to be done is to sequence (or re-sequence) the application with the 5.0 SP2 sequencer and this integration is seamless!&nbsp; This change pretty much makes the rest of the article obsolete as it relates to IE plug-ins.&nbsp;&nbsp;If you needed to integrate Adobe Flash or another Office plug-in&nbsp;with an Microsoft Office product, the RunVirtual key mentioned in this article is required and the methodology indicated would be relevant.</em></p>
<p><strong>BLUF (bottom line up front): Don&#39;t forget your Dummy as it is the key to ease of management when your virtual applications are updated often.</strong></p>
<p>System Center Configuration Manager 2012 SP1 introduced the integration&nbsp;of App-V 5.0.&nbsp; With the introduction of App-V 5.0 came a deeper integration with the physical Operating System and its applications.</p>
<p>Please reference Aaron Parker&#39;s article on&nbsp;<a title="how to integrate virtual applications with locally installed applications" href="http://stealthpuppy.com/app-v-5-0-delivers-internet-explorer-plugin-nirvana/">how to integrate virtual applications with locally installed applications</a>;&nbsp;the portions of the article that&nbsp;are important for us&nbsp;are the <strong>Configure RunVirtual</strong> section and especially the <strong>However</strong> comment.</p>
<p><strong>Terminology</strong></p>
<p>In this article Virtual Environments and Connection Groups will be mentioned.&nbsp; These terms relate to the same thing: Virtual Environment is the ConfigMgr term while Connection Group is the App-V 5.0 client term.</p>
<p><strong>The Dummy!</strong></p>
<p>This application is quite simple and really can be anything.&nbsp; How I accomplished it was to start the sequencer and initiate a New Package-&gt;Add-on or Plug-in-&gt;custom installation (doing this prevents the requirement to select an actual installation).&nbsp; I then opened Windows Explorer (Windows Key + e), created a new folder within&nbsp;C:\Users\Public\Documents called V_Office_Dummy, and within that folder a text file with the same name.&nbsp; At this point, we are done making any changes to the Dummy application.&nbsp; Finish the wizard and save the application.&nbsp; Yes.&nbsp; That is it.&nbsp; I don&#39;t call it a Dummy for nothin&#39;!</p>
<p><strong>Virtual Environment</strong></p>
<p>Add&nbsp;the Dummy virtual application and distribute\deploy it to&nbsp;the same&nbsp;clients that are getting the&nbsp;Office Plugins. Create a new Virtual Environment (VE)&nbsp;and add all the&nbsp;Office Plugin virtual applications to include the Dummy application.</p>
<p><strong>Note:</strong> When you create VEs, you are prompted for a name on creation and then again when you select Add the first time.&nbsp; It may not be obvious, but when adding multiple applications to the second Add, these applications are combined with OR logic.&nbsp; By adding multiple applications via the first Add, this changes the logic to AND.&nbsp; Keep in mind that each client will evaluate whether the VE is required by this logic. If all applications are added by AND logic, they all need to be installed for the Connection Group to be created on the client.&nbsp; This evaluation is done on each Application Evaluation Cycle, so if one of the AND applications is removed, so will the VE.&nbsp; This may affect how your plug-ins function, so be careful.</p>
<p><strong>RunVirtual</strong></p>
<p>In order to integrate virtual applications into a locally installed applications, a couple pieces of information are required: PackageID and VersionID of a package in the relevant VE.&nbsp; The easiest way to get this information is by running a simple PowerShell command: Get-AppVClientPackage. <em>If you forget the command, it is listed in the App-V client console under VIRTUAL APPS in the bottom left hand corner.</em>&nbsp; Running Get-AppVClientPackage will list all virtual applications and&nbsp;their attributes to include PackageID and VersionID.&nbsp; <em>If you get an error, make sure to&nbsp;Set-ExecutionPolicy Unrestricted.</em>&nbsp; The application that has the information we need is the Dummy application.</p>
<p>So why did we create this Dummy application?&nbsp; To integrate App-V 5.0 applications into locally installed applications, a physical registry key is required on the client (under HKLM:\Software\Microsoft\AppV\Client\RunVirtual).&nbsp; The name of this key is the name of the locally installed application (word.exe in this case).&nbsp; The Default value of this key should be PackageID_VersionID of <strong>any package within the Virtual Environment</strong>.&nbsp; We create the Dummy application as this application should never have to change.&nbsp; One of the reasons we are virtualizing applications is so the maintenance of these applications will be less.&nbsp; If we need to always write an update to the local registry of each client when we install new versions of these plug-ins, this does not minimize the number of applications going to the client; it increases it to one for the application and one for the registry edit.&nbsp; Using the Package\Version ID information for the Dummy application, this registry entry doesn&#39;t ever have to change.</p>
<p><strong>Repeat as Required</strong></p>
<p>Other uses of this methodology include the Adobe Flash Plugin for Adobe Reader, Adobe Acrobat, and all browsers other than Internet Explorer.</p>
<p>Looking forward to hearing feedback on how else you all are using this...</p>
<p>Enjoy, and keep on automating!!!</p>]]></content:encoded>
    </item>
  </channel>
</rss>