<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Configuration Manager Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/setprice/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/setprice/feed.xml</link>
    <description>Just another Technet site</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:33:54 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Config Mgr maintenance tasks - Powershell to Document, Disable and Re-enable for site upgrades</title>
      <link>https://docs.microsoft.com/archive/blogs/setprice/automate-disable-and-re-enable-of-configuration-manager-maintenance-tasks-for-upgrade</link>
      <pubDate>Tue, 17 Jul 2018 14:26:15 GMT</pubDate>
      <dc:creator><![CDATA[sethprice]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/setprice/?p=285</guid>
      <description><![CDATA[When running an in-place upgrade to System Center Configuration Manager you should document the...]]></description>
      <content:encoded><![CDATA[When running an in-place upgrade to System Center Configuration Manager you should document the status and disable maintenance tasks so they will not run during the site upgrade.

<a href="https://docs.microsoft.com/en-us/sccm/core/servers/deploy/install/upgrade-to-configuration-manager">https://docs.microsoft.com/en-us/sccm/core/servers/deploy/install/upgrade-to-configuration-manager</a>

In a small environment with one or two sites this is pretty easy and can be documented using Powershell or even a screen shot. After the site upgrade is complete the maintenance tasks can be re-enabled. In a large environment that has more sites you may want to look at automating the process of documenting current status, disabling tasks, and then re-enabling after the upgrade is complete.

This script can be run from the CAS, primary site server or any system with the Configuration Manager console installed, it will perform the following actions:

1) Document and disable all maintenance tasks
When the script is run with no parameters it will document current maintenance task status in an xml file and disable maintenance tasks in all Configuration Manager sites.
File Location:     C:\CM-MaintenanceTasks-$date.xml

Now that all maintenance tasks have been documented and disabled we can schedule and complete the Configuration Manager upgrades for all sites. Once the upgrade is complete we can use the script to re-enable the maintenance tasks based on documented values in the CM-MaintenanceTasks-$data.xml file

2) Re-enable all site maintenance tasks
Run script with parameter -enabletasks 1
Example:
.\CMMaintenance.ps1 -enabletasks 1

This will open a file explorer window to allow you to choose the xml file to import. Choose the xml file that was created in step 1 by opening C:\CM-MaintenanceTasks-$date.xml.  When executed the script will re-enable maintenance tasks based on the documented status of the task in the xml file.

The script can be downloaded here:

<a href="https://gallery.technet.microsoft.com/scriptcenter/Disable-and-Re-enable-6a22f3ee">https://gallery.technet.microsoft.com/scriptcenter/Disable-and-Re-enable-38ae7514</a>

&nbsp;

Thanks to Kevin Kasalonis for assistance with the idea and script

<a href="https://blogs.technet.microsoft.com/cmpfekevin/">https://blogs.technet.microsoft.com/cmpfekevin/</a>

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Automating collection of Configuration Manager client logs</title>
      <link>https://docs.microsoft.com/archive/blogs/setprice/automating-collection-of-config-mgr-client-logs</link>
      <pubDate>Wed, 16 Aug 2017 07:24:08 GMT</pubDate>
      <dc:creator><![CDATA[sethprice]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/setprice/?p=85</guid>
      <description><![CDATA[Automating the Collection of Configuration Manager Client Logs

Configuration Manager client logs...]]></description>
      <content:encoded><![CDATA[<strong>Automating the Collection of Configuration Manager Client Logs</strong>

Configuration Manager client logs are useful in troubleshooting many types of client issues including client installation, client health, software update installation, hardware inventory, and client policy.  In many cases the administrator assisting with troubleshooting client issues does not have direct access to the systems with the required logs.  This increases the time required to troubleshoot client issues, especially when multiple clients are involved or when clients are across multiple time zones.  The following is a way for the Config Manager administrator to automate the collection of the client logs.

The Configuration Manager client logs are stored in several folders, one for client logs, and one for client installation logs.  The client installation log folder is located on the system drive under Windows\ccmsetup\logs.  The client logs folder is normally located on the system drive under Windows\ccm\logs, however this location may be different in some situations.  You can get the location of the client logs by running the following powershell command:

<strong>     </strong>Get-itemproperty “hklm:\software\Microsoft\ccm\logging\@global” | select –expandproperty Logdirectory

In order to automate the collection of the client logs we need to create a shared folder to copy the logs to, and a ConfigMgr package to deploy to clients.  In a small environment creating a single share location may be fine, however, in larger multi-site environments we would want to reduce WAN traffic as much as possible when copying client log files.  One possibility is creating the shared folder on the ConfigMgr management point assigned to the client.  Each client would then copy log files to its associated management point instead of a single location across a WAN link.  We can get the clients management point by running the following powershell command:

<strong>     </strong>(get-ciminstance –namespace root\ccm\locationservices –class sms_mpinformation).MP[0]

Now that we have the location of the client logs and a location to create the shared folders, we can begin to automate log collection.  Client logs will be collected by deploying a package that runs a powershell script on the client.  The required shared folders can be created by using compliance settings in ConfigMgr.  By using compliance settings we can ensure that any new management point installed will automatically have the required share created.

&nbsp;

<strong>Creating the required shared folders using compliance settings</strong>

Note: If you would rather import the configuration item and baseline into Configuration Manager using an exported CAB file it is attached below.  If you import the configuration item and baseline skip to step number 2 below.

&nbsp;

<strong><a href="https://msdnshared.blob.core.windows.net/media/2017/08/Compliance-Import.zip">Compliance-Import</a></strong>

&nbsp;

To manually create the configuration item and baseline follow these instructions

<strong>1. Create the Configuration Item and Configuration Baseline</strong>

Create a new configuration item named CM-ClientLogShare

<a href="https://msdnshared.blob.core.windows.net/media/2017/08/technet.png"><img class="alignnone wp-image-105" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/technet.png" height="529" width="585" /></a>
<p style="text-align: left">a. Select all versions of Windows</p>
<p style="text-align: left">b. On the <strong>Specify settings for this operating system</strong> click <strong>New…</strong></p>
<p style="text-align: left">c. Provide a Name for the setting
Setting type: <strong>Script</strong>
Data type: <strong>Integer</strong></p>
<p style="text-align: left"><a href="https://msdnshared.blob.core.windows.net/media/2017/08/214.png"><img class="alignnone wp-image-116" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/214.png" height="557" width="586" /></a></p>
d. Add the discovery and remediation scripts and click <strong>OK</strong>

<strong>Discovery Script:  </strong>(Script Language: Windows Powershell)
<p style="text-align: left"><strong> <a href="https://msdnshared.blob.core.windows.net/media/2017/08/Discovery.zip">Discovery</a></strong></p>
<p style="text-align: left"><strong>Remediation Script: </strong>(Script Language: Windows Powershell)</p>
<p style="text-align: left"><strong><a href="https://msdnshared.blob.core.windows.net/media/2017/08/Remediation.zip">Remediation</a></strong></p>
&nbsp;

<strong>Note1:</strong>  The log share created in the remediation script is created on the E:\ of the management point server.  To change this location modify variable $Sharepath in the remediation script above.

<strong>Note2:</strong>  The discovery and remediation scripts will create an Event Log “ConfigMgr” on the management point servers as shown below:  This can be used to troubleshoot discovery and remediation script execution.

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/2017/08/319.png"><img class="alignnone wp-image-145" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/319.png" height="363" width="585" /></a>

&nbsp;

e.  On the <strong>Specify compliance rules for this operating system</strong> page click <strong>New…</strong>

Provide a name for the compliance condition
Under <strong>Selected setting:</strong> Choose the setting created in the last step
Rule type: <strong>Value</strong>
Under <strong>setting must comply with the following rule:</strong>
The value returned by the specified script: Equals 1

Select check boxes for:
<strong>Run the specified remediation script when the setting is noncompliant</strong>
<strong>        Report noncompliance if this setting instance is not found</strong>

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/2017/08/411.png"><img class="alignnone wp-image-155" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/411.png" height="609" width="585" /></a><strong></strong>

f. Complete the <strong>Create Configuration Item Wizard</strong>

<strong></strong>
g. Create a configuration baseline for deployment
Provide a name for the configuration baseline
Under <strong>Configuration Data</strong>, add the configuration item created in the last step

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/2017/08/57.png"><img class="alignnone wp-image-165" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/57.png" height="541" width="585" /></a>

&nbsp;

<strong>2.  Create a collection and deploy the configuration baseline</strong>

This collection will contain all the Configuration Manager servers with the Management Point role installed
To create the collection use the following query criteria:

<a href="https://msdnshared.blob.core.windows.net/media/2017/08/66.png"><img class="alignnone wp-image-175" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/66.png" height="366" width="316" /></a>

&nbsp;
<ul>
 	<li>Verify the newly created collection contains the expected management point servers</li>
</ul>
a. Deploy the configuration baseline to the management point collection created in step 2

In the ConfigMgr console under <strong>Assets and Compliance</strong> &gt; <strong>Compliance Settings</strong> &gt; <strong>Configuration Baselines</strong>, right click the CCM Client Log Share baseline and click <strong>deploy</strong>

<strong> </strong>
Verify the baseline is selected
Select <strong>Remediate noncompliant rules when supported</strong>
Select <strong>Allow remediation outside the maintenance window</strong>

Under <strong>Select the collection for this configuration baseline deployment</strong>, choose the collection created in step 2

Configure a schedule for how often the compliance rule should run
Click <strong>OK</strong>

<a href="https://msdnshared.blob.core.windows.net/media/2017/08/76.png"><img class="alignnone wp-image-176" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/76.png" height="605" width="585" /></a>

b. Verify the shared folder is created on the management point servers after the compliance rule has run

<strong>Folder Name:</strong> Client Logs
<strong>Share Name:</strong> Clientlogs
<strong>Share permissions:</strong>
Domain Computers (Change, Read)
Administrators (Full Control)

<strong>NTFS permissions:</strong>
Creator Owner (Special)
System (Full Control)
Administrators (Full Control)
Users (Read and Execute)

&nbsp;

<strong>3. Create and deploy the package to copy client log files</strong>

When deployed to a device collection this package will execute a script that completes the following:

Note: This script uses the command Compress-Archive which requires powershell 5
<ul>
 	<li>Creates a zip file containing the client log directories</li>
 	<li>Copies the zip file to the shared drive on the clients associated management point</li>
 	<li>Removes the zip file on the client</li>
</ul>
Follow these steps to create the package:

a. Create a powershell script named <strong>ArchiveCCMLogs.ps1</strong> with the following content:

<strong> <a href="https://msdnshared.blob.core.windows.net/media/2017/08/ArchiveCCMLogs.zip">ArchiveCCMLogs</a></strong>

&nbsp;

b. Create a new package with source files, ArchiveCCMLogs.ps1 will be in the source file location for the packageCreate a program for the new package:

c. Create a program for the new package:

d. Command line: <strong>%WINDIR%\Sysnative\WindowsPowerShell\v1.0\powershell.exe -executionpolicy bypass -file ArchiveCCMLogs.ps1</strong><strong></strong>
<ul>
 	<li>Configure to run with administrative rights (Whether or not a user is logged on)<strong></strong>
<strong></strong></li>
</ul>
&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/2017/08/85.png"><img class="alignnone wp-image-187" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/85.png" height="528" width="500" /></a>

e. Distribute the package to your distribution points

f. Create a new deployment collection with no members, deploy this package to the collection as either required, or available

g.  Add clients to the deployment collection to collect client logs

Note: Once the client updates policy and executes the script, the client logs will be on the share associated with the system’s management point.]]></content:encoded>
    </item>
    <item>
      <title>PE Peer Cache Custom Reporting - Examples</title>
      <link>https://docs.microsoft.com/archive/blogs/setprice/pe-peer-cache-custom-reporting-examples</link>
      <pubDate>Wed, 29 Jun 2016 16:48:24 GMT</pubDate>
      <dc:creator><![CDATA[sethprice]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/setprice/?p=16</guid>
      <description><![CDATA[PE Peer Cache – Custom Reporting Examples

PE Peer Caching is a new feature in Configuration...]]></description>
      <content:encoded><![CDATA[PE Peer Cache – Custom Reporting Examples

PE Peer Caching is a new feature in Configuration Manager which expands on the capabilities of Branch Cache. During an OSD deployment it allows the machine to pull content from other systems on the local subnet. PE Peer Cache supports local content for OS images, Driver Packages, Packages and Programs, and Boot Images.

In a large network environment it may be difficult to identify and track both subnets where Peer Cache will provide a benefit, and the best client options for enabling Peer Cache content sources in that subnet. Some of the considerations in this decision would include:

Enabling Peer Cache on subnet:
<ul>
 	<li>Number of workstation on subnet</li>
 	<li>Network location (Connection speed to DP in boundary group)</li>
</ul>
Enabling a client as a Peer Cache source
<ul>
 	<li>Client OS</li>
 	<li>CCM client version (Does it support Peer Cache)</li>
 	<li>Network Connection type (Wired vs Wireless)</li>
 	<li>System chassis type
<ul>
 	<li>Example –Chassis type = 3,6, or 7 (Desktop, Mini Tower, or Tower)</li>
 	<li>This would exclude systems types you may not want to use as a content source such as laptops, notebooks, hand helds and All in One systems.</li>
</ul>
</li>
 	<li>Available system drive space</li>
</ul>
&nbsp;

Here are a few examples of creating custom reports to assist with managing Peer Cache.

&nbsp;

***Report requirements***

Hardware inventory classes

Hardware inventory will need to be configured to collect the following WMI classes:
<ol>
 	<li>Root\ccm\softmgmtagent (CacheConfig) Specifically class ‘Size’ (This is required to get the CCM cache size on systems)</li>
 	<li>Root\ccm\policy\machine\actualconfig (CCM_SuperPeerClientConfig) Specifically class ‘CanBeSuperPeer’</li>
 	<li>System Enclosure (Win32_SystemEnclosure) –Chassis Types</li>
 	<li>Logical Disk (SMS_LogicalDisk) -Free Space (MB)</li>
</ol>
AD System Discovery will need to be modified to add the following AD Attribute

“OperatingSystem”

&nbsp;

<strong><u>Report Example 1 </u></strong>

<strong>PE Peer Cache Candidate Dashboard </strong>

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/PeerCandidate.png"><img width="300" height="90" class="alignnone size-medium wp-image-75" alt="PeerCandidate" src="https://msdnshared.blob.core.windows.net/media/2016/06/PeerCandidate-300x90.png" /></a>

Zip file attached below contains:
<ul>
 	<li>Report RDL file</li>
 	<li>Report Screenshot</li>
 	<li>SQL query for report</li>
</ul>
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/PeerCacheDashboard.zip">PeerCacheDashboard</a>

This report lists the AD sites and the number of subnets associated with each site. Expanding the site and specific subnet will provide details on the client count in that site and the number of Peer Cache content source candidates.

The details of the client in that site are listed and color coded for Peer Cache candidate status.

Green = (Peer Cache is already enabled)

Blue = (System meets to criteria to be recommended as a Peer Cache candidate)

Gray = (System does NOT meet criteria for Peer Cache candidate)

&nbsp;

In this report the client system must meet the following criteria to be displayed in BLUE for Peer Cache capable.

Note- The data used for candidate criteria is based on hardware inventory. Based on hardware inventory configuration this data may or may not be current (Default hardware inventory is 7 days)
<ul>
 	<li>OS version (Like %Windows% NOT like %Server%)</li>
 	<li>Ethernet connection (Adaptertype0) = ‘Ethernet 802.3’</li>
 	<li>IPAddress0 like ‘%.%.%.%’ (Not Null)</li>
 	<li>Free space on system drive is &gt; 45 GB</li>
 	<li>CCM Client is Active</li>
 	<li>Client version is 5.00.8325.1000 or later</li>
 	<li>Chassis type in (3,6,7) – Desktop, Min Tower, or Tower</li>
</ul>
&nbsp;

Note: The attached report will not list Server operating systems but I do have them enabled for display in the example report screenshot.

&nbsp;

&nbsp;

<strong><u>Report Example 2</u></strong>

<strong>PE Peer Cache Enabled Clients </strong>

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/PeerCacheEnabled.jpg"><img width="300" height="169" class="alignnone size-medium wp-image-36" alt="PeerCacheEnabled" src="https://msdnshared.blob.core.windows.net/media/2016/06/PeerCacheEnabled-300x169.jpg" /></a>

Zip file attached below contains:
<ul>
 	<li>Report RDL file</li>
 	<li>Report Screenshot</li>
 	<li>SQL query for report</li>
</ul>
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/PeerCacheEnabled.zip">PeerCacheEnabled</a>

&nbsp;

<span style="color: #000000;font-family: Calibri">This report lists all systems that have the Peer Cache client enabled and system details such as chassis type, free system drive space, CCM cache size, client status, Client version, OS name, AD site, and default gateway.</span>

&nbsp;]]></content:encoded>
    </item>
  </channel>
</rss>