<?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>Platforms, PowerShell and Cybersecurity</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/msftcam/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/msftcam/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:30:04 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Password Complexity versus Password Entropy</title>
      <link>https://docs.microsoft.com/archive/blogs/msftcam/password-complexity-versus-password-entropy</link>
      <pubDate>Tue, 19 May 2015 13:46:00 GMT</pubDate>
      <dc:creator><![CDATA[[MSFT]Cam]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/msftcam/2015/05/19/password-complexity-versus-password-entropy/</guid>
      <description><![CDATA[**&nbsp;A huge thanks to the MS Crypto Board for all of the hand-holding and explanations --...]]></description>
      <content:encoded><![CDATA[<p>**&nbsp;A huge thanks to the MS Crypto Board for all of the hand-holding and explanations -- especially David LeBlanc, Michael Scovetta, and Marsh Ray.</p>
<p>I&#39;ve had the opportunity to write a number of password generating functions.&nbsp; Many of the widely available built-in capabilities do not generate cryptographically secure passwords.&nbsp; Sadly, they often generate passwords that are rather easily capable of being re-calculated with the right tools or a smart mathematician/cryptographer.&nbsp; I&#39;m writing this blog post because of some of the work experiences I&#39;ve had.&nbsp; I&#39;ve worked with customers who&#39;ve had&nbsp;very stringent password policies as well as customers who&#39;ve had laughable password policies.&nbsp; Now, whenever I start talking about passwords, someone always stands up and says, &quot;...but passwords are dead thanks to 2-factor authentication/multi-factor authentication.&quot;&nbsp; And while I&#39;d agree with this statement in principle, I can&#39;t in practice.&nbsp; Until all facets of every application and operating system finally kill off the plain-old password, all of the age-old arguments about password complexity, use, and crack-ability should still be of concern.&nbsp;&nbsp; And given some of the behaviors I&#39;ve seen customers employ, passwords should be at the fore-front of some organizations&#39; concerns.</p>
<p>An example of a case where passwords are still employed and still a very critical security concern for organizations&nbsp;are the passwords for local administrators.&nbsp; Why?&nbsp; ...because this is still an integral part of a hackers&#39; privilege escalation path.&nbsp; Why?&nbsp; ...because often times,&nbsp;administrators set this&nbsp;password to the same value on all&nbsp;systems in an office; sometimes all&nbsp;workstation systems; sometimes all Windows platforms in a domain; sometimes all&nbsp;Windows platforms in an enterprise.&nbsp; And sometimes, they distribute this password in clear-text across the network and/or store the password in a reversibly encrypted fashion (e.g. Group Policy).&nbsp; Why is this bad?</p>
<p>- Because if you set the same password on all systems in a logical group, then once an attacker knows the password from one system, he effectively owns all of those systems.<br />- Because if you&#39;re sending the password in clear-text, any sniffer&nbsp;on the network can intercept and see the password transiting in clear-text.<br />- Because if you&#39;re setting the password via Group Policy then this means that you are setting the password on a group of machines to the same value and it&#39;s&nbsp;stored locally in reversibly encrypted&nbsp;format.</p>
<p>Without sliding&nbsp;much farther off-topic, to fix all of the aforementioned problems with managing the local administrator password, Microsoft recently released the Local Admin Password Solution (LAPS):&nbsp; <a href="https://www.microsoft.com/en-us/download/details.aspx?id=46899">https://www.microsoft.com/en-us/download/details.aspx?id=46899</a>&nbsp;</p>
<p>Note that even if you&#39;ve disabled/renamed/etc. the built-in administrator account (the S-1-5-*-500), any account with local administrative privileges is still just as important.&nbsp; Why?&nbsp; Because it&#39;s the &quot;ADMINISTRATOR&quot; role that is important to protect, not what SID the account has.</p>
<p>So... stepping off my soap-box about why passwords are still an important security consideration, lets talk about password complexity and how it relates to password entropy.&nbsp; For the purpose of this post, the following definitions will be used:</p>
<ul>
<li>Password Complexity:&nbsp; the rules associated with setting passwords to try and guarantee that the passwords used are both difficult-to-crack as well as difficult-to-guess.</li>
<li>Password Entropy:&nbsp; the level of chaos or randomness present in a system -- in this case, a string of characters that make up a password.</li>
<li>Bits of Entropy:&nbsp; the mathematical measurement, in bits, of how difficult it is to crack a password.</li>
</ul>
<table align="center" border="0" cellspacing="2" cellpadding="2">
<tbody>
<tr>
<td>Number of Possible Passwords</td>
<td>Password Entropy (bits)</td>
</tr>
<tr>
<td><span style="font-family:Times New Roman;font-size:medium;"> </span>
<p style="text-align:center;"><span style="font-family:Calibri;"><span style="font-size:medium;">C</span><span style="font-size:small;"><sup>L</sup></span></span></p>
</td>
<td><span style="font-family:Times New Roman;font-size:medium;"> </span>
<p style="text-align:center;"><span style="font-family:Calibri;"><span style="font-size:medium;">log(C) / log(2) * L</span></span></p>
</td>
</tr>
</tbody>
</table>
<p style="text-align:center;">C = Size of Character Set<br />L = Length of the Password</p>
<p style="text-align:left;">So there are a couple of really interesting things you might have noticed:</p>
<p style="text-align:left;">1.&nbsp; Mathematically, the LENGTH of the password is exponentially more important than the complexity of the character-set used.&nbsp; <br />2.&nbsp; ANY complexity rule, to include defining a required number of numbers, letters, specials, etc., actually&nbsp;increases a password&#39;s ability to be cracked.</p>
<p style="text-align:left;">The following table represents the most commonly used character-sets for re-type-able&nbsp;passwords:</p>
<p style="text-align:left;margin-left:30px;">- Numbers:&nbsp; 0-9<br />- Upper Alphas:&nbsp; A-Z<br />- Lower Alphas:&nbsp; a-z<br />- Special Characters:&nbsp;` ~ ! @ # $ % ^ &amp; * ( ) _ + - = { } | [ ] \ : &quot; ; &#39; &lt; &gt; ? , . /</p>
<p style="text-align:left;">So the total character size typically ends up being:&nbsp; 10 + 26 + 26 + 32 = 94.&nbsp; Often times, certain special characters are excluded because they are difficult to re-use.&nbsp; Sometimes Unicode characters are used but not often in passwords that need to be typed because of the added complexity (e.g. ALT+0156 = &oelig;).</p>
<p style="text-align:left;">With all of that being said, lets start looking at some combinations of relationships between password complexities, lengths, and resulting password combinations as well as password complexities, lengths, and resulting entropies:</p>
<table style="width:597px;" border="0" cellspacing="0" cellpadding="0"><colgroup><col width="150" /> <col width="23" /> <col width="59" /> <col width="64" /> <col width="58" span="2" /> <col width="63" /> <col width="59" /> <col width="63" /></colgroup>
<tbody>
<tr>
<td width="150" height="20" class="xl65"></td>
<td width="23" class="xl68"></td>
<td width="424" class="xl69" style="text-align:center;" colspan="7">Password Length</td>
</tr>
<tr>
<td height="20" class="xl65"></td>
<td class="xl68"></td>
<td class="xl70">8</td>
<td class="xl70">12</td>
<td class="xl70">16</td>
<td class="xl70">20</td>
<td class="xl70">24</td>
<td class="xl70">28</td>
<td class="xl70">32</td>
</tr>
<tr>
<td width="150" height="20" class="xl67" style="text-align:center;"><span style="font-size:x-small;">Alphanumeric + Specials</span></td>
<td class="xl70">94</td>
<td class="xl71">6.10E+15</td>
<td class="xl71">4.76E+23</td>
<td class="xl71">3.72E+31</td>
<td class="xl71">2.90E+39</td>
<td class="xl71">2.27E+47</td>
<td class="xl71">1.77E+55</td>
<td class="xl71">1.38E+63</td>
</tr>
<tr>
<td width="150" height="20" class="xl67" style="text-align:center;"><span style="font-size:x-small;">Base64</span></td>
<td class="xl70">64</td>
<td class="xl71">2.81E+14</td>
<td class="xl71">4.72E+21</td>
<td class="xl71">7.92E+28</td>
<td class="xl71">1.33E+36</td>
<td class="xl71">2.23E+43</td>
<td class="xl71">3.74E+50</td>
<td class="xl71">6.28E+57</td>
</tr>
<tr>
<td width="150" height="20" class="xl67" style="text-align:center;"><span style="font-size:x-small;">Alphanumeric</span></td>
<td class="xl70">62</td>
<td class="xl71">2.18E+14</td>
<td class="xl71">3.23E+21</td>
<td class="xl71">4.77E+28</td>
<td class="xl71">7.04E+35</td>
<td class="xl71">1.04E+43</td>
<td class="xl71">1.54E+50</td>
<td class="xl71">2.27E+57</td>
</tr>
<tr>
<td width="150" height="20" class="xl67" style="text-align:center;"><span style="font-size:x-small;">Upper and Lower Alphabet</span></td>
<td class="xl70">52</td>
<td class="xl71">5.35E+13</td>
<td class="xl71">3.91E+20</td>
<td class="xl71">2.86E+27</td>
<td class="xl71">2.09E+34</td>
<td class="xl71">1.53E+41</td>
<td class="xl71">1.12E+48</td>
<td class="xl71">8.17E+54</td>
</tr>
<tr>
<td width="150" height="20" class="xl67" style="text-align:center;"><span style="font-size:x-small;">Upper or Lower Alphabet</span></td>
<td class="xl70">26</td>
<td class="xl71">2.09E+11</td>
<td class="xl71">9.54E+16</td>
<td class="xl71">4.36E+22</td>
<td class="xl71">1.99E+28</td>
<td class="xl71">9.11E+33</td>
<td class="xl71">4.16E+39</td>
<td class="xl71">1.90E+45</td>
</tr>
<tr>
<td width="150" height="20" class="xl67" style="text-align:center;"><span style="font-size:x-small;">Numbers</span></td>
<td class="xl70">10</td>
<td class="xl70">1E+08</td>
<td class="xl71">1.00E+12</td>
<td class="xl71">1.00E+16</td>
<td class="xl71">1.00E+20</td>
<td class="xl71">1.00E+24</td>
<td class="xl71">1.00E+28</td>
<td class="xl71">1.00E+32</td>
</tr>
<tr>
<td height="20" class="xl65" style="text-align:center;"></td>
<td class="xl65"></td>
<td width="424" class="xl66" style="text-align:center;" colspan="7"><span style="font-size:medium;">Possible Passwords</span></td>
</tr>
<tr>
<td height="20" class="xl65" style="text-align:center;"></td>
<td class="xl65"></td>
<td class="xl65"></td>
<td class="xl65"></td>
<td class="xl65"></td>
<td class="xl65"></td>
<td class="xl65"></td>
<td class="xl65"></td>
<td class="xl65"></td>
</tr>
<tr>
<td height="20" class="xl65" style="text-align:center;"></td>
<td class="xl68"></td>
<td width="424" class="xl69" style="text-align:center;" colspan="7">Password Length</td>
</tr>
<tr>
<td height="20" class="xl65" style="text-align:center;"></td>
<td class="xl68"></td>
<td class="xl70">8</td>
<td class="xl70">12</td>
<td class="xl70">16</td>
<td class="xl70">20</td>
<td class="xl70">24</td>
<td class="xl70">28</td>
<td class="xl70">32</td>
</tr>
<tr>
<td width="150" height="20" class="xl67" style="text-align:center;"><span style="font-size:x-small;">Alphanumeric + Specials</span></td>
<td class="xl70">94</td>
<td class="xl70">52.4367</td>
<td class="xl70">78.65507</td>
<td class="xl70">104.873</td>
<td class="xl70">131.092</td>
<td class="xl70">157.3101</td>
<td class="xl70">183.528</td>
<td class="xl70">209.7468</td>
</tr>
<tr>
<td width="150" height="20" class="xl67" style="text-align:center;"><span style="font-size:x-small;">Base64</span></td>
<td class="xl70">64</td>
<td class="xl70">48</td>
<td class="xl70">72</td>
<td class="xl70">96</td>
<td class="xl70">120</td>
<td class="xl70">144</td>
<td class="xl70">168</td>
<td class="xl70">192</td>
</tr>
<tr>
<td width="150" height="20" class="xl67" style="text-align:center;"><span style="font-size:x-small;">Alphanumeric</span></td>
<td class="xl70">62</td>
<td class="xl70">47.6336</td>
<td class="xl70">71.45036</td>
<td class="xl70">95.2671</td>
<td class="xl70">119.084</td>
<td class="xl70">142.9007</td>
<td class="xl70">166.717</td>
<td class="xl70">190.5343</td>
</tr>
<tr>
<td width="150" height="20" class="xl67" style="text-align:center;"><span style="font-size:x-small;">Upper and Lower Alphabet</span></td>
<td class="xl70">52</td>
<td class="xl70">45.6035</td>
<td class="xl70">68.40528</td>
<td class="xl70">91.207</td>
<td class="xl70">114.009</td>
<td class="xl70">136.8106</td>
<td class="xl70">159.612</td>
<td class="xl70">182.4141</td>
</tr>
<tr>
<td width="150" height="20" class="xl67" style="text-align:center;"><span style="font-size:x-small;">Upper or Lower Alphabet</span></td>
<td class="xl70">26</td>
<td class="xl70">37.6035</td>
<td class="xl70">56.40528</td>
<td class="xl70">75.207</td>
<td class="xl70">94.0088</td>
<td class="xl70">112.8106</td>
<td class="xl70">131.612</td>
<td class="xl70">150.4141</td>
</tr>
<tr>
<td width="150" height="20" class="xl67" style="text-align:center;"><span style="font-size:x-small;">Numbers</span></td>
<td class="xl70">10</td>
<td class="xl70">26.5754</td>
<td class="xl70">39.86314</td>
<td class="xl70">53.1508</td>
<td class="xl70">66.4386</td>
<td class="xl70">79.72627</td>
<td class="xl70">93.014</td>
<td class="xl70">106.3017</td>
</tr>
<tr>
<td height="20" class="xl65"></td>
<td class="xl65"></td>
<td width="424" class="xl66" style="text-align:center;" colspan="7"><span style="font-size:medium;">Bits of Entropy </span></td>
</tr>
</tbody>
</table>
<p style="text-align:left;">When looking at passwords in this light, it really starts to become clear how much more important the password length is, as opposed to the defined complexity requirements.&nbsp;&nbsp;To further this point, if you&#39;re using passwords&nbsp;with a character set of 10 (only numbers), in order to&nbsp;achieve the same amount of entropy as a character set of 94 (all possible ASCII characters), you only have the double&nbsp;the password&#39;s length.&nbsp;&nbsp;To say it another way, a password that is 16&nbsp;characters long made&nbsp;up of&nbsp;only numbers provides the same level of&nbsp;difficultly-to-crack as an 8 character password made up of the possible 94 possible characters.&nbsp;</p>
<p style="text-align:left;">So hopefully this helped clear up why:</p>
<p style="text-align:left;">- Password lengths are significantly more important than password complexity requirements<br />- Password complexity only prevents users from creating easy-to-guess passwords<br />- Password complexity actually reduces the total number of possible passwords in a key-space<br />- In theory, the most secure password policy would define a longer-length password with no other complexity requirements with a very large dictionary that consists of all easily-guessable passwords</p>
<p style="text-align:left;">&nbsp;</p>
<p style="text-align:left;">** NOTE ** - All of the aforementioned assertions assume the passwords are generated by a cryptographically secure algorithm and not stored in a reversible-encrypted or clear-text format.</p>
<p></p>]]></content:encoded>
    </item>
    <item>
      <title>PowerShell Gotcha -- ForEach-Object and "Continue"</title>
      <link>https://docs.microsoft.com/archive/blogs/msftcam/powershell-gotcha-foreach-object-and-continue</link>
      <pubDate>Tue, 17 Mar 2015 14:02:04 GMT</pubDate>
      <dc:creator><![CDATA[[MSFT]Cam]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/msftcam/2015/03/17/powershell-gotcha-foreach-object-and-continue/</guid>
      <description><![CDATA[I came across an interesting behavior when looping with the ForEach-Object cmdlet that took some...]]></description>
      <content:encoded><![CDATA[<p>I came across an interesting behavior when looping with the ForEach-Object cmdlet that took some thought to figure out why the behavior was occurring.&nbsp; I was doing some bitwise anding on security descriptor and ACE flags when I realized that the output that I was expecting was noticably short.&nbsp; After manually walking the process, I was able to identify that one of my loops using the ForEach-Object cmdlet was behaving very oddly and I had to figure out why.</p>
<p>Without going into too much detail,&nbsp;consider the over-simplified example below as a demonstration&nbsp;of the problem:</p>
<p>$a = 1..10</p>
<p>foreach ($i in $a) {<br />&nbsp;&nbsp;&nbsp; if ($i % 2 -eq 0) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $i<br />&nbsp;&nbsp;&nbsp; } else {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; continue<br />&nbsp;&nbsp;&nbsp; }<br />}</p>
<p>$a | ForEach-Object {<br />&nbsp;&nbsp;&nbsp; if ($_ % 2 -eq 0) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $_<br />&nbsp;&nbsp;&nbsp; } else {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;continue<br />&nbsp;&nbsp;&nbsp; }<br />}</p>
<p>...notice that only one set of multiples of 2 printed out.&nbsp; What happens in the ForEach-Object loop is that the first number passed into the loop is a 1 and when divided by 2, has a remainder so the ELSE condition applies in the first iteration.&nbsp; The &#39;continue&#39; keyword is executed and processing terminates... but why?&nbsp; Well, ForEach-Object is a CMDLET so when a continue keyword&nbsp;is encountered, the processing&nbsp;scope is the script&nbsp;so processing of the script terminates.&nbsp; To demonstrate, take another over-simplified example:</p>
<p>Write-Host &quot;Print me to the screen please!&quot;<br />continue<br />Write-Host &quot;Print me too please!&quot;</p>
<p>... and only the first phrase prints to the screen.&nbsp; This is because the processing scope is still the script when the&nbsp;continue keyword is encountered so&nbsp;script processing terminates.&nbsp; So I can hear you saying, &quot;great, but how do I fix it?&quot;&nbsp; Well, that&#39;s easy&nbsp;-- When using the ForEach-Object cmdlet and you want to emulate the continue keyword behavior in traditional loops, simply use the RETURN keyword instead.&nbsp; So your loop becomes:</p>
<p>&nbsp;<span style="font-family:Times New Roman;font-size:medium;"> </span>$a | ForEach-Object {<br />&nbsp;&nbsp;&nbsp; if ($_ % 2 -eq 0) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $_<br />&nbsp;&nbsp;&nbsp; } else {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return<br />&nbsp;&nbsp;&nbsp; }<br />}</p>
<p><span style="font-family:times new roman,times;"></span>and now behaves as expected and intended.</p>
<p><span style="font-family:Times New Roman;font-size:medium;"> </span>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>PowerShell Mouse Mover</title>
      <link>https://docs.microsoft.com/archive/blogs/msftcam/powershell-mouse-mover</link>
      <pubDate>Thu, 05 Feb 2015 10:46:00 GMT</pubDate>
      <dc:creator><![CDATA[[MSFT]Cam]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/msftcam/2015/02/05/powershell-mouse-mover/</guid>
      <description><![CDATA[IT Politics!!!&nbsp; Ughh!!&nbsp; I see it all the time but I was working with a customer who seemed...]]></description>
      <content:encoded><![CDATA[<p>IT Politics!!!&nbsp; Ughh!!&nbsp; I see it all the time but I was working with a customer who seemed to have it worse than others.&nbsp; The customer&#39;s environment consisted of multiple networks that their IT staff had to administer at any given time.&nbsp; Multiple networks with different levels of importance and thus, different security policies relative to the defined level of importance&nbsp;-- I don&#39;t know how they keep it together.&nbsp; While I was on-site, one of the biggest issues of frustration&nbsp;the admins voiced&nbsp;was trying to work within relatively short timeframes between different computers, on different networks due to the Screensaver Timeout policy (~5 minutes) and constantly having to unlock their workstations while they were sitting at their desks.&nbsp; Their IT Security team would not support changing the setting, allowing a mouse mover (because of freeware downloaded from the Internet), and their Dev shop didn&#39;t have the availability to build them a custom mouse mover so... they asked if there was anything that I could think of that they could do.</p>
<p>I told them that the obvious answer was to request an exemption from the screen saver policy and provided documentation on how to do so using an AD Security Group with Security Filtering applied to a GPO but their IT Security team shot it down.&nbsp; So, I offered the last alternative:&nbsp; a very easy little PowerShell script that simulates mouse movement to keep the screen from locking due to inactivity.&nbsp; Once their Network Security team approved the idea for their &quot;less important&quot; networks, I sat down and got to work.</p>
<p>As it turns out, user32.dll has a function that was perfect for my needs:&nbsp; <a title="mouse_event" href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms646260(v=vs.85).aspx">mouse_event</a>*.&nbsp; It&#39;s function is to &quot;<em>Synthesizes keystrokes, mouse motions, and button clicks</em>&quot;.&nbsp; So all we need to do is figure out how to use it in a PowerShell script.&nbsp; Well, PowerShell, because it&#39;s really just&nbsp;.NET,&nbsp;has this really cool ability to access native Win32 API through a feature called <a title="Platform Invocation Services" href="https://msdn.microsoft.com/en-us/library/aa712982(v=vs.71).aspx">Platform Invocation Services</a> (or &#39;PInvoke&#39; for short) that allows managed code to access functions native to DLLs that are present on a system.&nbsp; The key to using a DLL&#39;s native functions is knowing the signature of each function you want to invoke.&nbsp; That&#39;s where an incredible resource surfaces:&nbsp; <a title="pinvoke.net" href="https://www.pinvoke.net/default.aspx/user32/mouse_event.html">pinvoke.net</a>.&nbsp; pinvoke.net is a sort of wiki that documents known DLLs, their associated known functions, and their&nbsp;associated function signatures in a number of different languages.&nbsp; Looking at the user32, mouse_event function on pinvoke.net, we can see the following two signatures for C#:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/07/Capture.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-04-07/Capture.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/07/Capture.PNG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-04-07/Capture.PNG" border="0" /></a></p>
<p>With this information and a little easy PowerShell magic, we can easily complete the project!&nbsp; Please see the attached code:</p>
<p></p>
<p>Download:&nbsp; [View:~/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-04-07/Move_2D00_Mouse.ps1:550:0]&nbsp;** ,***</p>
<p>Sample Usage:&nbsp;</p>
<p><span style="font-size:small;"><span style="color:#0000ff;font-family:Lucida Console;"><span style="color:#0000ff;font-family:Lucida Console;"><span style="color:#0000ff;font-family:Lucida Console;">Move-Mouse</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#000080;font-family:Lucida Console;"><span style="color:#000080;font-family:Lucida Console;"><span style="color:#000080;font-family:Lucida Console;">-Secs</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#800080;font-family:Lucida Console;"><span style="color:#800080;font-family:Lucida Console;"><span style="color:#800080;font-family:Lucida Console;">10</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#000080;font-family:Lucida Console;"><span style="color:#000080;font-family:Lucida Console;"><span style="color:#000080;font-family:Lucida Console;">-LoopInfinite</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="font-size:small;">$true</span> </span></span></span></p>
<p><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="font-size:small;"><span style="color:#0000ff;font-family:Lucida Console;"><span style="color:#0000ff;font-family:Lucida Console;"><span style="color:#0000ff;font-family:Lucida Console;">Move-Mouse</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#000080;font-family:Lucida Console;"><span style="color:#000080;font-family:Lucida Console;"><span style="color:#000080;font-family:Lucida Console;">-XY</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#800080;font-family:Lucida Console;"><span style="color:#800080;font-family:Lucida Console;"><span style="color:#800080;font-family:Lucida Console;">10</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#000080;font-family:Lucida Console;"><span style="color:#000080;font-family:Lucida Console;"><span style="color:#000080;font-family:Lucida Console;">-Secs</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#800080;font-family:Lucida Console;"><span style="color:#800080;font-family:Lucida Console;"><span style="color:#800080;font-family:Lucida Console;">5</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#000080;font-family:Lucida Console;"><span style="color:#000080;font-family:Lucida Console;"><span style="color:#000080;font-family:Lucida Console;">-LoopInfinite</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;">$true</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#000080;font-family:Lucida Console;"><span style="color:#000080;font-family:Lucida Console;"><span style="color:#000080;font-family:Lucida Console;">-DisplayPosition</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;">$true </span></span></span></span></span></span></span></p>
<p><span style="font-size:small;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;">&nbsp;</span></span></span></span></p>
<p>* Note that the MSDN page identifies the mouse_event function as deprecated and&nbsp;recommends using&nbsp;SendInput&nbsp;instead.&nbsp;The next version of this script will use the&nbsp;SendInput function instead.</p>
<p>** Note that if you&#39;re using software on your computer that takes control of the mouse (e.g. virtualization software while interacting with a guest), this script will not work until you &quot;unlock&quot; the mouse from that application.</p>
<p>*** If you&#39;re using the DisplayPosition parameter and are wondering why the X/Y coords are not making the mouse visibly move, it&#39;s because mouse_event uses absolute or relative normalized coordinates between 0 and 65535 but the emitted mouse location from the script uses pixels so unless you use a value for the mouse to move that is large enough for it to move an actual pixel, you will not see the mouse actually move.&nbsp; I prefer it this way so my mouse isn&#39;t jumping all over the screen while I&#39;m trying to use it.</p>
<p></p>]]></content:encoded>
    </item>
  </channel>
</rss>