<?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>Brad Rutkowski's Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/brad_rutkowski/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/brad_rutkowski/feed.xml</link>
    <description />
    <lastBuildDate>Sat, 18 Apr 2015 07:19:40 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Changing "Sessions" information on user account in Active Directory with Powershell</title>
      <link>https://docs.microsoft.com/archive/blogs/brad_rutkowski/changing-sessions-information-on-user-account-in-active-directory-with-powershell</link>
      <pubDate>Wed, 19 Sep 2012 14:07:20 GMT</pubDate>
      <dc:creator><![CDATA[BooRadely]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/brad_rutkowski/2012/09/19/changing-sessions-information-on-user-account-in-active-directory-with-powershell/</guid>
      <description><![CDATA[Doing some digging with a teammate today it was incredibly difficult to find information on how to...]]></description>
      <content:encoded><![CDATA[<p>Doing some digging with a teammate today it was incredibly difficult to find information on how to automate the settings change of the Sessions tab on a user object.&nbsp; Different paths indicate we need to edit the&nbsp;userParameters attribute but you've probably found that it's a binary blob and not easily manageable.&nbsp; Perhaps you went down the <a title="iadstsuserex" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa380823(v=vs.85).aspx">iadstsuserex</a> road as well.&nbsp; If so, you might want to take a shower and come back now...</p>
<p>Well without further ado, here it is!&nbsp;</p>
<p>&nbsp;</p>
<p><span style="color: #006400; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#006400"><span style="color: #006400; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#006400"><span style="color: #006400; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#006400"># Get the current settings</span></span></span></p>
<p><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500"><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500"><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500">$admin</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"> </span></span><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9">=</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"> </span></span><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9">[</span></span></span><span style="color: #008080; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#008080"><span style="color: #008080; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#008080"><span style="color: #008080; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#008080">adsi</span></span></span><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9">]</span></span></span><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000"><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000"><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000">'LDAP://CN=Administrator,CN=Users,DC=extestdc,DC=extest,DC=microsoft,DC=com'</span></span></span></p>
<p><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500"><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500"><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500">$admin</span></span></span><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9">.</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1">psbase</span></span><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9">.</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1">InvokeGet(</span></span><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000"><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000"><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000">'MaxIdleTime'</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1">)</span></span></p>
<p><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500"><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500"><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500">$admin</span></span></span><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9">.</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1">psbase</span></span><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9">.</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1">InvokeGet(</span></span><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000"><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000"><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000">'MaxConnectionTime'</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1">)</span></span></p>
<p><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500"><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500"><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500">$admin</span></span></span><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9">.</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1">psbase</span></span><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9">.</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1">InvokeGet(</span></span><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000"><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000"><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000">'MaxDisconnectionTime'</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1">)</span></span></p>
<p># Update to new values in minutes...</p>
<p><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500"><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500"><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500">$admin</span></span></span><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9">.</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1">psbase</span></span><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9">.</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1">InvokeSet(</span></span><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000"><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000"><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000">'MaxIdleTime'</span></span></span><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9">,</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"> </span></span><span style="color: #800080; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#800080"><span style="color: #800080; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#800080"><span style="color: #800080; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#800080">5</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1">)</span></span></p>
<p><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500"><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500"><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500">$admin</span></span></span><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9">.</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1">psbase</span></span><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9">.</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1">InvokeSet(</span></span><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000"><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000"><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000">'MaxConnectionTime'</span></span></span><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9">,</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"> </span></span><span style="color: #800080; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#800080"><span style="color: #800080; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#800080"><span style="color: #800080; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#800080">1000</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1">)</span></span></p>
<p><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500"><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500"><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500">$admin</span></span></span><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9">.</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1">psbase</span></span><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9">.</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1">InvokeSet(</span></span><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000"><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000"><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000">'MaxDisconnectionTime'</span></span></span><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9">,</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"> </span></span><span style="color: #800080; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#800080"><span style="color: #800080; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#800080"><span style="color: #800080; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#800080">200</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1">)</span></span></p>
<p><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500"><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500"><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500">$admin</span></span></span><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9">.</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1">psbase</span></span><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9">.</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1">CommitChanges()</span></span></p>
<p># Validate</p>
<p><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500"><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500"><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500">$admin</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"> </span></span><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9">=</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"> </span></span><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9">[</span></span></span><span style="color: #008080; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#008080"><span style="color: #008080; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#008080"><span style="color: #008080; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#008080">adsi</span></span></span><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9">]</span></span></span><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000"><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000"><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000">'LDAP://CN=Administrator,CN=Users,DC=extestdc,DC=extest,DC=microsoft,DC=com'</span></span></span></p>
<p><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500"><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500"><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500">$admin</span></span></span><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9">.</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1">psbase</span></span><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9">.</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1">InvokeGet(</span></span><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000"><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000"><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000">'MaxIdleTime'</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1">)</span></span></p>
<p><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500"><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500"><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500">$admin</span></span></span><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9">.</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1">psbase</span></span><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9">.</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1">InvokeGet(</span></span><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000"><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000"><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000">'MaxConnectionTime'</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1">)</span></span></p>
<p><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500"><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500"><span style="color: #ff4500; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#ff4500">$admin</span></span></span><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9">.</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1">psbase</span></span><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9"><span style="color: #a9a9a9; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#a9a9a9">.</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1">InvokeGet(</span></span><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000"><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000"><span style="color: #8b0000; font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1" color="#8b0000">'MaxDisconnectionTime'</span></span></span><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1"><span style="font-family: Lucida Console; font-size: xx-small;" face="Lucida Console" size="1">) </span></span></p>
<p>&nbsp;</p>
<p>So that is how you do it in powershell.&nbsp; Hopefully someone searching for this topic in the future will find this.</p>
<p>&nbsp;</p>
<p>-B</p>]]></content:encoded>
    </item>
    <item>
      <title>Solution for: A security package specific error occurred</title>
      <link>https://docs.microsoft.com/archive/blogs/brad_rutkowski/solution-for-a-security-package-specific-error-occurred</link>
      <pubDate>Mon, 07 Mar 2011 17:37:27 GMT</pubDate>
      <dc:creator><![CDATA[BooRadely]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/brad_rutkowski/2011/03/07/solution-for-a-security-package-specific-error-occurred/</guid>
      <description><![CDATA[For me the issue was happening with Powershell and Get-Winevent, but it could happen with any number...]]></description>
      <content:encoded><![CDATA[<p>For me the issue was happening with Powershell and Get-Winevent, but it could happen with any number of actions.&nbsp; In my instance the problem occurs when&nbsp;we were&nbsp;using a&nbsp;cross-forest single sign-on account to manage multiple Active Directory forests. In this case if&nbsp;there are multiple computer accounts with the same name in play and one of those stale computer accounts resides in the same domain as your user account it can cause Kerberos to freak out:</p>
<p>PS C:\&gt; get-winevent -ComputerName Server1 -LogName "Microsoft-Exch..." <br />Get-WinEvent : A security package specific error occurred <br />At line:1 char:13 <br />+ get-winevent &lt;&lt;&lt;&lt; -ComputerName Server1 -LogName "Microsoft-Exch" <br />+ CategoryInfo : NotSpecified: (:) [Get-WinEvent], EventLogException <br />+ FullyQualifiedErrorId : System.Diagnostics.Eventing.Reader.EventLogException,Microsoft.PowerShell.Commands.GetWinEventCommand <br />&lt;snip&gt;</p>
<p>Log Name: System</p>
<p>Source: Microsoft-Windows-Security-Kerberos</p>
<p>Date: 3/2/2011 6:06:04 PM</p>
<p>Event ID: 4</p>
<p>Task Category: None</p>
<p>Level: Error</p>
<p>Keywords: Classic</p>
<p>User: N/A</p>
<p>Computer: ClientComputer1.capacity.contoso.com</p>
<p>Description:</p>
<p>The Kerberos client received a KRB_AP_ERR_MODIFIED error from the server . The target name used was host/Server1. This indicates that the target server failed to decrypt the ticket provided by the client. This can occur when the target server principal name (SPN) is registered on an account other than the account the target service is using. Please ensure that the target SPN is registered on, and only registered on, the account used by the server. This error can also happen when the target service is using a different password for the target service account than what the Kerberos Key Distribution Center (KDC) has for the target service account. Please ensure that the service on the server and the KDC are both updated to use the current password. If the server name is not fully qualified, and the target domain () is different from the client domain (mgt.contoso.com), check if there are identically named server accounts in these two domains, or use the fully-qualified name to identify the server.</p>
<p>If&nbsp;we used&nbsp;the FQDN of the server though it worked fine:</p>
<p>PS C:\&gt; get-winevent -ComputerName Server1.capacity.contoso.com -LogName "Microsoft-Exch..." </p>
<p>TimeCreated ProviderName Id Message <br />----------- ------------ -- ------- <br />3/2/2011 4:34:39 PM Microsoft-... 325 Active... <br />3/2/2011 1:34:29 PM Microsoft-... 325 Active... <br />3/2/2011 1:19:46 PM Microsoft-... 221 Trunc ...</p>
<p>&nbsp;</p>
<p><strong><span style="text-decoration: underline;">Solution:</span></strong></p>
<p>1) Delete the stale computer accounts from the forest where your credentials are coming from.</p>
<p>2) Use the FQDN of the server name when trying to connect to the server instead of the flat name.</p>
<p>It kind of makes senses once you see all the pieces in play. By default the LDAP connection is binding to the user forest and&nbsp;finding the wrong spn based on the sort name.&nbsp; </p>
<p>Hope this helps someone.</p>]]></content:encoded>
    </item>
    <item>
      <title>iADSLargeInteger in Powershell getting the RID pool values</title>
      <link>https://docs.microsoft.com/archive/blogs/brad_rutkowski/iadslargeinteger-in-powershell-getting-the-rid-pool-values</link>
      <pubDate>Fri, 23 Apr 2010 13:37:14 GMT</pubDate>
      <dc:creator><![CDATA[BooRadely]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/brad_rutkowski/2010/04/23/iadslargeinteger-in-powershell-getting-the-rid-pool-values/</guid>
      <description><![CDATA[I found that there were a few solutions out there on the internet but still didn’t really get me...]]></description>
      <content:encoded><![CDATA[<p>I found that there were a <a href="https://bsonposh.com/archives/226" target="_blank">few solutions</a> out there on the internet but still didn’t really get me what I was after.&#160; I wanted to find out my total SID count that could be created, and then find the current rid pool high water mark so I could track where were at against that static number.&#160; </p>  <p>&#160;</p>  <p>Here’s the solution, that could work for any INT64 value that is returned from the directory (that wouldn't convert with [datetime]):</p>  <p>&#160;&#160;&#160; <br /><span style="color: #00008b">function</span> <span style="color: #8a2be2">Grab-RidWaterMark</span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br /><span style="color: #000000">{</span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160; <span style="color: #00008b">param</span> <span style="color: #000000">(</span><span style="color: #ff4500">$domainDN</span><span style="color: #000000">)</span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160; <span style="color: #ff4500">$de</span> <span style="color: #a9a9a9">=</span> <span style="color: #008080">[ADSI]</span><span style="color: #8b0000">&quot;LDAP://CN=RID Manager$,CN=System,$domainDN&quot;</span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160; <span style="color: #ff4500">$return</span> <span style="color: #a9a9a9">=</span> <span style="color: #0000ff">new-object</span> <span style="color: #8a2be2">system.DirectoryServices.DirectorySearcher</span><span style="color: #000000">(</span><span style="color: #ff4500">$de</span><span style="color: #000000">)</span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160; <span style="color: #ff4500">$property</span><span style="color: #a9a9a9">=</span> <span style="color: #000000">(</span><span style="color: #ff4500">$return</span><span style="color: #a9a9a9">.</span><span style="color: #000000">FindOne</span><span style="color: #000000">(</span><span style="color: #000000">)</span><span style="color: #000000">)</span><span style="color: #a9a9a9">.</span><span style="color: #000000">properties</span><span style="color: #a9a9a9">.</span><span style="color: #000000">ridavailablepool</span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160; <span style="color: #006400">#get the high/low parts of int64 value, which is the samething that &quot;large integer converter: in LDP is doing.</span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160; <span style="color: #008080">[int32]</span><span style="color: #ff4500">$totalSIDS</span> <span style="color: #a9a9a9">=</span> <span style="color: #000000">$(</span><span style="color: #ff4500">$property</span><span style="color: #000000">)</span> <span style="color: #a9a9a9">/</span> <span style="color: #000000">(</span><span style="color: #008080">[math]</span><span style="color: #a9a9a9">::</span><span style="color: #000000">Pow</span><span style="color: #000000">(</span><span style="color: #800080">2</span><span style="color: #a9a9a9">,</span><span style="color: #800080">32</span><span style="color: #000000">)</span><span style="color: #000000">)</span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160; <span style="color: #008080">[int64]</span><span style="color: #ff4500">$temp64val</span> <span style="color: #a9a9a9">=</span> <span style="color: #ff4500">$totalSIDS</span> <span style="color: #a9a9a9">*</span> <span style="color: #000000">(</span><span style="color: #008080">[math]</span><span style="color: #a9a9a9">::</span><span style="color: #000000">Pow</span><span style="color: #000000">(</span><span style="color: #800080">2</span><span style="color: #a9a9a9">,</span><span style="color: #800080">32</span><span style="color: #000000">)</span><span style="color: #000000">)</span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160; <span style="color: #008080">[int32]</span><span style="color: #ff4500">$currentRIDPoolCount</span> <span style="color: #a9a9a9">=</span> <span style="color: #000000">$(</span><span style="color: #ff4500">$property</span><span style="color: #000000">)</span> <span style="color: #a9a9a9">-</span> <span style="color: #ff4500">$temp64val</span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160; <span style="color: #0000ff">Write-Host</span> <span style="color: #8b0000">&quot;Total SIDs that can be created: $totalSIDS&quot;</span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160; <span style="color: #0000ff">Write-Host</span> <span style="color: #8b0000">&quot;Latest RID pool high water mark: $currentRIDPoolCount&quot;</span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br /><span style="color: #000000">}</span></p>  <p><span style="color: #000000">Results:</span></p>  <p>PS C:\&gt; Grab-RidWaterMark -domainDN &quot;dc=brad,dc=forest,dc=test&quot;   <br />Total SIDs that can be created: 1073741823    <br />Latest RID pool high water mark: 12271600</p>  <p>&#160;</p>  <p>Cheers.</p>  <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:c8f52db2-a59f-43c7-b25e-9851fc8446bd" class="wlWriterEditableSmartContent">Technorati Tags: <a href="https://technorati.com/tags/rids" rel="tag">rids</a>,<a href="https://technorati.com/tags/AD" rel="tag">AD</a>,<a href="https://technorati.com/tags/powershell" rel="tag">powershell</a></div>]]></content:encoded>
    </item>
    <item>
      <title>win32_processor and cim_processor CurrentClockSpeed shows lower value than actual processor speed</title>
      <link>https://docs.microsoft.com/archive/blogs/brad_rutkowski/win32_processor-and-cim_processor-currentclockspeed-shows-lower-value-than-actual-processor-speed</link>
      <pubDate>Thu, 16 Apr 2009 15:50:05 GMT</pubDate>
      <dc:creator><![CDATA[BooRadely]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/brad_rutkowski/2009/04/16/win32_processor-and-cim_processor-currentclockspeed-shows-lower-value-than-actual-processor-speed/</guid>
      <description><![CDATA[Was looking at an issue today where a whole bunch of our servers were showing clock speeds that...]]></description>
      <content:encoded><![CDATA[<p>Was looking at an issue today where a whole bunch of our servers were showing clock speeds that didn’t match the max clock speed.&#160; These servers were showing up on our <a href="https://technet.microsoft.com/en-us/exchange/bb288481.aspx" target="_blank">exBPA</a> reports and thus landed in my lap to investigate.&#160; At first I assumed that something most be wrong with the report and so I logged onto a couple and sure enough they didn’t match the max speed:</p>  <p><font size="2" face="Courier New">PS C:\&gt; get-wmiobject win32_processor | select=object currentclock*,max* | format-table -automatic</font></p>  <p><font size="2" face="Courier New">CurrentClockSpeed MaxClockSpeed     <br />----------------- -------------      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 1999&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2332      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 1999&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2332</font></p>  <p>So with a bit of digging on the internet I found a page referencing the Enhanced Intel SpeedStep Technology:</p>  <p><em>SpeedStep is a trademark for a series of dynamic frequency scaling technologies (including SpeedStep, SpeedStep II, and SpeedStep III) built into some Intel microprocessors that allow the clock speed of the processor to be dynamically changed by software. This allows the processor to meet the instantaneous performance needs of the operation being performed, while minimizing power draw and heat dissipation.</em></p>  <p><em></em></p>  <p>Well that seemed promising, so I found out that you can turn this off in power options in the control panel, setting the minimum processor state to 100%:</p>  <p><img src="https://i149.photobucket.com/albums/s62/brad9987/Capture-5.jpg" width="307" height="287" /> </p>  <p><font size="2" face="Courier New">PS C:\&gt; gwmi win32_processor | select-object currentclock*,max* | ft -au </font></p>  <p><font size="2" face="Courier New">CurrentClockSpeed MaxClockSpeed     <br />----------------- -------------      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2332&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2332      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2332&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2332</font></p>  <p>In the end I just turned it back on as this does save power and will dynamically increase to full usage when needed.&#160; Another mystery solved…</p>  <p>&#160;</p>  <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:4b0b5cef-b58f-421e-a9f0-c8fd3730729f" class="wlWriterEditableSmartContent">Technorati Tags: <a href="https://technorati.com/tags/Windows+2008" rel="tag">Windows 2008</a></div>]]></content:encoded>
    </item>
    <item>
      <title>NTDS performance counters missing</title>
      <link>https://docs.microsoft.com/archive/blogs/brad_rutkowski/ntds-performance-counters-missing</link>
      <pubDate>Thu, 19 Mar 2009 17:28:52 GMT</pubDate>
      <dc:creator><![CDATA[BooRadely]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/brad_rutkowski/2009/03/19/ntds-performance-counters-missing/</guid>
      <description><![CDATA[Thought I’d doc this for any others who run into this issue.&#160; I had to demote/promote a machine...]]></description>
      <content:encoded><![CDATA[<p>Thought I’d doc this for any others who run into this issue.&#160; I had to demote/promote a machine this morning and when it finished promoting I found it was missing all the NTDS\* counters in perfmon.&#160; </p>  <p>I ran LODCTR /Q and saw that it looked wrong:</p>  <p>&#160;</p>  <p><font size="2" face="Courier New">C:\Windows\system32&gt;lodctr /q:NTDS     <br />Performance Counter ID Queries [PERFLIB]:      <br />&#160;&#160;&#160; Base Index: 0x00000737 (1847)      <br />&#160;&#160;&#160; Last Counter Text ID: 0x00001792 (6034)      <br />&#160;&#160;&#160; Last Help Text ID: 0x00001793 (6035)</font></p>  <p><font size="2" face="Courier New"></font></p>  <p>Looking into it further I found it was missing the whole performance key:</p>  <p>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NTDS\Performance</p>  <p>&#160;</p>  <p>Once I found that, I exported the performance registry key from another domain controller and imported to the server missing the values and ran LODCTR /R and then the counters were back where they belonged…</p>  <p>&#160;</p>  <p><font size="2" face="Courier New">C:\Windows\system32&gt;lodctr /q:NTDS     <br />Performance Counter ID Queries [PERFLIB]:      <br />&#160;&#160;&#160; Base Index: 0x00000737 (1847)      <br />&#160;&#160;&#160; Last Counter Text ID: 0x00001794 (6036)      <br />&#160;&#160;&#160; Last Help Text ID: 0x00001795 (6037) </font></p>  <p><font size="2" face="Courier New">[NTDS] Performance Counters (Enabled)     <br />&#160;&#160;&#160; DLL Name: %systemroot%\system32\ntdsperf.dll      <br />&#160;&#160;&#160; Open Procedure: OpenNtdsPerformanceData      <br />&#160;&#160;&#160; Collect Procedure: CollectNtdsPerformanceData      <br />&#160;&#160;&#160; Close Procedure: CloseNtdsPerformanceData      <br />&#160;&#160;&#160; First Counter ID: 0x000009DE (2526)      <br />&#160;&#160;&#160; Last Counter ID: 0x000009DE (2526)      <br />&#160;&#160;&#160; First Help ID: 0x000009DF (2527)      <br />&#160;&#160;&#160; Last Help ID: 0x000009DF (2527)</font></p>]]></content:encoded>
    </item>
    <item>
      <title>Interacting with Data Collector Sets via Powershell</title>
      <link>https://docs.microsoft.com/archive/blogs/brad_rutkowski/interacting-with-data-collector-sets-via-powershell</link>
      <pubDate>Wed, 18 Feb 2009 16:30:12 GMT</pubDate>
      <dc:creator><![CDATA[BooRadely]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/brad_rutkowski/2009/02/18/interacting-with-data-collector-sets-via-powershell/</guid>
      <description><![CDATA[Background:  In an earlier post I talked about some new features for Windows 2008 and Vista.&#160;...]]></description>
      <content:encoded><![CDATA[<p><strong><u>Background:</u></strong></p>  <p>In an <a href="https://blogs.technet.com/brad_rutkowski/archive/2007/04/14/hey-admins-let-s-explore-vista-together-part-1.aspx" target="_blank">earlier post</a> I talked about some new features for Windows 2008 and Vista.&#160; One of those new features that is often overlooked are the data collector sets (DCS).&#160; One particular role that leverages data collector sets is active directory.&#160; Active directory has put “hooks” into tracing that can really take a lot of the thinking out of the question “why is my domain controller sluggish”.&#160; For those of you still running Windows 2003 I go over a similar concept called <a href="https://blogs.technet.com/brad_rutkowski/archive/2007/06/26/great-tool-for-windows-2003-server-performance-advisor-spa.aspx" target="_blank">Server Performance Advisor</a>.&#160; </p>  <p>Anyways, you can play around with DCS by typing perfmon and then traversing to the section called Data Collector Sets (shocking).&#160; If you have performance issues, go here first as it’s like combining a netmon capture with a kernel trace and then handing you the smoking gun.&#160; </p>  <p>&#160;<img src="https://i149.photobucket.com/albums/s62/brad9987/Capture-3.jpg" /> </p>  <p><strong><u>Challenge:</u></strong></p>  <p>In my current role, we have a need to automate things quite a bit and so one of the actions I was looking at solving was collecting diagnostic information when a server is performing poorly.&#160; Usually when a high CPU alert comes in, someone would need to logon to the server and go to perfmon and start at DCS collection.&#160; More often is the case that by the time someone had been alerted and went to the server the sluggish behavior had subsided (the dreaded “close ticket, no problem found”).</p>  <p>My solution was to try and figure out a way to start a DCS collection remotely at the time of event so that the data was present when an actual human became engaged.</p>  <p>After some hard work, here is the code to do so!&#160; You can create your own XML file (your own DCS template) and pass it in, but more than likely you’ll be happy at just kicking off one of the built-in templates (AD/System Perf/System Diags).</p>  <p><strong><u>Running it via powershell:</u></strong></p>  <p>First, how to do it on the fly:</p>  <div>   <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #008000">## PLA.dll lives under system32 on Vista and 2k8.  This will create a powershell com object.</span>
$datacollectorset = new-object -COM Pla.DataCollectorSet
<span style="color: #008000">##This is the name of the predefined DCS collector.  It's read-only and will always be System\&lt;something&gt;</span>
$name = <span style="color: #006080">&quot;System\Active Directory Diagnostics&quot;</span>
<span style="color: #008000">##If you make the second param $null it will be the local machine.</span>
$datacollectorset.Query($name,<span style="color: #006080">&quot;serverA&quot;</span>) 
$datacollectorset.start($false)
<span style="color: #008000">## Status ReturnCodes: 0=stopped 1=running 2=compiling 3=queued (legacy OS) 4=unknown (usually autologger)</span>
$datacollectorset.status
<span style="color: #008000">##When you're ready to stop it call stop.</span>
$datacollectorset.stop($false)
<span style="color: #008000">##If you call status here, it will probably be '2' for a while as the server compiles the report.</span>
$datacollectorset.status</pre>
</div>

<p>And like so, you started and stopped a collection for Active Directory on you’re local computer or a remote server!&#160; Like I said though, you can create you’re own templates too.&#160; You might want to do this if you want to setup a built-in template to be scheduled to run daily, or perhaps you want to send the data to a network location, run more tasks at completion, etc.&#160; If you do want to create a custom template then the code changes a bit:</p>

<div>
  <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">$datacollectorset = new-object -COM Pla.DataCollectorSet
<span style="color: #008000">## If you're making you're own (shows up under user defined).  </span>
$xml = get-content C:\custom.xml <span style="color: #008000">#You're custom exported XML file.</span>
$datacollectorset.SetXml($xml)
<span style="color: #008000">##Commit codes: https://msdn.microsoft.com/en-us/library/aa371873(VS.85).aspx this is add or modify.  Can't do this on a system created PLA instances (read only).</span>
$datacollectorset.Commit($DCSPath , $null , 0x0003)     
$datacollectorset.Query($DCSPath,$null)
$datacollectorset.start($false)
<span style="color: #008000">#Runs...</span>
$datacollectorset.stop($false)</pre>
</div>

<p><strong><u>Scripting a solution:</u></strong></p>

<p>Finally if you wanted to script this you could do something like what I’ve done below.&#160; This would collect for a desired interval (in seconds) and then when compilation completed display the path to the report.&#160; I wrote this in CTP3, but you can easily take the concepts and backport them.&#160; If the destination server is inaccessible, or you don't have permissions, then the script will blow up…</p>

<div>
  <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">&lt;<span style="color: #008000">#</span>
    .SYNOPSIS
    This will fire up a PLA (Data Collector Set collection on a server and then copy it to the proper debug server
 
    .DESCRIPTION
    This is a proof of concept and only acceppts System defined collections.  No error handling so I hope you type well.

<span style="color: #008000">#&gt;</span>

<span style="color: #008000">##Inputs</span>
[CmdletBinding()]
<span style="color: #0000ff">param</span>(
   [Parameter(Mandatory = $true)]
   &lt;<span style="color: #008000">#A system provided report to run like &quot;System\System Performance&quot;, System\System Diagnostics, etc. #&gt;</span>
   [string]$DCSPath,
   [Parameter(Mandatory = $true)]
   &lt;<span style="color: #008000"># This is how long you want the DCS collection to run in seconds#&gt;</span>
   [int32]$time,
   [Parameter(Mandatory = $false)]
   &lt;<span style="color: #008000">#If you don't pass in a server name it will be $null and run on the local system#&gt;</span>
   [string]$serverName
    )

    $datacollectorset = new-object -COM Pla.DataCollectorSet  
    $datacollectorset.Query($DCSPath,$serverName)
    $datacollectorset.start($false)
    Start-Sleep $time
    $datacollectorset.stop($false)
    
    <span style="color: #008000">##Now we'll loop while the report compiles.</span>
    $retries = 0
    do 
        {sleep 30; $returnCode = $datacollectorset.Status ; $retries++} 
    <span style="color: #0000ff">while</span> ($returnCode <span style="color: #cc6633">-eq</span> 2 -and $retries <span style="color: #cc6633">-lt</span> 60)
    
    <span style="color: #0000ff">if</span> ($retries <span style="color: #cc6633">-eq</span> 60)
    {
        Write-Warning <span style="color: #006080">&quot;Compiling has been running on the server for 30 minutes!  You'll need to check the following location on the server later for the report:&quot;</span>
        Write-Warning $datacollectorset.OutputLocation
        <span style="color: #0000ff">break</span>
    }
    
    <span style="color: #008000">##Compiling has finished, now we can copy the folder to some location</span>
    $path = $datacollectorset.OutputLocation
    <span style="color: #0000ff">if</span> ($serverName)
    {
    $path = $path.Replace(<span style="color: #006080">&quot;:&quot;</span>,<span style="color: #006080">&quot;$&quot;</span>)
    Write-Host <span style="color: #006080">&quot;`nReport complete and can be viewed at \\$serverName\$path\report.html on the server.`n&quot;</span> 
    }
    <span style="color: #0000ff">else</span>
    {
    Write-Host <span style="color: #006080">&quot;`nReport complete and can be viewed at $path\report.html`n&quot;</span>
    }
    
   </pre>
</div>

<p><strong><u>The result:</u></strong></p>

<p><img src="https://i149.photobucket.com/albums/s62/brad9987/Capture-4.jpg" /> </p>

<p></p>

<p><strong><u>More info:</u></strong></p>

<p>PLA reference: <a title="https://msdn.microsoft.com/en-us/library/aa372634(VS.85).aspx" href="https://msdn.microsoft.com/en-us/library/aa372634(VS.85).aspx">https://msdn.microsoft.com/en-us/library/aa372634(VS.85).aspx</a></p>

<p>&#160;</p>

<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:13243a34-9c35-4042-b4eb-9f0961bae121" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="https://technorati.com/tags/Powershell" rel="tag">Powershell</a>,<a href="https://technorati.com/tags/Windows+2008" rel="tag">Windows 2008</a>,<a href="https://technorati.com/tags/Active+Directory" rel="tag">Active Directory</a>,<a href="https://technorati.com/tags/Windows" rel="tag">Windows</a></div>]]></content:encoded>
    </item>
    <item>
      <title>Powershell V2 CTP3 released</title>
      <link>https://docs.microsoft.com/archive/blogs/brad_rutkowski/powershell-v2-ctp3-released</link>
      <pubDate>Mon, 22 Dec 2008 22:21:45 GMT</pubDate>
      <dc:creator><![CDATA[BooRadely]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/brad_rutkowski/2008/12/22/powershell-v2-ctp3-released/</guid>
      <description><![CDATA[Been using this internally for the last couple of weeks and have been digging the changes.&#160;...]]></description>
      <content:encoded><![CDATA[<p>Been using this internally for the last couple of weeks and have been digging the changes.&#160; Just wanted to put this out here to spread the word.</p>  <p>&#160;</p>  <p><a title="https://blogs.msdn.com/powershell/archive/2008/12/23/early-christmas-present-from-powershell-team-community-technology-preview-3-ctp3-of-windows-powershell-v2.aspx" href="https://blogs.msdn.com/powershell/archive/2008/12/23/early-christmas-present-from-powershell-team-community-technology-preview-3-ctp3-of-windows-powershell-v2.aspx">https://blogs.msdn.com/powershell/archive/2008/12/23/early-christmas-present-from-powershell-team-community-technology-preview-3-ctp3-of-windows-powershell-v2.aspx</a></p>  <p>&#160;</p>  <p>Happy Holidays.</p>  <p>&#160;</p>  <div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:6cf21464-6c7f-4464-9917-8e3f1fcf23df" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="https://technorati.com/tags/powershell" rel="tag">powershell</a></div>]]></content:encoded>
    </item>
    <item>
      <title>Check that driver file versions match on all your cluster nodes via Powershell</title>
      <link>https://docs.microsoft.com/archive/blogs/brad_rutkowski/check-that-driver-file-versions-match-on-all-your-cluster-nodes-via-powershell</link>
      <pubDate>Wed, 03 Dec 2008 18:25:00 GMT</pubDate>
      <dc:creator><![CDATA[BooRadely]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/brad_rutkowski/2008/12/03/check-that-driver-file-versions-match-on-all-your-cluster-nodes-via-powershell/</guid>
      <description><![CDATA[This is more of a proof of concept, but I've used it with success internally.&nbsp; Take it and do...]]></description>
      <content:encoded><![CDATA[<P><BR>This is more of a proof of concept, but I've used it with success internally.&nbsp; Take it and do with it what you want.&nbsp; Many thx to <A href="https://bsonposh.com/" target=_blank mce_href="https://bsonposh.com/">Brandon</A> who did the "heavy lifting" when I got stuck!</P>
<P><STRONG>Overview:</STRONG></P>
<P>Ever run into cluster issues and wanted to see if the driver file versions matched on all the nodes of the cluster to rule out a mismatch on a driver level?&nbsp; Well I did!&nbsp; The basic gist is that you can show all the file versions for each node by just running the script against a node name.&nbsp; If you want to see only the drivers that don’t match then you’d use the pipeline with where-object (?).</P>
<P><STRONG>Typical output:</STRONG></P>
<P><EM>When All drivers match: <BR></EM>PS C:\Debuggers&gt; Test-MSCluster.ps1 ServerSQL11 | ?{!$_.IsSame} <BR>Getting Nodes via WMI <BR>Getting the drivers on: ServerSQL11 <BR>Getting the file versions for the drivers on: ServerSQL11 <BR>Getting the drivers on: ServerSQL12 <BR>Getting the file versions for the drivers on: ServerSQL12 <BR>PS C:\Debuggers&gt; </P>
<P><EM>One Mismatch: <BR></EM>PS C:\Debuggers&gt; Test-MSCluster.ps1 ServerAX | ?{!$_.IsSame} <BR>Getting Nodes via WMI <BR>Getting the drivers on: ServerAX <BR>Getting the file versions for the drivers on: ServerAX <BR>Getting the drivers on: ServerBX <BR>Getting the file versions for the drivers on: ServerBX </P>
<P>FileName&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ServerAX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ServerBX <BR>--------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ---------- <BR>rmcast.sys&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6.0.6001.18000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6.0.6001.18069</P>
<P><BR><EM>Many nodes, many mismatches:</EM></P>
<P>PS C:\Debuggers&gt; Test-MSCluster.ps1 Server-Clus--11 | ?{!$_.IsSame}&nbsp; <BR>Getting Nodes via WMI <BR>Getting the drivers on: Server-Clus--10 <BR>Getting the file versions for the drivers on: Server-Clus--10 <BR>Getting the drivers on: Server-Clus--11 <BR>Getting the file versions for the drivers on: Server-Clus--11 <BR>Getting the drivers on: Server-Clus--15 <BR>Getting the file versions for the drivers on: Server-Clus--15 <BR>Getting the drivers on: Server-Clus--16 <BR>Getting the file versions for the drivers on: Server-Clus--16 <BR>Getting the drivers on: Server-Clus--13 <BR>Getting the file versions for the drivers on: Server-Clus--13 <BR>Getting the drivers on: Server-Clus--12 <BR>Getting the file versions for the drivers on: Server-Clus--12 </P>
<P>FileName&nbsp;&nbsp; : Dbgv.sys <BR>Server-Clus--10 : 4.60 <BR>Server-Clus--11 : FileMissing <BR>Server-Clus--15 : FileMissing <BR>Server-Clus--16 : FileMissing <BR>Server-Clus--13 : FileMissing <BR>Server-Clus--12 : FileMissing <BR>IsSame&nbsp;&nbsp;&nbsp;&nbsp; : False </P>
<P>FileName&nbsp;&nbsp; : HpCISSs2.sys <BR>Server-Clus--10 : FileMissing <BR>Server-Clus--11 : FileMissing <BR>Server-Clus--15 : FileMissing <BR>Server-Clus--16 : 6.8.0.64 Build 9 (x86-64) <BR>Server-Clus--13 : 6.8.0.64 Build 9 (x86-64) <BR>Server-Clus--12 : 6.8.0.64 Build 9 (x86-64) <BR>IsSame&nbsp;&nbsp;&nbsp;&nbsp; : False </P>
<P>FileName&nbsp;&nbsp; : USBSTOR.SYS <BR>Server-Clus--10 : FileMissing <BR>Server-Clus--11 : FileMissing <BR>Server-Clus--15 : FileMissing <BR>Server-Clus--16 : FileMissing <BR>Server-Clus--13 : 6.0.6001.18000 <BR>Server-Clus--12 : 6.0.6001.18000 <BR>IsSame&nbsp;&nbsp;&nbsp;&nbsp; : False </P>
<P>FileName&nbsp;&nbsp; : mrxsmb10.sys <BR>Server-Clus--10 : 6.0.6001.18000 <BR>Server-Clus--11 : 6.0.6001.18000 <BR>Server-Clus--15 : 6.0.6001.18000 <BR>Server-Clus--16 : 6.0.6001.18068 <BR>Server-Clus--13 : 6.0.6001.18000 <BR>Server-Clus--12 : 6.0.6001.18000 <BR>IsSame&nbsp;&nbsp;&nbsp;&nbsp; : False </P>
<P>FileName&nbsp;&nbsp; : nm3.sys <BR>Server-Clus--10 : 03.02.0764.0001 <BR>Server-Clus--11 : FileMissing <BR>Server-Clus--15 : FileMissing <BR>Server-Clus--16 : FileMissing <BR>Server-Clus--13 : FileMissing <BR>Server-Clus--12 : FileMissing <BR>IsSame&nbsp;&nbsp;&nbsp;&nbsp; : False</P>
<DIV class=code>Code:</DIV>
<DIV class=code>&nbsp;</DIV>
<DIV class=code>&nbsp;</DIV>
<DIV><PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"><SPAN style="COLOR: #008000">######################################################################</SPAN>
<SPAN style="COLOR: #008000">#Test-MSCluster.ps1</SPAN>
Param($ClusterNode)

<SPAN style="COLOR: #008000"># I am using this hashtable to store a unique list of file names. </SPAN>
$Files = @{}
<SPAN style="COLOR: #008000"># I am using this array to store my custom objects we create later.</SPAN>
$FileObjects = @()

Write-Host <SPAN style="COLOR: #006080">"Getting Nodes via WMI"</SPAN>
$nodes = gwmi -q <SPAN style="COLOR: #006080">"Select name from MSCluster_Node"</SPAN> -namespace root\mscluster -computername $ClusterNode -Authentication PacketPrivacy | %{$_.Name}

<SPAN style="COLOR: #008000"># Here we process each node and get all the drivers from the node and add it to our $Files HashTable to be processed</SPAN>
<SPAN style="COLOR: #0000ff">foreach</SPAN> ( $node <SPAN style="COLOR: #0000ff">in</SPAN> $nodes )
{
    Write-Host <SPAN style="COLOR: #006080">"Getting the drivers on:"</SPAN>  $node
    <SPAN style="COLOR: #008000"># Here we are getting a list of the .sys files. Notice I am only getting the names</SPAN>
    $filelistFinal = get-childitem <SPAN style="COLOR: #006080">"\\$node\admin$\system32\drivers"</SPAN> *.sys | %{$_.name}
    
    Write-Host <SPAN style="COLOR: #006080">"Getting the file versions for the drivers on:"</SPAN> $node
    <SPAN style="COLOR: #0000ff">foreach</SPAN>($file <SPAN style="COLOR: #0000ff">in</SPAN> $filelistFinal)
    {
        <SPAN style="COLOR: #008000"># foreach file found we add it to the hasttable, but hashtables can only have a key once</SPAN>
        <SPAN style="COLOR: #008000"># so we need check if the key already exist. I do this because it is possible you could have</SPAN>
        <SPAN style="COLOR: #008000"># unique drivers per node.</SPAN>
        <SPAN style="COLOR: #0000ff">if</SPAN>(!$Files.$file)
        {
            $Files.Add($file,<SPAN style="COLOR: #006080">"added"</SPAN>)
        }
    }
}

<SPAN style="COLOR: #008000"># Ok... now we have all our files time to process the hashtable and create our custom objects</SPAN>
<SPAN style="COLOR: #0000ff">foreach</SPAN>($FileName <SPAN style="COLOR: #0000ff">in</SPAN> $Files.Keys)
{
    <SPAN style="COLOR: #008000"># This is how I create an object for each file</SPAN>
    $myFileObj = New-Object System.Object
    
    <SPAN style="COLOR: #008000"># This is how we add a property. In this case the FileName property. For these scenarios I chose add-member</SPAN>
    <SPAN style="COLOR: #008000"># because you can dynamically add properties (i.e. NodeName with value of File version)</SPAN>
    $myFileobj | add-Member -MemberType NoteProperty -Name FileName -Value $FileName
    
    <SPAN style="COLOR: #008000"># Now we need to add properties for each node.</SPAN>
    <SPAN style="COLOR: #0000ff">foreach</SPAN>($node <SPAN style="COLOR: #0000ff">in</SPAN> $nodes)
    {
        <SPAN style="COLOR: #008000"># Making sure the file exist on the node</SPAN>
        <SPAN style="COLOR: #0000ff">if</SPAN>(Test-Path \\$node\admin$\system32\drivers\$FileName)
        {
            <SPAN style="COLOR: #008000"># Getting ProductVersion Info to use as the value for the Node Property</SPAN>
            $fileInfo = [system.diagnostics.fileversioninfo]::getversioninfo(<SPAN style="COLOR: #006080">"\\$node\admin$\system32\drivers\$FileName"</SPAN>)
            $myFileobj | add-Member -MemberType NoteProperty -Name $node -Value $FileInfo.ProductVersion
        }
        <SPAN style="COLOR: #0000ff">else</SPAN>
        {
            <SPAN style="COLOR: #008000"># File not found using FileMissing as the value for the Node Property</SPAN>
            $myFileobj | add-Member -MemberType NoteProperty -Name $node -Value <SPAN style="COLOR: #006080">"FileMissing"</SPAN>
        }
    }
    <SPAN style="COLOR: #008000"># Outputting Object</SPAN>
    $FileObjects += $myFileObj
}

<SPAN style="COLOR: #0000ff">foreach</SPAN>($result <SPAN style="COLOR: #0000ff">in</SPAN> $FileObjects)
{
    $isSame = $true
    <SPAN style="COLOR: #008000"># Getting Server Name from Properties of the custom object</SPAN>
    $servers = $result | Get-Member -MemberType Noteproperty | ?{$_.Name <SPAN style="COLOR: #cc6633">-ne</SPAN> <SPAN style="COLOR: #006080">"FileName"</SPAN>} | %{$_.Name}
    
    <SPAN style="COLOR: #008000"># Checking the value of each server vs the other servers</SPAN>
    <SPAN style="COLOR: #0000ff">foreach</SPAN>($server <SPAN style="COLOR: #0000ff">in</SPAN> $servers)
    {
        <SPAN style="COLOR: #0000ff">foreach</SPAN>($srv <SPAN style="COLOR: #0000ff">in</SPAN> $servers)
        {
            <SPAN style="COLOR: #0000ff">if</SPAN>($srv <SPAN style="COLOR: #cc6633">-ne</SPAN> $server)
            {
                <SPAN style="COLOR: #008000"># If the the value is different we set $isSame to $false</SPAN>
                <SPAN style="COLOR: #0000ff">if</SPAN>($result.<SPAN style="COLOR: #006080">"$srv"</SPAN> <SPAN style="COLOR: #cc6633">-ne</SPAN> $result.<SPAN style="COLOR: #006080">"$server"</SPAN>){$isSame = $false}
            }
        }
    }
    <SPAN style="COLOR: #008000"># add the isSame property to the object</SPAN>
    $result | add-Member -MemberType NoteProperty -Name IsSame -value $isSame
    
    <SPAN style="COLOR: #008000"># output object</SPAN>
    $result 
}
<SPAN style="COLOR: #008000">######################################################################</SPAN></PRE></DIV>
<P mce_keep="true">&nbsp;</P>
<P>***Note:&nbsp; This script is not fast, as it is getting the file versions for every driver (*.sys)&nbsp; on each system,&nbsp; I'd highly suggest not running this over the WAN...</P>]]></content:encoded>
    </item>
    <item>
      <title>SET-ACL on registry key</title>
      <link>https://docs.microsoft.com/archive/blogs/brad_rutkowski/set-acl-on-registry-key</link>
      <pubDate>Mon, 29 Sep 2008 11:06:49 GMT</pubDate>
      <dc:creator><![CDATA[BooRadely]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/brad_rutkowski/2008/09/29/set-acl-on-registry-key/</guid>
      <description><![CDATA[Man it was hard to find info on using set-acl on a registry key!&#160;&#160; I was looking for a...]]></description>
      <content:encoded><![CDATA[<p></p>  <p>Man it was hard to find info on using set-acl on a registry key!&#160;&#160; I was looking for a way to set an ACL that once set would be inherited by child keys and values.&#160;&#160;&#160; We needed to give “Local Service” full control on the registry key below and have the subkeys inherit the permission.&#160; You might say:&#160; “Why not use SUBINACL?”, well due to a bug or by design SUBINACL doesn’t work for WIN7 server core (probably should look into that).&#160; Besides, why call an exe when you can do it natively in PS.&#160; Anyways here is the code that ended up working.&#160; Hope next time someone goes looking for this it’ll be the first hit.</p>  <p>&#160;</p>  <p><font face="cour" size="1">PS C:\&gt; $acl= get-acl -path &quot;hklm:\SOFTWARE\Microsoft\Reliability Analysis&quot;</font></p>  <p><font face="cour" size="1">PS C:\&gt; $inherit = [system.security.accesscontrol.InheritanceFlags]&quot;ContainerInherit, ObjectInherit&quot;</font></p>  <p><font face="cour" size="1">PS C:\&gt; $propagation = [system.security.accesscontrol.PropagationFlags]&quot;None&quot;</font></p>  <p><font face="cour" size="1">PS C:\&gt; $rule=new-object system.security.accesscontrol.registryaccessrule &quot;LOCAL SERVICE&quot;,&quot;FullControl&quot;,$inherit,$propagation,&quot;Allow&quot;</font></p>  <p><font face="cour" size="1">PS C:\&gt; $acl.addaccessrule($rule)</font></p>  <p><font face="cour" size="1">PS C:\&gt; $acl|set-acl</font></p>  <p><font size="1"></font></p>  <p><font size="1"><strong><em>And the output of GET-ACL shows local service now:</em></strong></font></p>  <p><font face="cour" size="1">PS C:\&gt; get-acl -path &quot;hklm:\SOFTWARE\Microsoft\Reliability Analysis&quot; | fl <font color="#ff0000">&lt;—Verifying that it got set.</font></font></p>  <p><font face="cour" size="1">Path&#160;&#160; : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Reliability Analysis</font></p>  <p><font face="cour" size="1">Owner&#160; : BUILTIN\Administrators</font></p>  <p><font face="cour" size="1">Group&#160; : DOMAIN\Domain Users</font></p>  <p><font face="cour" size="1"><strong>Access : NT AUTHORITY\LOCAL SERVICE Allow&#160; FullControl</strong></font></p>  <p><font face="cour" size="1">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; BUILTIN\Users Allow&#160; ReadKey</font></p>  <p><font face="cour" size="1">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; BUILTIN\Users Allow&#160; -2147483648</font></p>  <p><font face="cour" size="1">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; BUILTIN\Administrators Allow&#160; FullControl</font></p>  <p><font face="cour" size="1">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; BUILTIN\Administrators Allow&#160; 268435456</font></p>  <p><font face="cour" size="1">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; NT AUTHORITY\SYSTEM Allow&#160; FullControl</font></p>  <p><font face="cour" size="1">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; NT AUTHORITY\SYSTEM Allow&#160; 268435456</font></p>  <p><font face="cour" size="1">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; CREATOR OWNER Allow&#160; 268435456</font></p>  <p><font face="cour" size="1">Audit&#160; :</font></p>  <p><font face="cour" size="1">Sddl&#160;&#160; : O:BAG:DUD:AI(A;OICI;KA;;;LS)(A;ID;KR;;;BU)(A;CIIOID;GR;;;BU)(A;ID;KA;;;BA)(A;CIIOID;GA;;;BA)(A;ID;KA;;;SY)(A;CIIOID;GA;;;SY)(A;CIIOID;GA;;;CO)</font></p>]]></content:encoded>
    </item>
    <item>
      <title>Caught the Powershell Bug.</title>
      <link>https://docs.microsoft.com/archive/blogs/brad_rutkowski/caught-the-powershell-bug</link>
      <pubDate>Fri, 26 Sep 2008 16:35:43 GMT</pubDate>
      <dc:creator><![CDATA[BooRadely]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/brad_rutkowski/2008/09/26/caught-the-powershell-bug/</guid>
      <description><![CDATA[Over the past few months I have fallen in love with PowerShell.&#160;&#160; I’ve taken on a new role...]]></description>
      <content:encoded><![CDATA[<p>Over the past few months I have fallen in love with PowerShell.&#160;&#160; I’ve taken on a new role (starting in mid-October) that will be more focused on automating out administrative tasks via powershell so the focus of this blog might change more towards that subject.&#160; I think the crowd that congregates here are IT admins for the most part, so this should remain relevant to your jobs (did this blog have a focus anyways?). If you have a scripting question, drop me a mail and I’ll post about it later.</p>  <p>This is where I started, its a self paced course on the basics.&#160; Once you walk through this (2 hours) you’ll start seeing the power: <a title="https://download.microsoft.com/download/4/7/1/47104ec6-410d-4492-890b-2a34900c9df2/Workshops-EN.zip" href="https://download.microsoft.com/download/4/7/1/47104ec6-410d-4492-890b-2a34900c9df2/Workshops-EN.zip">https://download.microsoft.com/download/4/7/1/47104ec6-410d-4492-890b-2a34900c9df2/Workshops-EN.zip</a></p>  <p>&#160;</p>  <p></p>  <p></p>  <p></p>  <p></p>  <p></p>  <p>Obligatory powershell jpg:</p>  <p><img height="220" src="https://static.flickr.com/164/421721170_646066ae87.jpg" width="281" /></p>]]></content:encoded>
    </item>
  </channel>
</rss>