<?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>Kevin Justin’s System Center Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/kevinjustin/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/kevinjustin/feed.xml</link>
    <description>Posts in this blog are provided &amp;quot;AS IS&amp;quot; with no warranties, and confers no rights. Use of included script samples are subject to the terms specified in the Terms of Use</description>
    <lastBuildDate>Tue, 21 May 2019 17:05:11 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Using Unix MP's for Shell commands and scripts</title>
      <link>https://docs.microsoft.com/archive/blogs/kevinjustin/using-unix-mps-for-shell-commands-and-scripts</link>
      <pubDate>Tue, 21 May 2019 11:05:10 GMT</pubDate>
      <dc:creator><![CDATA[kjustin1996]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/kevinjustin/?p=6385</guid>
      <description><![CDATA[Ready to move out of the UI ?

&nbsp;

&nbsp;

Thanks to Saurav Babu, and Tim Helton's...]]></description>
      <content:encoded><![CDATA[<img width="312" height="240" class="alignnone size-full wp-image-6395" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/05/moving.jpg" />

Ready to move out of the UI ?

&nbsp;

&nbsp;

Thanks to Saurav Babu, and Tim Helton's help, I was able to push my MP authoring limits further.

&nbsp;

&nbsp;

The good thing with the Shell command template in SCOM is that your script is encoded.

<img width="862" height="728" class="alignnone size-full wp-image-6405" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/05/UnitMonitor-Template-Scripting.png" />

&nbsp;
<h3>Bad news</h3>
<ol>
 	<li>If functionality doesn't exist in the UI, you can't easily pull the monitor and just add variables to get that functionality.</li>
 	<li>Scripts and Shell commands are encoded (great news for security!)</li>
</ol>
&nbsp;

&nbsp;

Now to the use case - need Sample Count and Match Count to prevent false positive alerts

&nbsp;

&nbsp;

The UNIX Shell Command library allows us to use the following variables out of the box:
<p style="padding-left: 30px"><span style="color: #008000">Interval, SyncTime, TargetSystem, UserName, Password, Script, ScriptArgs, TimeOut, TimeOutInMS, HealthyExpression, ErrorExpression</span></p>
<p style="padding-left: 60px">AND we can override <span style="color: #0000ff">Interval, Script, TimeOut, TimeOutInMS</span></p>
&nbsp;

&nbsp;

If that's not enough options, then read on!

&nbsp;

&nbsp;
<h2>When the built-in functionality doesn't exist</h2>
For this UNIX shell command/script monitor, we required SampleCount and MatchCount

&nbsp;

&nbsp;

<strong>Variables explained</strong>

SampleCount is the number of times (samples for an alert).
<p style="padding-left: 30px">If SampleCount = 4, this means 4 samples will generate an alert</p>
MatchCount is the number of intervals before monitor state changes
<p style="padding-left: 30px">If Interval = 60 (s), and MatchCount = 10, then it will take 10 minutes (600s before we alert)</p>
&nbsp;

Combining the 2 means 4 samples over 10 minutes will generate an alert.

Sometimes this is called alert suppression or counting failures before alerting

&nbsp;

&nbsp;

Built a custom DataSource, ProbeAction, and WriteAction, as the UNIX Shell Library MP did not include these additional variables.

&nbsp;

&nbsp;

Please review my updated MP Fragments TechNet Gallery for the custom MP and fragments!

<a target="_blank" href="https://gallery.technet.microsoft.com/Uncommon-Custom-MP-c5a12a86" rel="noopener">https://gallery.technet.microsoft.com/Uncommon-Custom-MP-c5a12a86</a>

&nbsp;

&nbsp;

&nbsp;

&nbsp;
<h2>Encoding the script or command to run</h2>
&nbsp;

&nbsp;

The other issue with UNIX scripts and commands, is the UI encodes the scripts.

&nbsp;

How do we get around it you ask?

Since we are building an MP Fragment and MP, we must figure out how to encode.

&nbsp;

&nbsp;

To encode the script to put into your SCOM monitor (and MP Fragment)

&nbsp;

<strong>Example</strong>

<span style="color: #0000ff">$script = 'if [ `ps -ef | grep sleep | grep -v grep | wc -l` -eq "1" ]; then echo false; </span><span style="color: #0000ff">else echo true; fi'</span>

&nbsp;

# Verify script variable
<span style="color: #0000ff">$script</span>

# Get $script bytes
<span style="color: #0000ff">$s = [System.Text.Encoding]::UTF8.GetBytes($script)</span>

# Verify script bytes output (optional as bytes broken out by line)
<span style="color: #0000ff">$s</span>

# Encode script to Base64
<span style="color: #0000ff">$encoded = [System.Convert]::ToBase64String($s)</span>

# Verify $encoded
<span style="color: #0000ff">$encoded</span>

# Optional
# Verify string converts back properly
<span style="color: #0000ff">[System.Text.Encoding]::UTF8.GetString($s)</span>

&nbsp;

&nbsp;
<pre><span style="color: #0000ff">$encoded</span> output is what needs to be entered into the &lt;script&gt;&lt;/script&gt; variable in your monitor</pre>
&nbsp;

&nbsp;
<h3>Example Output</h3>
PS C:\Users\scomadmin\desktop&gt; $script = 'if [ `ps -ef | grep sleep | grep -v grep | wc -l` -eq "1" ]; then echo false;
else echo true; fi'
PS C:\Users\scomadmin\desktop&gt; $script
if [ `ps -ef | grep sleep | grep -v grep | wc -l` -eq "1" ]; then echo false; else echo true; fi
PS C:\Users\scomadmin\desktop&gt; $s = [System.Text.Encoding]::UTF8.GetBytes($script)
PS C:\Users\scomadmin\desktop&gt; $s
PS C:\Users\scomadmin\desktop&gt; $s = [System.Text.Encoding]::UTF8.GetBytes($script)

PS C:\Users\scomadmin\desktop&gt; $encoded = [System.Convert]::ToBase64String($s)
PS C:\Users\scomadmin\desktop&gt; $encoded
<span style="color: #0000ff">aWYgWyBgcHMgLWVmIHwgZ3JlcCBzbGVlcCB8IGdyZXAgLXYgZ3JlcCB8IHdjIC1sYCAtZXEgIjEiIF07IHRoZW4gZWNobyBmYWxzZTsgZWxzZSBlY2hvIHRydWU7IGZp</span>
PS C:\Users\scomadmin\desktop&gt; [System.Text.Encoding]::UTF8.GetString($s)
if [ `ps -ef | grep sleep | grep -v grep | wc -l` -eq "1" ]; then echo false; else echo true; fi
PS C:\Users\scomadmin\desktop&gt;

&nbsp;

&nbsp;

&nbsp;

<strong>References</strong>

Jonathan Almquist's blog <a target="_blank" href="https://blog.scomskills.com/new-matchcount-configuration-in-scom-2012/" rel="noopener">post</a>

Kevin Holman's <a target="_blank" href="https://kevinholman.com/2017/08/12/creating-a-scom-service-monitor-that-allows-overrides-for-interval-frequency-and-samples/" rel="noopener">blog</a> on service with Samples]]></content:encoded>
    </item>
    <item>
      <title>Using SharePoint On Premise Diagnostic tool</title>
      <link>https://docs.microsoft.com/archive/blogs/kevinjustin/using-sharepoint-on-premise-diagnostic-tool</link>
      <pubDate>Fri, 17 May 2019 10:58:44 GMT</pubDate>
      <dc:creator><![CDATA[kjustin1996]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/kevinjustin/?p=6195</guid>
      <description><![CDATA[&nbsp;

Futuristic, perhaps, but a powered screwdriver for space, almost looks like Han Solo's...]]></description>
      <content:encoded><![CDATA[<img width="450" height="300" class="alignnone size-full wp-image-6205" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/05/ISS_ScrewDriver.jpg" />

&nbsp;

Futuristic, perhaps, but a powered screwdriver for space, almost looks like Han Solo's pistol (sans scope)

&nbsp;

&nbsp;

From previous intro, we start using the tool to diagnose SharePoint problems.

&nbsp;

Let's install, and get to using it!

&nbsp;

Once this is released, I expect this to be posted to a GitHub repository.

For now, there will be some mystery for obtaining the file bundle.

&nbsp;

Copy folder from build zip file.

<img width="853" height="372" class="alignnone size-full wp-image-6255" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/05/OPD-Directory.png" />

&nbsp;

Paste to SharePoint machine, whatever standard you use.

From my own past, I prefer a MonAdmin (Monitoring Admin) directory, with a scripts sub-directory, then toolname/version

Example

<span style="color: #0000ff">cd 'C:\Monadmin\Scripts\OPD-D2.0.1905.15001'</span>

&nbsp;

&nbsp;
<h3>Start OPD via powershell</h3>
<span style="color: #0000ff">cd 'C:\Monadmin\Scripts\OPD-D2.0.1905.15001'</span>

<span style="color: #0000ff">.\OPD-console.ps1</span>

&nbsp;

Avoid some initial questions

<span style="color: #0000ff">cd 'C:\Monadmin\Scripts\OPD-D2.0.1905.15001'</span>

<span style="color: #0000ff">.\OPD-console.ps1 -mode SharePoint -ShareTelemetry Yes -AcceptEula</span>

&nbsp;

PS C:\Monadmin\Scripts\OPD-D2.0.1905.15001&gt; .\OPD-console.ps1 -mode SharePoint -ShareTelemetry Yes -AcceptEula

&nbsp;

&nbsp;
<h1></h1>
<h1>Using OPD to check SharePoint environment</h1>
&nbsp;

Start with the OPDLog Event Log

<img width="1115" height="707" class="alignnone size-full wp-image-6265" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/05/OPD-EventLog.png" />

&nbsp;

&nbsp;

&nbsp;

<strong>OPD Main menu</strong>

<img width="552" height="173" class="alignnone size-full wp-image-6275" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/05/OPD-Main.png" />

&nbsp;

&nbsp;

&nbsp;

1 - Administration

<img width="392" height="176" class="alignnone size-full wp-image-6215" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/05/OPD-Administration.png" />

&nbsp;

Central Admin site

<img width="391" height="204" class="alignnone size-full wp-image-6345" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/05/OPD-Admin-CentralAdmin.png" />

&nbsp;

Current patch level

<img width="842" height="331" class="alignnone size-full wp-image-6245" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/05/OPD-CentralAdminTaskFail.png" />

&nbsp;

Emails

<img width="382" height="202" class="alignnone size-full wp-image-6225" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/05/OPD-Administration-Emails.png" />

&nbsp;

Timer jobs

<img width="841" height="271" class="alignnone size-full wp-image-6235" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/05/OPD-Administration-TimerJobs.png" />

&nbsp;

&nbsp;

2 - Performance

<img width="450" height="174" class="alignnone size-full wp-image-6285" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/05/OPD-Performance.png" />

&nbsp;

<strong>3 - Search</strong>

<img width="793" height="130" class="alignnone size-full wp-image-6305" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/05/OPD-Search.png" />

&nbsp;

Search Hosts Online

<img width="453" height="231" class="alignnone size-full wp-image-6315" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/05/OPD-SearchHostsOnline.png" />

&nbsp;

Unable to retrieve topology

<img width="838" height="392" class="alignnone size-full wp-image-6325" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/05/OPD-Search-UnableToRetrieve.png" />

&nbsp;

&nbsp;

&nbsp;

<strong>4 - Services</strong>

<img width="493" height="168" class="alignnone size-full wp-image-6335" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/05/OPD-Services.png" />

&nbsp;

&nbsp;

5 - Setup

<img width="492" height="184" class="alignnone size-full wp-image-6355" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/05/OPD-Setup-MissingFeatures.png" />

&nbsp;

Binaries

<img width="518" height="188" class="alignnone size-full wp-image-6365" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/05/OPD-Setup-VerifiesFiles.png" />

&nbsp;

&nbsp;

6 - User Profile

<img width="358" height="118" class="alignnone size-full wp-image-6375" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/05/OPD-UserProfile.png" />

&nbsp;

&nbsp;

Firewall ports (duplicated from section 4)

<img width="493" height="168" class="alignnone size-full wp-image-6335" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/05/OPD-Services.png" />

&nbsp;

&nbsp;

Happy checking and to building new SharePoint checks!]]></content:encoded>
    </item>
    <item>
      <title>SharePoint Management framework Private Preview</title>
      <link>https://docs.microsoft.com/archive/blogs/kevinjustin/sharepoint-management-framework-private-preview</link>
      <pubDate>Mon, 13 May 2019 14:22:23 GMT</pubDate>
      <dc:creator><![CDATA[kjustin1996]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/kevinjustin/?p=6175</guid>
      <description><![CDATA[&nbsp;

Do you have an Enterprise SharePoint farms that you manage health and performance...]]></description>
      <content:encoded><![CDATA[<img width="448" height="267" class="alignnone size-full wp-image-6185" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/05/PrivateLabel.jpg" />

&nbsp;

Do you have an Enterprise SharePoint farms that you manage health and performance via custom scripts?

Have you used SETH to manage SharePoint 2010 problems with the farm(s)?

&nbsp;

Would you want a scalable tool you can add your own scripts and enable/check, and then alert on what you want?

&nbsp;

&nbsp;

<strong>Background</strong>

SharePoint Engineer Troubleshooting Helper (SETH) was a Microsoft tool for SharePoint 2010

<a target="_blank" href="https://social.technet.microsoft.com/wiki/contents/articles/31875.troubleshooting-sharepoint-using-seth.aspx" rel="noopener">Using SETH</a>

<a target="_blank" href="https://social.technet.microsoft.com/Forums/office/en-US/e66a8cc9-08e6-409a-a6e0-ebadd4f6fe01/how-to-run-sharepoint-engineer-troubleshooting-helper" rel="noopener">Troubleshooting SETH</a>

&nbsp;

&nbsp;

For SharePoint 2016 and 2019, the Customer Support team brought up the need for bringing back a utility to help with common SharePoint scenarios

On Premise Diagnostic (OPD) is the second generation of project (for SharePoint 2016 and 2019).

&nbsp;

My goal was to help the Escalation Engineers have a full platform that can be implemented and is scalable for the technical community to maintain and use.

&nbsp;

BTW, the only thing preventing 2013 SharePoint support is the dependency on WMF v5.0 or better on SharePoint servers.

&nbsp;

&nbsp;

SCOM management pack can be found <a target="_blank" href="https://gallery.technet.microsoft.com/SharePoint-On-Premise-a2eef55a" rel="noopener">here</a>

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Updated Skype for Business 2015 Addendum pack</title>
      <link>https://docs.microsoft.com/archive/blogs/kevinjustin/updated-skype-for-business-2015-addendum-pack</link>
      <pubDate>Fri, 22 Feb 2019 10:51:52 GMT</pubDate>
      <dc:creator><![CDATA[kjustin1996]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/kevinjustin/?p=6125</guid>
      <description><![CDATA[&nbsp;

Continuing work with Nick Wood on the Skype pack for additional operational...]]></description>
      <content:encoded><![CDATA[<img width="238" height="237" class="alignnone size-full wp-image-6135" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/02/new-and-improved.jpg" />

&nbsp;

Continuing work with <a target="_blank" href="https://linkedin.com/in/nicholas-wood-33163243" rel="noopener">Nick Wood</a> on the Skype pack for additional operational features.

&nbsp;

Previously <a target="_blank" href="https://blogs.technet.microsoft.com/kevinjustin/2018/07/27/updated-skype-for-business-2015-premise-addendum-mp/" rel="noopener">Blogged</a> about this July 2018, and continue to make improvements

The TechNet gallery <a target="_blank" href="https://gallery.technet.microsoft.com/SCOM-Skype-for-Business-4198d9bc" rel="noopener">bundle</a> is updated with new functionality.

&nbsp;

&nbsp;

<strong>Skype KHI addendum</strong>
<p style="padding-left: 30px">Pack gathers the Skype KHI performance counters</p>
<p style="padding-left: 30px">Packets * Discards performance rules where greater than 100 discards are seen on NIC's,</p>
<p style="padding-left: 30px">Monitoring Tab folder/performance view</p>
<p style="padding-left: 30px"><img width="883" height="555" class="alignnone size-full wp-image-6145" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/02/KHIPerformance.png" /></p>
&nbsp;

<strong>Skype Custom Overrides</strong>
<p style="padding-left: 30px">Includes common overrides for noisy monitors/rules.</p>
&nbsp;

&nbsp;

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Install SCVMM management packs from VMM Server</title>
      <link>https://docs.microsoft.com/archive/blogs/kevinjustin/install-scvmm-management-packs-from-vmm-ms</link>
      <pubDate>Wed, 20 Feb 2019 15:58:14 GMT</pubDate>
      <dc:creator><![CDATA[kjustin1996]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/kevinjustin/?p=6075</guid>
      <description><![CDATA[Time for some automation

&nbsp;

Ever have to upgrade SCVMM packs every time a new Update...]]></description>
      <content:encoded><![CDATA[<img width="186" height="240" class="alignnone size-full wp-image-6085" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/02/automation.jpg" />

Time for some automation

&nbsp;

Ever have to upgrade SCVMM packs every time a new Update Release (UR) comes out?

&nbsp;

Copy the files off from the VMM server to your SCOM MS, install.

How long does that take?

&nbsp;

&nbsp;

Try this script out - assuming you have a login on the VMM Server

&nbsp;

TechNet Gallery post <a target="_blank" href="https://gallery.technet.microsoft.com/Import-VMM-MPs-into-SCOM-36652eeb" rel="noopener">here</a>

&nbsp;

# Set up some variables

<span style="color: #3366ff">$UR="UR5"</span>

<span style="color: #3366ff">$VMMServer = "16VMM01"</span>

# Set up your path, this example is monadmin\backup

<span style="color: #3366ff">$date = Get-Date -UFormat "%Y-%m-%d"</span>

&nbsp;

# Set up backup path

<span style="color: #3366ff">$backupPath = "C:\monadmin\backup"</span>

<span style="color: #3366ff">$backupDrive = "C:"</span>

# Create some functions

Watch them roll, let PowerShell do your work!

<img width="694" height="509" class="alignnone size-full wp-image-6105" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/02/ImportMP-function.png" />

&nbsp;

UR6 packs

<img width="844" height="349" class="alignnone size-full wp-image-6095" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/02/Backed-up-VMM-packs-on-SCOM-MS.png" />

SCOM management packs backed up

<img width="840" height="429" class="alignnone size-full wp-image-6115" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/02/Monadmin-packs-to-SCOM-MS-from-VMM-MS.png" />

&nbsp;

Check out the SCOM Console Admin tab for updates!]]></content:encoded>
    </item>
    <item>
      <title>Troubleshooting Service Map pack</title>
      <link>https://docs.microsoft.com/archive/blogs/kevinjustin/troubleshooting-service-map-pack</link>
      <pubDate>Wed, 20 Feb 2019 15:17:31 GMT</pubDate>
      <dc:creator><![CDATA[kjustin1996]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/kevinjustin/?p=5985</guid>
      <description><![CDATA[&nbsp;

&nbsp;

&nbsp;

Updated 14 Mar 2019

&nbsp;

If you get these exceptions like...]]></description>
      <content:encoded><![CDATA[<img width="420" height="267" class="alignnone size-full wp-image-6045" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/02/ToBeContinued.jpg" />

&nbsp;

&nbsp;

&nbsp;

<span style="color: #ff0000"><strong>Updated 14 Mar 2019</strong></span>

&nbsp;

If you get these exceptions like me, the issue has been raised, with a deliverable targeted for SCOM2019UR1.

Disable the rule to reduce noise.

&nbsp;

&nbsp;

Are you using Service Map Management pack, and getting errors?

<img width="752" height="628" class="alignnone size-full wp-image-6005" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/02/Service-Map-Unknown-Exception.png" />

&nbsp;

This alert is based on the 46651/46652 event ID in the Operations Manager event log

From SCOM Console &gt; Authoring Tab &gt; Management Pack Objects &gt; Rules

Search in 'Look for:' bar GenericException (yes no space in between)

&nbsp;

<strong>Rule</strong>

<img width="1352" height="733" class="alignnone size-full wp-image-6035" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/02/ServiceMap-GenericException-rule.png" />

&nbsp;

&nbsp;

<strong>Rule Details</strong>

<img width="720" height="602" class="alignnone size-full wp-image-6025" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/02/GenericException-rule-detail.png" />

&nbsp;
<h2>To enable debug on the MS</h2>
&nbsp;

For collecting logs, please do the following:
<ul>
 	<li>Create folders “c:\Debug\ext\”</li>
 	<li>Now, Wait for an hour(which is the default time interval set in the rule for running service map api).</li>
 	<li>You will see some log files created in that folder “ext”. Please share the same in email.</li>
</ul>
&nbsp;

<img width="691" height="97" class="alignnone size-full wp-image-5995" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/02/Debug-FileLog.png" />

The file showed up after the alerts, and listed debug INFO and WARN lines, and the time stamps match up to the generic exception rules.

&nbsp;

Stay tuned for more information, I have been trying to get more answers on the exception

<span style="color: #3366ff">{WARN} [12:35:20.966] [ScomUtils] failed to export XML for Management Pack: System.NullReferenceException: Object reference not set to an instance of an object.</span>

<span style="color: #3366ff">   at ScomBridge.ScomUtils.WritePackXmlToFile(ManagementPack pack, String filename)</span>

&nbsp;

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>XML for Product or Company Knowledge</title>
      <link>https://docs.microsoft.com/archive/blogs/kevinjustin/xml-for-product-or-company-knowledge</link>
      <pubDate>Fri, 14 Dec 2018 14:06:59 GMT</pubDate>
      <dc:creator><![CDATA[kjustin1996]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/kevinjustin/?p=5925</guid>
      <description><![CDATA[Digging in the archives...

&nbsp;

&nbsp;

From a discussion with some PFE's - the...]]></description>
      <content:encoded><![CDATA[<img width="300" height="229" class="alignnone wp-image-5945 size-medium" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/12/Encyclopedia_Britannica-300x229.jpg" />

Digging in the archives...

&nbsp;

&nbsp;

From a discussion with some PFE's - the question was 'how do I create knowledge for a monitor/rule?'
<p style="padding-left: 30px">Tyson Paul pointed out the system Center Wiki  <a target="_blank" href="https://systemcenter.wiki/KBAutor/" rel="noopener">'Knowledge Article authoring'  </a></p>
&nbsp;

When you create a knowledge article in an MP (let's not even go into the console GUI! )

If the Knowledge Article references a sealed workflow (does it reference a sealed pack)
<p style="padding-left: 30px">It's Company Knowledge</p>
<p style="padding-left: 30px"><img width="1029" height="637" class="alignnone size-full wp-image-5975" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/12/Company-Knowledge-FINAL.png" /></p>
&nbsp;

&nbsp;

&nbsp;

&nbsp;

<strong>Example</strong>

If the Knowledge Article references a sealed monitor, it will show up under the 'Company Knowledge' tab

XML example from Skype Addendum pack on <a target="_blank" href="https://gallery.technet.microsoft.com/SCOM-Skype-for-Business-4198d9bc" rel="noopener">TechNet Gallery</a>

&lt;KnowledgeArticles&gt;
&lt;KnowledgeArticle ElementID="<span style="color: #ff0000">ML2MC</span>!Microsoft.LS.2015.Monitoring.Internal.Health.DiscoveryRunner" Visible="true"&gt;
&lt;MamlContent&gt;
&lt;maml:section xmlns:maml="https://schemas.microsoft.com/maml/2004/10"&gt;
&lt;maml:title&gt;Summary&lt;/maml:title&gt;
&lt;maml:para&gt;Any added Skype servers will not be discovered in SCOM.&lt;/maml:para&gt;
&lt;/maml:section&gt;
&lt;maml:section xmlns:maml="https://schemas.microsoft.com/maml/2004/10"&gt;
&lt;maml:title&gt;Causes&lt;/maml:title&gt;
&lt;maml:para&gt;Discovery Failed.  An internal exception has occurred during discovery.&lt;/maml:para&gt;
&lt;/maml:section&gt;
&lt;maml:section xmlns:maml="https://schemas.microsoft.com/maml/2004/10"&gt;
&lt;maml:title&gt;Resolutions&lt;/maml:title&gt;
&lt;maml:para&gt;Fix permission issues in alert.&lt;/maml:para&gt;
&lt;maml:para&gt;Skype PowerShell module may not be installed.&lt;/maml:para&gt;
&lt;maml:para&gt;Import-Module SkypeForBusiness&lt;/maml:para&gt;
&lt;/maml:section&gt;
&lt;/MamlContent&gt;
&lt;/KnowledgeArticle&gt;

&lt;/KnowledgeArticles&gt;

<img width="1273" height="442" class="alignnone size-full wp-image-5935" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/12/Company-Knowledge-XML-example.png" />

&nbsp;

&nbsp;

&nbsp;

If the Knowledge Article is referenced in a sealed pack, OR an UNsealed pack has a rule/monitor in the same unsealed pack)

It's Product Knowledge

&nbsp;

<strong>Sealed pack example</strong>

<img width="777" height="603" class="alignnone size-full wp-image-5955" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/12/Product-Knowledge-FINAL.png" />

&nbsp;

<strong>Unsealed pack Example</strong>

<img width="1366" height="637" class="alignnone size-full wp-image-5965" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/12/Product-Knowledge-XML-example.png" />]]></content:encoded>
    </item>
    <item>
      <title>Visual Studio and VSAE updates</title>
      <link>https://docs.microsoft.com/archive/blogs/kevinjustin/visual-studio-and-vsae-updates</link>
      <pubDate>Tue, 27 Nov 2018 10:39:35 GMT</pubDate>
      <dc:creator><![CDATA[kjustin1996]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/kevinjustin/?p=5805</guid>
      <description><![CDATA[&nbsp;

For those using Visual Studio and Authoring Extensions to author management...]]></description>
      <content:encoded><![CDATA[<img width="385" height="110" class="alignnone size-full wp-image-5815" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/11/VisualStudio.png" />

&nbsp;

For those using Visual Studio and Authoring Extensions to author management packs

&nbsp;

&nbsp;
<h2>Background</h2>
VSAE is Visual Studio Authoring Extensions, used to create management packs (with or without <a target="_blank" href="https://blogs.technet.microsoft.com/kevinholman/2016/06/04/authoring-management-packs-the-fast-and-easy-way-using-visual-studio/" rel="noopener">fragments</a>)
<p style="padding-left: 60px">See Holman's Fragment library on <a target="_blank" href="https://gallery.technet.microsoft.com/SCOM-Management-Pack-VSAE-2c506737/view/Discussions" rel="noopener">TechNet Gallery</a> for multiple hints at more than what SCOM delivers out of box (OoB)</p>
&nbsp;

&nbsp;

&nbsp;

&nbsp;

If you or your customers are having issues after upgrading to VS2017 15.8.x.y. and above...there's a new v1.3.0.1 VSAE <a target="_blank" href="https://www.microsoft.com/en-us/download/details.aspx?id=30169" rel="noopener">download</a>
<p style="padding-left: 30px"><span style="color: #ff0000">NOTE - New VSAE updates are applicable to Visual Studio 2017/2015/2013/2012</span></p>
<p style="padding-left: 30px">View full features at the <a target="_blank" href="https://www.microsoft.com/en-us/download/details.aspx?id=30169" rel="noopener">download</a> link:</p>
&nbsp;

&nbsp;

If you upgraded Visual Studio, and need to check the VSAE version

From Visual Studio, choose Help &gt; About Microsoft Visual Studio

<img width="929" height="609" class="alignnone size-full wp-image-5865" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/11/About-Visual-Studio.jpg" />

&nbsp;

In my experience, I had to remove System Center Visual Studio Authoring Extensions' to upgrade (I was running the private patch).

&nbsp;

&nbsp;

After upgrade, the version information:

Control Panel &gt; Programs &gt; Programs and Features

<img width="1024" height="539" class="alignnone wp-image-5875 size-large" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/11/VSAE-upgraded-1024x539.jpg" />

&nbsp;

&nbsp;

<strong>Visual Studio 2017</strong>

<img width="1024" height="547" class="alignnone wp-image-5885 size-large" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/11/Visual-Studio-after-VSAE-upgrade-1024x547.jpg" />

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;
<h2></h2>
<h2>Visual Studio errors seen when VSAE is not updated</h2>
&nbsp;

<strong>Unresponsive VSAE</strong> (shows as Visual Studio component 'System Center Authoring Extensions')<img width="1024" height="637" class="alignnone wp-image-5835 size-large" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/11/VSAE-unresponsiveness-1024x637.png" />

&nbsp;

<strong>Exception Encountered</strong>

<img width="1024" height="633" class="alignnone wp-image-5845 size-large" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/11/Exception-encountered-1024x633.gif" />

&nbsp;

&nbsp;

<strong>Missing .NET Frameworks on the system where Visual Studio runs</strong>

<img width="1368" height="847" class="alignnone size-full wp-image-6055" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/11/NETFramework.png" />

&nbsp;

<strong>Missing Visual Studio components</strong>

<img width="412" height="204" class="alignnone size-full wp-image-5855" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/11/Project-Type-not-supported.png" />

&nbsp;

&nbsp;

&nbsp;
<h2><strong>Another warning</strong></h2>
In Visual Studio, be careful to dock panes, if you've accidentally dragged the panes around/on the screen.

Right click on the Pane, and choose dock.

<img width="1233" height="655" class="alignnone size-full wp-image-6065" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/11/Visual-Studio-panes-can-be-set-to-float.png" />

&nbsp;

&nbsp;

&nbsp;

If you still have problems, upgrade to latest Visual Studio, open a Premier support case.

There is also UserVoice for Visual Studio feedback <a href="https://visualstudio.uservoice.com/forums/121579-visual-studio-ide" rel="nofollow">https://visualstudio.uservoice.com/forums/121579-visual-studio-ide</a>
You can also upload pics to help illustrate the UI question.

&nbsp;

&nbsp;

&nbsp;

<strong>References</strong>

Install VS2017 <a href="https://docs.microsoft.com/en-us/visualstudio/install/install-visual-studio?view=vs-2017">https://docs.microsoft.com/en-us/visualstudio/install/install-visual-studio?view=vs-2017</a>

Workloads <a href="https://docs.microsoft.com/en-us/visualstudio/install/install-visual-studio?view=vs-2017#step-4---select-workloads">https://docs.microsoft.com/en-us/visualstudio/install/install-visual-studio?view=vs-2017#step-4---select-workloads</a>]]></content:encoded>
    </item>
    <item>
      <title>Gather Log Analytics/MMA agent version</title>
      <link>https://docs.microsoft.com/archive/blogs/kevinjustin/gather-log-analytics-mma-agent-version</link>
      <pubDate>Tue, 20 Nov 2018 11:33:33 GMT</pubDate>
      <dc:creator><![CDATA[kjustin1996]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/kevinjustin/?p=5745</guid>
      <description><![CDATA[Had some questions come up from the community to check the Log Analytics agent...]]></description>
      <content:encoded><![CDATA[<img width="183" height="276" class="alignnone size-full wp-image-5755" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/11/questionmark.jpg" />

Had some questions come up from the community to check the Log Analytics agent version.

&nbsp;

Depending on how you are setup, the SCOM Integration makes this easy with Holman's blog for the <a target="_blank" href="https://blogs.technet.microsoft.com/kevinholman/2017/05/09/agent-management-pack-making-a-scom-admins-life-a-little-easier/" rel="noopener">agent management</a> pack.

&nbsp;

If you have admin right in Operations Manager console then you can check this directly from SCOM server:

If you are an admin in SCOM, you can check from MS

<span style="color: #0000ff">$Server = "DC01.yourlabnamehere.net"</span>
<span style="color: #0000ff">(Get-SCOMAgent -Name $ServerName).Version</span>

&nbsp;

Alternatively, from server registry:

<span style="color: #0000ff">(Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\setup")</span>

# Just the Agent version variable

<span style="color: #0000ff">(Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\setup").AgentVersion</span>

&nbsp;

&nbsp;
<h2></h2>
<h2><strong>Log Analytics</strong></h2>
<strong>Kusto query</strong>

// Servers and Versions

<span style="color: #0000ff">Heartbeat</span>
<span style="color: #0000ff">| project Computer,Version</span>

// Specific version

<span style="color: #0000ff">Heartbeat </span>
<span style="color: #0000ff">| where Version == "8.0.10918.0"</span>
<span style="color: #0000ff">| project Computer,Version</span>

// Summarize by Version

<span style="color: #0000ff">Heartbeat </span>
<span style="color: #0000ff">| summarize by Version</span>

<img width="300" height="180" class="alignnone wp-image-5795 size-medium" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/11/SummarizeBy-Output-300x180.jpg" />

&nbsp;

&nbsp;

&nbsp;

If you're visual

From the Portal &gt; Log Analytics &gt; workspace &gt; Workspace Summary &gt; Agent Health

Scroll right to agent version

<img width="1480" height="772" class="alignnone size-full wp-image-5785" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/11/LA-AgentHealthAssessment1.jpg" />

&nbsp;

&nbsp;

<strong>Monitor</strong>

Monitor &gt; Overview &gt; Agent Health Assessment

Scroll right to agent version

<img width="1486" height="815" class="alignnone size-full wp-image-5765" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/11/AgentHealthAssessment.jpg" />]]></content:encoded>
    </item>
    <item>
      <title>Azure Log Analytics for Windows Telemetry data</title>
      <link>https://docs.microsoft.com/archive/blogs/kevinjustin/azure-log-analytics-for-windows</link>
      <pubDate>Wed, 17 Oct 2018 12:55:11 GMT</pubDate>
      <dc:creator><![CDATA[kjustin1996]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/kevinjustin/?p=5705</guid>
      <description><![CDATA[&nbsp;



&nbsp;

I blogged about this last year here

&nbsp;

&nbsp;

As best practice,...]]></description>
      <content:encoded><![CDATA[&nbsp;

<img width="252" height="160" class="alignnone size-full wp-image-5715" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/10/analytics.jpg" />

&nbsp;

I blogged about this last year <a target="_blank" href="https://blogs.technet.microsoft.com/kevinjustin/2017/10/30/get-started-with-oms-device-health/" rel="noopener">here</a>

&nbsp;

&nbsp;

As best practice, the Upgrade Analytics script checks for far more than just injecting the workspace key and telemetry value.

&nbsp;

&nbsp;

FYI - This could also be managed in an SCCM Compliance setting.

Paul Fitzgerald - Platform PFE blogged about a non SCCM method <a target="_blank" href="https://blogs.technet.microsoft.com/askpfeplat/2018/07/02/deploying-upgrade-readiness-without-sccm/" rel="noopener">here</a>

&nbsp;

&nbsp;
<h2><strong>Assess requirements for environment:</strong></h2>
&nbsp;

Barebones configuration requires Commercial ID, allow telemetry, and level of telemetry data to send
<p style="padding-left: 30px">Optional - Create key for <span style="color: #000000">IEDataOptIn</span></p>
<p style="padding-left: 90px">Send data to Application Insights</p>
<p style="padding-left: 90px">Customer proxy setup</p>
&nbsp;

&nbsp;

Script has 11 parameters specified, not all are needed (excerpt below from script)

Param(
# run mode (Deployment or Pilot)
[Parameter(Mandatory=$true, Position=1)]
[string]$runMode,

# File share to store logs
[Parameter(Mandatory=$true, Position=2)]
[string]$logPath,

# Commercial ID provided to you
<span style="color: #ff0000">[Parameter(Mandatory=$true, Position=3)]</span>
<span style="color: #ff0000">[string]$commercialIDValue,</span>

# logMode == 0 log to console only
# logMode == 1 log to file and console
# logMode == 2 log to file only
[Parameter(Mandatory=$true, Position=4)]
[string]$logMode,

#To enable IE data, set AllowIEData=IEDataOptIn and set IEOptInLevel
[Parameter(Position=5)]
<span style="color: #ff0000">[string]$AllowIEData,</span>

#IEOptInLevel = 0 Internet Explorer data collection is disabled
#IEOptInLevel = 1 Data collection is enabled for sites in the Local intranet + Trusted sites + Machine local zones
#IEOptInLevel = 2 Data collection is enabled for sites in the Internet + Restricted sites zones
#IEOptInLevel = 3 Data collection is enabled for all sites
[Parameter(Position=6)]
<span style="color: #ff0000">[string]$IEOptInLevel,</span>

[Parameter(Position=7)]
<span style="color: #ff0000">[string]$AppInsightsOptIn,</span>

[Parameter(Position=8)]
<span style="color: #000000">[string]$NoOfAppraiserRetries = 30,</span>

[Parameter(Position=9)]
<span style="color: #ff0000">[string]$ClientProxy = "Direct",</span>

[Parameter(Position=10)]
<span style="color: #ff0000">[int]$HKCUProxyEnable,</span>

[Parameter(Position=11)]
<span style="color: #ff0000">[string]$HKCUProxyServer</span>

&nbsp;

&nbsp;

&nbsp;

Simple method to update machines to send Windows telemetry data:

&nbsp;

&nbsp;

<span><strong>PowerShell script</strong></span>

<span>From PowerShell as Administrator</span>

<span style="color: #3366ff">Set-Location HKLM:</span>

&nbsp;

<span style="color: #3366ff">$registryPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies"</span>

<span style="color: #3366ff">$Name = "DataCollection"</span>

<span style="color: #3366ff">$Name2 = "AllowTelemetry"</span>

<span style="color: #3366ff">$CommercialID = "00000000-0000-0000-0000-000000000000"</span>

<span style="color: #3366ff">$value = "2"  <span style="color: #000000"># Values from 0-3 accepted</span></span>

<span style="color: #3366ff">$vIEDataOptInPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection"</span>

<span style="color: #3366ff">$IEOptInLevel = "2"  <span style="color: #000000"># Values from 0-3 accepted</span></span>

&nbsp;

<span style="color: #3366ff">If ( (Test-Path $registryPath\$Name) ) { write-host -f green "Registry keys already exist" }</span>

<span style="color: #3366ff">If ( ! (Test-Path $registryPath\$Name) )</span>

<span style="color: #3366ff">{</span>

<span style="color: #3366ff">New-ItemProperty -Path $registryPath -Name $name</span>

<span style="color: #3366ff">New-ItemProperty -Path $registryPath -Name $CommercialID</span>

<span style="color: #3366ff">New-ItemProperty -Path $vIEDataOptInPath -Name IEDataOptIn -Type DWord -Value $IEOptInLevel</span>

<span style="color: #3366ff">New-ItemProperty -Path $registryPath\$Name -Name $name2 -Value $value `</span>

<span style="color: #3366ff">    -PropertyType DWORD -Force | Out-Null</span>

<span style="color: #3366ff">Write-host -f green "Registry keys added for Telemetry"</span>

<span style="color: #3366ff">}</span>

&nbsp;

&nbsp;

&nbsp;

&nbsp;

<strong>References</strong>

Configure <a target="_blank" href="https://docs.microsoft.com/en-us/windows/privacy/configure-windows-diagnostic-data-in-your-organization" rel="noopener">telemetry</a>

Get Started <a target="_blank" href="https://docs.microsoft.com/en-us/windows/deployment/update/windows-analytics-get-started" rel="noopener">link</a>

Win 7,8 Opt in <a target="_blank" href="https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-8.1-and-8/appraiser-diagnostic-data-events-and-fields" rel="noopener">link</a>]]></content:encoded>
    </item>
  </channel>
</rss>