<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Carlos&#039; Corner &#187; powershell</title>
	<atom:link href="http://cars.lostroncos.org/tag/powershell/feed/" rel="self" type="application/rss+xml" />
	<link>http://cars.lostroncos.org</link>
	<description>The tired geek-dad in the corner</description>
	<lastBuildDate>Wed, 12 May 2010 19:46:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>A less simple (but better) Replay Report</title>
		<link>http://cars.lostroncos.org/2009/10/12/a-less-simple-but-better-replay-report/</link>
		<comments>http://cars.lostroncos.org/2009/10/12/a-less-simple-but-better-replay-report/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 08:23:41 +0000</pubDate>
		<dc:creator>cars</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[appassure]]></category>
		<category><![CDATA[charting]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[google chart api]]></category>
		<category><![CDATA[recovery point]]></category>
		<category><![CDATA[Replay]]></category>
		<category><![CDATA[snapshot]]></category>

		<guid isPermaLink="false">http://cars.lostroncos.org/?p=220</guid>
		<description><![CDATA[<p>A while back I posted about a Replay report that I wrote to help me monitor the multiple Replay servers we have deployed globally.  It was a good first effort and was useful, but having to engage my brain first thing in the morning to read (and more importantly actually comprehend) the emailed reports eofre [...]]]></description>
			<content:encoded><![CDATA[<p>A while back I posted about a <a href="http://cars.lostroncos.org/2009/04/30/a-simple-replay-report/" target="_blank">Replay report that I wrote</a> to help me monitor the multiple Replay servers we have deployed globally.  It was a good first effort and was useful, but having to engage my brain first thing in the morning to read (and more importantly actually comprehend) the emailed reports eofre my second cup of coffee was less than ideal.</p>
<p>Thwe original idea behind generating the report was to have the info come to me rather than logging into multiple servers and firing up the console multiple times (what can I say I&#8217;m lazy).</p>
<p>The report in the first version of the script was straighforward text. Recently I&#8217;ve been looking into and thinking about different ways to present the information in the report so I could just sort of glance at it and get the status. The disk related portion of the report wasn&#8217;t initially where I was focusing my attention. I was more interested in being able to get a quick idea of where we stood with the # of Recovery Points we were expecting to have.  An example of  one of the simple reports is below. From this we can see that we&#8217;re in pretty good shape with 100% valid RPs spanning about 24 days.</p>
<p style="padding-left: 60px;">Starting Script at 04/30/2009 23:20:12</p>
<p style="padding-left: 60px;">Replay Service is running</p>
<p style="padding-left: 60px;">Server <strong><em>mailserver.company.com</em></strong> snapshots are being stored on R: and currently using 818.54GB. This is 99.98% of the used space(818.68GB) on the volume which is 1,360.22GB</p>
<p style="padding-left: 60px;">The drive currently has 39.81% free space (e.g. 541.54GB)</p>
<p style="padding-left: 60px;">Number of reported Recovery Points is 395 of these 395 are valid, and 0 are invalid (100.00%).<br />
The valid RPs span 23.98 days</p>
<p style="padding-left: 60px;">The most recent valid RP was taken 1 Minutes ago</p>
<p>The issue becomes less clear when invalid RPs occur for whatever reason. If I have 395 RPs and only 250 of the are valid is that a good or bad state? It&#8217;s not immediately clear but one can log in to the Replay server and get a better idea of how things stand. It might be the case where there was network issue during the day and instead of 96 RPs  (that&#8217;s an RP every 15 minutes * 24 hrs) for each of the last three days we&#8217;ve only gotten 40 RPs each of those days which while less than ideal might still be an okay state. Or it could be that there are several days for which we don&#8217;t have RPs.</p>
<p><span id="more-220"></span></p>
<p>I was trying to think of a way to visualize this information. Because of the retention schedule some days we&#8217;d expect a large number of RPs (~90) and some other days we&#8217;d expect to have just one.  I looked into the possibility of using sparklines even going so far as to download a <a href="http://ewbi.blogs.com/develops/2005/07/sparklines.html">C# based version</a> of  a<a href="http://sparklines.bitworking.info/"> PHP based sparkline web service</a> from Joe Gregorio.</p>
<p>I tried several different iterations of the script using sparklines trying to use the data I had in different ways (ex: use percentages of expected RPs, diffs between expected and actaul) but wasn&#8217;t able to find a good way to represent the state using those. In digging around I came across the Google Chart API and that looked at bar different ways of using bar graphs to represent the info I wanted.  Using either side-by-side bar graphs</p>
<p><a href="http://cars.lostroncos.org/wp-content/uploads/2009/10/replay_report_rps_ex_bar_sidebyside.png"><img class="alignright size-full wp-image-224" title="replay_report_rps_ex_bar_sidebyside" src="http://cars.lostroncos.org/wp-content/uploads/2009/10/replay_report_rps_ex_bar_sidebyside.png" alt="replay_report_rps_ex_bar_sidebyside" width="634" height="275" /></a></p>
<p>overlapping ones with green and red where a lot of red would be a bad thing.</p>
<p><a href="http://cars.lostroncos.org/wp-content/uploads/2009/10/replay_report_rps_ex_bar_overlay.png"><img class="aligncenter size-full wp-image-223" title="replay_report_rps_ex_bar_overlay" src="http://cars.lostroncos.org/wp-content/uploads/2009/10/replay_report_rps_ex_bar_overlay.png" alt="replay_report_rps_ex_bar_overlay" width="662" height="277" /></a></p>
<p>Either of these would have been an improvement over what I was getting in the text based report.  While trying to refine the overlaid version I came across an example in the Google <a href="http://code.google.com/apis/chart/styles.html#line_styles">documentation on line style</a>s of  this graph:</p>
<div class="wp-caption alignnone" style="width: 210px"><img title="Chart Data Line example from Google Chart API" src="http://chart.apis.google.com/chart?cht=bvg&amp;chbh=5,2&amp;chm=D,0033FF,1,0,5,1&amp;chbh=20&amp;chs=200x150&amp;chd=s1:1XQbnf4,43ksfg6&amp;chco=76A4FB" alt="Chart Data Line example from Google Chart API" width="200" height="150" /><p class="wp-caption-text">Chart Data Line example from Google Chart API</p></div>
<p>This caught my eye as a possible solution to my problem about how to present this data because of the ability to show both sets of data overlaid on each other while still managing to keep both of them visible.</p>
<p>In my particular scenario the retention schedule is:</p>
<ul>
<li>RPs every 15  minutes which are kept for 4 days</li>
<li>These roll up to hourly RPs which are kept for 5 days</li>
<li>Hourly&#8217;s roll up to dailies which are kept for ~25 days</li>
</ul>
<p>Our goal is to keep about 30 <strong><em>consecutive</em></strong> days worth of RPs on hand. When plotting out the # of expected RPs per day we get a graph that looks like the one below.</p>
<p><a href="http://cars.lostroncos.org/wp-content/uploads/2009/10/replay_report_rps_ex_bar_solo.png"><img class="aligncenter size-full wp-image-228" title="replay_report_rps_ex_bar_solo" src="http://cars.lostroncos.org/wp-content/uploads/2009/10/replay_report_rps_ex_bar_solo.png" alt="replay_report_rps_ex_bar_solo" width="624" height="266" /></a></p>
<p>As one can see the number of Recovery Points per day decreases over time. When adding the line showing the number of actual RPs it can be hard to tell what the status is for the days where there&#8217;s only one RP per day. If things are going well the green bars will be obscured by the red line.</p>
<p><a href="http://cars.lostroncos.org/wp-content/uploads/2009/10/replay_report_rps_ex_ideal.png"><br />
<img class="aligncenter size-full wp-image-218" title="replay_report_rps_ex_ideal" src="http://cars.lostroncos.org/wp-content/uploads/2009/10/replay_report_rps_ex_ideal.png" alt="replay_report_rps_ex_ideal" width="640" height="278" /></a></p>
<p>In the rare instance where we might be missing a few daily RPs the green bars do become somewhat visible as shown in the blue box below.</p>
<p><a href="http://cars.lostroncos.org/wp-content/uploads/2009/10/replay_report_rps_ex_missing_daily.png"><img class="aligncenter size-full wp-image-232" title="replay_report_rps_ex_missing_daily" src="http://cars.lostroncos.org/wp-content/uploads/2009/10/replay_report_rps_ex_missing_daily.png" alt="replay_report_rps_ex_missing_daily" width="600" height="250" /></a></p>
<p>I experimented with a couple of different ways to try to make this more obvious including altering the width and height of the chart to make it more obvious. (see below). Using the Google Chart API one is limited to an image with 300000 pixels (500&#215;600)</p>
<p><a href="http://cars.lostroncos.org/wp-content/uploads/2009/10/replay_report_rps_ex_missing_daily_tall.png"><img class="aligncenter size-full wp-image-233" title="replay_report_rps_ex_missing_daily_tall" src="http://cars.lostroncos.org/wp-content/uploads/2009/10/replay_report_rps_ex_missing_daily_tall.png" alt="replay_report_rps_ex_missing_daily_tall" width="526" height="626" /></a><a title="Tall Graph" href="http://cars.lostroncos.org/wp-content/uploads/2009/10/replay_report_rps_ex_missing_daily_tall.png" target="_blank"><br />
</a></p>
<p>But for me persoanlly making the chart a lot bigger like  this seemed like it didn&#8217;t really add all that much to being able to see what was going on.  So I stuck with 600&#215;250 for the graph.</p>
<p>It should also be noted that in the case where you aren&#8217;t taking snapshots every 15 minutes but evey 30 minutes or maybe even every hour it becomes easier to see missed daily RPs.  Here&#8217;s an example</p>
<p><a href="http://cars.lostroncos.org/wp-content/uploads/2009/10/replay_report_rps_ex_missing_daily_50.png"><img class="aligncenter size-full wp-image-234" title="replay_report_rps_ex_missing_daily_50" src="http://cars.lostroncos.org/wp-content/uploads/2009/10/replay_report_rps_ex_missing_daily_50.png" alt="replay_report_rps_ex_missing_daily_50" width="627" height="276" /></a></p>
<p>After going through all of this with the RPs I almost as an afterhtought went back and added the logic to graph the disk usage data as well. It shows the size of the Replay archive data, the free space and other used space on the drive by generating something like this:</p>
<p><a href="http://cars.lostroncos.org/wp-content/uploads/2009/10/replay_report_disk_usage.png"><img class="aligncenter size-full wp-image-235" title="replay_report_disk_usage" src="http://cars.lostroncos.org/wp-content/uploads/2009/10/replay_report_disk_usage.png" alt="replay_report_disk_usage" width="366" height="217" /></a></p>
<p>Here&#8217;s a <a title="Example Replay Report" href="http://cars.lostroncos.org/wp-content/uploads/2009/10/example_replay_report.png" target="_blank">&#8220;real-life&#8221;  example of the whole report</a>.</p>
<p>The <a href="http://cars.lostroncos.org/wp-content/uploads/2009/10/Replay_Report_v2-01.txt" target="_blank">script is available here</a>. If it&#8217;s of any use to you please drop me a line and let me know.</p>
<p>To use it rename it to something like ReplayReport.ps1. You&#8217;ll need to modify the variables at the beginning of the file:</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 3491px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="white-space: pre;"> </span>$ReportRecipients &#8211; array of recipient email addresses.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 3491px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="white-space: pre;"> </span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 3491px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="white-space: pre;"> </span>$MailServer &#8211; The SMTP server to use to send the report out</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 3491px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="white-space: pre;"> </span>$ReportSender -Address the email should appear to come from.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 3491px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="white-space: pre;"> </span>$replay_exe &#8211; Path to the Replayc.exe file. May differ on x64 vs x86</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 3491px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="white-space: pre;"> </span> servers.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 3491px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="white-space: pre;"> </span>$ExpectedRPCount &#8211; array containing the number of expected RPs for the</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 3491px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="white-space: pre;"> </span> last X days. Used to generate the graph of expected vs</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 3491px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="white-space: pre;"> </span> present RPs. (See Note below)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 3491px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">The script doesn&#8217;t take any arguments to run. I run it via a scheduled task</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 3491px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">on the replay server.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 3491px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">***************</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 3491px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">In reference to $ExpectedRPCount the time of day that the report is run will</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 3491px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">affect how the first data point on the graph appears. RPs are tracked by the</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 3491px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">date that they were taken. If you run the script just before midnight there</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 3491px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">will obviously be a lot more RPs for &#8220;today&#8221; than if you run it at 1 am.</div>
<ul>
<li>$ReportRecipients &#8211; array of recipient email addresses.</li>
<li>$MailServer &#8211; The SMTP server to use to send the report out</li>
<li>$ReportSender -Address the email should appear to come from.</li>
<li>$replay_exe &#8211; Path to the Replayc.exe file. May differ on x64 vs x86  servers.</li>
<li>$ExpectedRPCount &#8211; array containing the number of expected RPs for the last X days. Used to generate the graph of expected vs present RPs. (See Note below)</li>
</ul>
<p>The script doesn&#8217;t take any arguments to run. I run it via a scheduled task on the replay server.</p>
<p>***************</p>
<p><em>In reference to $ExpectedRPCount the time of day that the report is run will affect how the first data point on the graph appears. RPs are tracked by the date that they were taken. If you run the script just before midnight there will obviously be a lot more RPs for &#8220;today&#8221; than if you run it at 1 am.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://cars.lostroncos.org/2009/10/12/a-less-simple-but-better-replay-report/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Simple Replay Report</title>
		<link>http://cars.lostroncos.org/2009/04/30/a-simple-replay-report/</link>
		<comments>http://cars.lostroncos.org/2009/04/30/a-simple-replay-report/#comments</comments>
		<pubDate>Fri, 01 May 2009 06:08:41 +0000</pubDate>
		<dc:creator>cars</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[Replay]]></category>

		<guid isPermaLink="false">http://cars.lostroncos.org/?p=122</guid>
		<description><![CDATA[<p>Where I work we use AppAssure&#8217;s Replay product to back up some of our Exchange servers.  Because the servers in question are very geographically dispersed we have multiple servers running Replay.  Monitoring and keeping an eye on them to assure backups are happening properly was requiring more time than I wanted to spend because we [...]]]></description>
			<content:encoded><![CDATA[<p>Where I work we use AppAssure&#8217;s Replay product to back up some of our Exchange servers.  Because the servers in question are very geographically dispersed we have multiple servers running Replay.  Monitoring and keeping an eye on them to assure backups are happening properly was requiring more time than I wanted to spend because we had different versions of Replay running in the environment. I ended up having to RDP to multiple machines on a regular basis to ensure things were going smoothly.</p>
<p>In poking around the install directory I came across the <a href="https://support.appassure.com/ics/support/KBAnswer.asp?questionID=119" target="_blank">Replayc.exe command</a>. Replayc is a command line utilty that offers information about the Replay server and a way to manually mount and dismount Recovery Points (RPs). After playing with it a little and being the very lazy person that I am  I decided to write a Powershell script to help give me a high level status overview of my servers.  The script runs on each server at about the same time (relative to me here in Oregon) every day and emails me the output. So instead of having to muck around in the console Ionly have to spend a few seconds each to make sure everything&#8217;s running properly.</p>
<p>The <a href="http://cars.lostroncos.org/?attachment_id=145">script is available here</a> and needs to be renamed appropriately.</p>
<p>When the script runs the email (HTML formatted)  I get is like the one below.  It tells me a number of things:</p>
<ul>
<li>The status of the Replay Server (running/not running)</li>
<li>The name of the server that&#8217;s being protected</li>
<li>How much disk space is available and being used for RPs for that protected server</li>
<li>The size of the disk where those RPs are being stored</li>
<li>The # of valid and invalid RPs</li>
<li>The timespan between first and last valid RP</li>
<li>Last time an RP occurred.</li>
</ul>
<p>Example Email:</p>
<p style="padding-left: 60px;">Starting Script at 04/30/2009 23:20:12</p>
<p style="padding-left: 60px;">Replay Service is running</p>
<p style="padding-left: 60px;">Server <strong><em>mailserver.company.com</em></strong> snapshots are being stored on R: and currently using 818.54GB. This is 99.98% of the used space(818.68GB) on the volume which is 1,360.22GB</p>
<p style="padding-left: 60px;">The drive currently has 39.81% free space (e.g. 541.54GB)</p>
<p style="padding-left: 60px;">Number of reported Recovery Points is 395 of these 395 are valid, and 0 are invalid (100.00%).<br />
The valid RPs span 23.98 days</p>
<p style="padding-left: 60px;">The most recent valid RP was taken 1 Minutes ago</p>
<p style="padding-left: 60px;"> </p>
]]></content:encoded>
			<wfw:commentRss>http://cars.lostroncos.org/2009/04/30/a-simple-replay-report/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Big_Endian values in the Windows Registry</title>
		<link>http://cars.lostroncos.org/2009/03/09/big_endian-registry-values/</link>
		<comments>http://cars.lostroncos.org/2009/03/09/big_endian-registry-values/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 23:41:07 +0000</pubDate>
		<dc:creator>cars</dc:creator>
				<category><![CDATA[monitoring]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[reg_dword_big_endian]]></category>
		<category><![CDATA[windows registry]]></category>

		<guid isPermaLink="false">http://cars.lostroncos.org/?p=97</guid>
		<description><![CDATA[<p>I was working today on trying to write some scripts to help me better monitor our various installations of Neverfail.  The command line tools they provide don&#8217;t provide all the performance information I need but (strangely enough) they do write some of it into the Registry where it gets updated very frequently.  In [...]]]></description>
			<content:encoded><![CDATA[<p>I was working today on trying to write some scripts to help me better monitor our various installations of Neverfail.  The command line tools they provide don&#8217;t provide all the performance information I need but (strangely enough) they do write some of it into the Registry where it gets updated very frequently.  In writing a Powershell script to read these values I was having issues with a set of the values I was reading.  Some values would be handled correctly and others were returning weird results. Below is an example of the &#8220;weird&#8221; ones.</p>
<div class="codecolorer-container powershell blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="powershell codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #008080; font-weight: bold;">PS</span> C:\Users\cars<span style="color: pink;">&gt;</span> <span style="color: #800080;">$badKey</span><span style="color: pink;">=</span><span style="color: #008080; font-weight: bold;">Get-Item</span> <span style="color: #800000;">&quot;HKLM:\Software\CRTCORP\Product_B&quot;</span><br />
<span style="color: #008080; font-weight: bold;">PS</span> C:\Users\cars<span style="color: pink;">&gt;</span> <span style="color: #0000FF;">foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$value</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$badKey</span>.GetValueNames<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />
<span style="color: pink;">&gt;&gt;</span> <span style="color: #008080; font-weight: bold;">Write-Host</span> <span style="color: #800000;">&quot;$value | &quot;</span> <span style="color: #008080; font-style: italic;">-nonewline</span><br />
<span style="color: pink;">&gt;&gt;</span>Write<span style="color: pink;">-</span>Host <span style="color: #800080;">$badKey</span>.GetValue<span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;$value&quot;</span><span style="color: #000000;">&#41;</span><br />
<span style="color: pink;">&gt;&gt;</span> <span style="color: #000000;">&#125;</span><br />
<span style="color: pink;">&gt;&gt;</span><br />
PerfCtr1 <span style="color: pink;">|</span> <span style="color: #804000;">0</span> <span style="color: #804000;">0</span> <span style="color: #804000;">0</span> <span style="color: #804000;">0</span><br />
PerfCtr2 <span style="color: pink;">|</span> <span style="color: #804000;">0</span> <span style="color: #804000;">13</span> <span style="color: #804000;">136</span> <span style="color: #804000;">8</span><br />
PerfCtr3 <span style="color: pink;">|</span> <span style="color: #804000;">0</span> <span style="color: #804000;">0</span> <span style="color: #804000;">3</span> <span style="color: #804000;">101</span><br />
<br />
<span style="color: #008080; font-weight: bold;">PS</span> C:\Users\cars<span style="color: pink;">&gt;</span> <span style="color: #800080;">$example</span><span style="color: pink;">=</span><span style="color: #800080;">$badKey</span>.GetValue<span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;PerfCtr1&quot;</span><span style="color: #000000;">&#41;</span><br />
<span style="color: #008080; font-weight: bold;">PS</span> C:\Users\cars<span style="color: pink;">&gt;</span> <span style="color: #800080;">$example</span> <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">gm</span><br />
<br />
TypeName: System.Byte<br />
<br />
Name MemberType Definition<br />
<span style="color: pink;">----</span> <span style="color: pink;">----------</span> <span style="color: pink;">----------</span><br />
CompareTo Method System.Int32 CompareTo<span style="color: #000000;">&#40;</span>Object value<span style="color: #000000;">&#41;</span><span style="color: pink;">,</span> System.Int32 CompareTo<span style="color: #000000;">&#40;</span>Byte value<span style="color: #000000;">&#41;</span><br />
Equals Method System.Boolean Equals<span style="color: #000000;">&#40;</span>Object obj<span style="color: #000000;">&#41;</span><span style="color: pink;">,</span> System.Boolean Equals<span style="color: #000000;">&#40;</span>Byte obj<span style="color: #000000;">&#41;</span><br />
GetHashCode Method System.Int32 GetHashCode<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />
GetType Method System.<span style="color: #008080; font-weight: bold;">Type</span> GetType<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />
GetTypeCode Method System.TypeCode GetTypeCode<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />
ToString Method System.String ToString<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: pink;">,</span> System.String ToString<span style="color: #000000;">&#40;</span>String format<span style="color: #000000;">&#41;</span><span style="color: pink;">,</span> System.String ...</div></div>
<p>So what it it turns out I was getting from the GetValue method was a sequence of 4 bytes as an array.  This made me wonder what the heck was going on so I fired up RegEdit to take a look.  The contents of the Data column looked okay but the Type was different, so I expanded the column to see what was different and discovered REG_DWORD_BIG_ENDIAN as a type. This was one I don&#8217;t recall having seen before.</p>
<p>TechNet has the following to say about DWORD and it&#8217;s brethren:</p>
<p>REG_DWORD<br />
A 32-bit (4-byte) number. Boolean (&#8221;True&#8221; or &#8220;False&#8221;) values and many entries for device drivers and services use this data type. REG_DWORD data can be displayed and entered in hexadecimal or decimal format in the registry editor Regedit.exe. For an example, see the ActivityLogFlag entry.</p>
<p>REG_DWORD_BIG_ENDIAN<br />
Same as REG_DWORD. A 32-bit number in which the most significant byte is displayed as the leftmost (or high-order) byte. This is the most common format for storing numbers in computers that are running Windows Server 2003.</p>
<p>REG_DWORD_LITTLE_ENDIAN<br />
A 32-bit number in which the most significant byte is displayed as the rightmost (or low-order) byte. This is opposite of the order in which bytes are stored in the REG_DWORD and REG_DWORD_BIG_ENDIAN data types.</p>
<p>If you&#8217;re not paying attention it could be easy to miss the difference when using RegEedit since they appear almost identical to DWORD values.  The only obvious difference is the &#8220;Type&#8221; field.</p>
<p>So in the example above GetValue returns different values for &#8220;PerfCtr2&#8243; and &#8220;PerfCtr2 DWORD&#8221; which are nominally the same value (at least according to RegEdit).</p>
<div class="codecolorer-container powershell blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="powershell codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #008080; font-weight: bold;">PS</span> C:\<span style="color: pink;">&gt;</span>Write<span style="color: pink;">-</span>Host <span style="color: #800080;">$key</span>.GetValue<span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;PerfCtr2&quot;</span><span style="color: #000000;">&#41;</span><br />
<span style="color: #804000;">0</span> <span style="color: #804000;">13</span> <span style="color: #804000;">136</span> <span style="color: #804000;">8</span><br />
<span style="color: #008080; font-weight: bold;">PS</span> C:\<span style="color: pink;">&gt;</span>Write<span style="color: pink;">-</span>Host <span style="color: #800080;">$key</span>.GetValue<span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;PerfCtr2 DWORD&quot;</span><span style="color: #000000;">&#41;</span><br />
<span style="color: #804000;">886792</span></div></div>
<p>To help me figure out how to get the info I was looking for I put together a test and created a couple of dummy registry keys with each of the types of reg keys and some examples.</p>
<p>If we try to see what Powershell tells us about each of these keys we see that for our BIG_ENDIAN friend GetValueKind returns &#8220;unknown.&#8221;</p>
<div class="codecolorer-container powershell blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="powershell codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #008080; font-weight: bold;">PS</span> C:\<span style="color: pink;">&gt;</span><span style="color: #800080;">$key1</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">Get-Item</span> <span style="color: #800000;">&quot;HKLM:\Software\CRTCORP\Product_A&quot;</span><br />
<span style="color: #008080; font-weight: bold;">PS</span> C:\<span style="color: pink;">&gt;</span>foreach <span style="color: #000000;">&#40;</span><span style="color: #800080;">$value</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$key1</span>.GetValueNames<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span> <span style="color: #008080; font-weight: bold;">Write-Host</span> <span style="color: #800080;">$value</span> <span style="color: #800000;">&quot; | &quot;</span> <span style="color: #800080;">$key1</span>.GetValueKind<span style="color: #000000;">&#40;</span><span style="color: #800080;">$value</span><span style="color: #000000;">&#41;</span> <span style="color: #800000;">&quot;|&quot;</span> <span style="color: #800080;">$key1</span>.GetValue<span style="color: #000000;">&#40;</span><span style="color: #800080;">$value</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />
REG_SZ Example <span style="color: pink;">|</span> String <span style="color: pink;">|</span> This is a test of the emergency broadcast system<br />
REG_DWORD Example <span style="color: pink;">|</span> DWord <span style="color: pink;">|</span> <span style="color: #804000;">1</span><br />
REG_MULTI_SZ Example <span style="color: pink;">|</span> MultiString <span style="color: pink;">|</span> This is a test This is another Test<br />
REG_EXPAND_SZ <span style="color: pink;">|</span> ExpandString <span style="color: pink;">|</span> C:\ProgramData\Fred<br />
REG_DWORD_BIG_ENDIAN <span style="color: pink;">|</span> Unknown <span style="color: pink;">|</span> <span style="color: #804000;">161</span> <span style="color: #804000;">178</span> <span style="color: #804000;">195</span> <span style="color: #804000;">212</span><br />
<span style="color: #008080; font-weight: bold;">PS</span> C:\<span style="color: pink;">&gt;</span></div></div>
<p>GetValue converts each byte to a decimal value. Our key REG_DWORD_BIG_ENDIAN (0xa1b2c3d4) can be expressed as 4 bytes &#8220;a1&#8243; &#8220;b2&#8243; &#8220;c3&#8243; &#8220;d4&#8243; which when converted become the values &#8220;161&#8243; &#8220;178&#8243; &#8220;195&#8243; &#8220;212&#8243;. While this is mildly useful it doesn&#8217;t help us easily get the value we want 2712847316.   While it is possible to get the right value by doing some math [ (byte1 * 256^3) + (byte2 * 256^2) + (byte3 * 256) + byte4 ] I thought my resulting attempts to write a snippet to do this were ugly since it doesn&#8217;t appear Powershell has any easy way to do exponentiation.</p>
<div class="codecolorer-container powershell blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="powershell codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #008080; font-weight: bold;">PS</span> C:\<span style="color: pink;">&gt;</span><span style="color: #800080;">$key</span><span style="color: pink;">=</span><span style="color: #008080; font-weight: bold;">Get-Item</span> <span style="color: #800000;">&quot;HKLM:\Software\CRTCorp\Product_A&quot;</span><br />
<span style="color: #008080; font-weight: bold;">PS</span> C:\<span style="color: pink;">&gt;</span><span style="color: #800080;">$bytes</span><span style="color: pink;">=</span> <span style="color: #800080;">$key</span>.GetValue<span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;REG_DWORD_BIG_ENDIAN&quot;</span><span style="color: #000000;">&#41;</span><br />
<span style="color: #008080; font-weight: bold;">PS</span> C:\<span style="color: pink;">&gt;</span><span style="color: #800080;">$number</span><span style="color: pink;">=</span><span style="color: #804000;">0</span><br />
<span style="color: #008080; font-weight: bold;">PS</span> C:\<span style="color: pink;">&gt;</span>for <span style="color: #000000;">&#40;</span><span style="color: #800080;">$idx</span><span style="color: pink;">=</span><span style="color: #804000;">0</span>;$idx <span style="color: #FF0000;">-lt</span> <span style="color: #800080;">$bytes</span>.length;$idx<span style="color: pink;">++</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />
<span style="color: pink;">&gt;&gt;</span> <span style="color: #800080;">$pwr</span> <span style="color: pink;">=</span> <span style="color: #800080;">$bytes</span>.length<span style="color: pink;">-</span><span style="color: #800080;">$idx</span><span style="color: pink;">-</span><span style="color: #804000;">1</span>;<br />
<span style="color: pink;">&gt;&gt;</span> <span style="color: #800080;">$number</span><span style="color: pink;">+=</span> <span style="color: #800080;">$bytes</span><span style="color: #000000;">&#91;</span><span style="color: #800080;">$idx</span><span style="color: #000000;">&#93;</span> <span style="color: pink;">*</span> <span style="color: #000000;">&#91;</span>math<span style="color: #000000;">&#93;</span>::pow<span style="color: #000000;">&#40;</span><span style="color: #804000;">256</span><span style="color: pink;">,</span><span style="color: #800080;">$pwr</span><span style="color: #000000;">&#41;</span><br />
<span style="color: pink;">&gt;&gt;</span><span style="color: #000000;">&#125;</span><br />
<span style="color: pink;">&gt;&gt;</span><br />
<span style="color: #008080; font-weight: bold;">PS</span> C:\<span style="color: pink;">&gt;</span>Write<span style="color: pink;">-</span>Host <span style="color: #800000;">&quot;The Value via method 1 is [$number]&quot;</span><br />
The Value via method <span style="color: #804000;">1</span> is <span style="color: #000000;">&#91;</span><span style="color: #804000;">2712847316</span><span style="color: #000000;">&#93;</span><br />
<br />
The second version uses the Math::Pow method to <span style="color: #0000FF;">do</span> help <span style="color: #0000FF;">do</span> the exponentiation:<span style="color: #000000;">&#40;</span>byte1 <span style="color: pink;">*</span> <span style="color: #804000;">256</span>^<span style="color: #804000;">3</span><span style="color: #000000;">&#41;</span> <span style="color: pink;">+</span> <span style="color: #000000;">&#40;</span>byte2 <span style="color: pink;">*</span> <span style="color: #804000;">256</span>^<span style="color: #804000;">2</span><span style="color: #000000;">&#41;</span> <span style="color: pink;">+</span> <span style="color: #000000;">&#40;</span>byte3 <span style="color: pink;">*</span> <span style="color: #804000;">256</span><span style="color: #000000;">&#41;</span> <span style="color: pink;">+</span> byte4<br />
<span style="color: #000000;">&#91;</span>cc lang<span style="color: pink;">=</span><span style="color: #800000;">&quot;powershell&quot;</span> tab_size<span style="color: pink;">=</span><span style="color: #800000;">&quot;3&quot;</span><span style="color: #000000;">&#93;</span><span style="color: #008080; font-weight: bold;">PS</span> C:\<span style="color: pink;">&gt;</span><span style="color: #800080;">$key</span><span style="color: pink;">=</span><span style="color: #008080; font-weight: bold;">Get-Item</span> <span style="color: #800000;">&quot;HKLM:\Software\CRTCorp\Product_A&quot;</span><br />
<span style="color: #008080; font-weight: bold;">PS</span> C:\<span style="color: pink;">&gt;</span><span style="color: #800080;">$bytes</span><span style="color: pink;">=</span> <span style="color: #800080;">$key</span>.GetValue<span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;REG_DWORD_BIG_ENDIAN&quot;</span><span style="color: #000000;">&#41;</span><br />
<span style="color: #008080; font-weight: bold;">PS</span> C:\<span style="color: pink;">&gt;</span><span style="color: #800080;">$number</span><span style="color: pink;">=</span><span style="color: #804000;">0</span><br />
<span style="color: #008080; font-weight: bold;">PS</span> C:\<span style="color: pink;">&gt;</span><span style="color: #800080;">$number</span> <span style="color: pink;">=</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$bytes</span><span style="color: #000000;">&#91;</span><span style="color: #804000;">0</span><span style="color: #000000;">&#93;</span> <span style="color: pink;">*</span> <span style="color: #000000;">&#91;</span>Math<span style="color: #000000;">&#93;</span>::pow<span style="color: #000000;">&#40;</span><span style="color: #804000;">256</span><span style="color: pink;">,</span><span style="color: #804000;">3</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: pink;">+</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$bytes</span><span style="color: #000000;">&#91;</span><span style="color: #804000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: pink;">*</span> <span style="color: #000000;">&#91;</span>Math<span style="color: #000000;">&#93;</span>::Pow<span style="color: #000000;">&#40;</span><span style="color: #804000;">256</span><span style="color: pink;">,</span><span style="color: #804000;">2</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: pink;">+</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$bytes</span><span style="color: #000000;">&#91;</span><span style="color: #804000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: pink;">*</span> <span style="color: #804000;">256</span><span style="color: #000000;">&#41;</span> <span style="color: pink;">+</span> <span style="color: #800080;">$bytes</span><span style="color: #000000;">&#91;</span><span style="color: #804000;">3</span><span style="color: #000000;">&#93;</span><br />
<span style="color: #008080; font-weight: bold;">PS</span> C:\<span style="color: pink;">&gt;</span>Write<span style="color: pink;">-</span>Host <span style="color: #800000;">&quot;The Value via Method 2 is [$number]&quot;</span><br />
The Value via method <span style="color: #804000;">3</span> is <span style="color: #000000;">&#91;</span><span style="color: #804000;">2712847316</span><span style="color: #000000;">&#93;</span></div></div>
<p>The third method was to write out the formula a little more explicitly so that (byte1 * 256^3) + (byte2 * 256^2) + (byte3 * 256^1) + (byte4 *256^0) becomes (byte1 * 16777216) + (byte2 * 65536) + (byte3 * 256) + byte4</p>
<div class="codecolorer-container powershell blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="powershell codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #008080; font-weight: bold;">PS</span> C:\<span style="color: pink;">&gt;</span><span style="color: #800080;">$key</span><span style="color: pink;">=</span><span style="color: #008080; font-weight: bold;">Get-Item</span> <span style="color: #800000;">&quot;HKLM:\Software\CRTCorp\Product_A&quot;</span><br />
<span style="color: #008080; font-weight: bold;">PS</span> C:\<span style="color: pink;">&gt;</span><span style="color: #800080;">$bytes</span><span style="color: pink;">=</span> <span style="color: #800080;">$key</span>.GetValue<span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;REG_DWORD_BIG_ENDIAN&quot;</span><span style="color: #000000;">&#41;</span><br />
<span style="color: #008080; font-weight: bold;">PS</span> C:\<span style="color: pink;">&gt;</span><span style="color: #800080;">$number</span><span style="color: pink;">=</span><span style="color: #804000;">0</span><br />
<span style="color: #008080; font-weight: bold;">PS</span> C:\<span style="color: pink;">&gt;</span><span style="color: #800080;">$number</span><span style="color: pink;">=</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$bytes</span><span style="color: #000000;">&#91;</span><span style="color: #804000;">0</span><span style="color: #000000;">&#93;</span> <span style="color: pink;">*</span> <span style="color: #804000;">16777216</span><span style="color: #000000;">&#41;</span> <span style="color: pink;">+</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$bytes</span><span style="color: #000000;">&#91;</span><span style="color: #804000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: pink;">*</span> <span style="color: #804000;">65536</span><span style="color: #000000;">&#41;</span> <span style="color: pink;">+</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$bytes</span><span style="color: #000000;">&#91;</span><span style="color: #804000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: pink;">*</span> <span style="color: #804000;">256</span><span style="color: #000000;">&#41;</span> <span style="color: pink;">+</span> <span style="color: #800080;">$bytes</span><span style="color: #000000;">&#91;</span><span style="color: #804000;">3</span><span style="color: #000000;">&#93;</span><br />
<span style="color: #008080; font-weight: bold;">PS</span> C:\<span style="color: pink;">&gt;</span>Write<span style="color: pink;">-</span>Host <span style="color: #800000;">&quot;The Value via method 3 is [$number]&quot;</span><br />
The Value via method <span style="color: #804000;">3</span> is <span style="color: #000000;">&#91;</span><span style="color: #804000;">2712847316</span><span style="color: #000000;">&#93;</span></div></div>
<p>I was curious though as to why it was we could get the individual bytes converted but there wasn&#8217;t (to me) an obvious way to do the whole value. I came across a mention of the Convert Class on MSDN which does make it possible. Convert class in the .Net framework. After playing around some I was able to come up with a different way using the Convert Class that to me seems a little cleaner. The Convert class has several overloaded methods. One version of the ToInt64 method converts a string version of a number into 64-bit signed integer. Either this or ToUInt32 will work for our purposes here. ToInt32 won&#8217;t work because of the value may incorrectly (for our purposed) return a negative (i.e. signed) integer. The call to the ToInt64 method  requires an argument that specifies the base of the number the string represents (in this case hex= base 16).  So in theory that would work if we were able to represent the bytes as a hex string.. i.e. 0xA1B2C3D4.  That&#8217;s when I came across a VBScript to Powershell page describing converting numbers from decimal to hex that helped fill in the missing piece. Putting these two things together I was able to come up with a function to use in my script which seemed to work.</p>
<div class="codecolorer-container powershell blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="powershell codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #008000;">#############################################################################</span><br />
<span style="color: #008000;">#Convert a Reg_DWORD_BIG_ENDIAN value to a number that makes sense to a human</span><br />
<span style="color: #008000;"># $convertee should be a byte array</span><br />
<span style="color: #008000;">#--------------------------------------------</span><br />
<span style="color: #0000FF;">function</span> Convert<span style="color: pink;">-</span>RBEToDecimal<span style="color: #000000;">&#40;</span><span style="color: #800080;">$convertee</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />
<span style="color: #800080;">$tmpString</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;0x&quot;</span><br />
<span style="color: #0000FF;">foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$byte</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$convertee</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />
<span style="color: #800080;">$tmpString</span> <span style="color: pink;">+=</span> <span style="color: #800000;">&quot;{0:X}&quot;</span> <span style="color: #FF0000;">-f</span> <span style="color: #800080;">$byte</span><br />
<span style="color: #000000;">&#125;</span><br />
<span style="color: #0000FF;">Return</span> <span style="color: #000000;">&#91;</span>Convert<span style="color: #000000;">&#93;</span>::ToInt64<span style="color: #000000;">&#40;</span><span style="color: #800080;">$tmpString</span><span style="color: pink;">,</span><span style="color: #804000;">16</span><span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#125;</span><br />
<span style="color: #008000;">#############################################################################</span></div></div>
<p>The operative word here was &#8220;seemed&#8221;. I noticed in testing that there were instances where I got a very wrong answer.  As an example if the Registry value were (0xA102C4D4, or 2701312980 decimal) the function would return.  169001940 decimal as the value&#8230;I realized that in building $tmpString if the value of a particular byte was less than 16 it&#8217;d spit out a single character   0xC rather than 0&#215;0C. This was fine if I was interested in the value of a single byte but when concatenating the values together makes for a big difference in the resulting value as 0xA102C3D4 would become 0xA12C3D4. The resolution for this was to change the format string to pad the value with a leading 0 if necessary. So $tmpString += &#8220;{0:X}&#8221; -f $byte  became $tmpString += &#8220;{0:X2}&#8221; -f $byte.<br />
So the final function I ended up using looks like this:</p>
<div class="codecolorer-container powershell blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="powershell codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #008000;">############################################################################</span><br />
<span style="color: #008000;">#Convert a Reg_DWORD_BIG_ENDIAN value to a number that makes sense to a human</span><br />
<span style="color: #008000;"># $convertee should be a byte array</span><br />
<span style="color: #008000;">#--------------------------------------------</span><br />
<span style="color: #0000FF;">function</span> Convert<span style="color: pink;">-</span>RBEToDecimal<span style="color: #000000;">&#40;</span><span style="color: #800080;">$convertee</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />
<span style="color: #800080;">$tmpString</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;0x&quot;</span><br />
<span style="color: #0000FF;">foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$byte</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$convertee</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />
<span style="color: #800080;">$tmpString</span> <span style="color: pink;">+=</span> <span style="color: #800000;">&quot;{0:X2}&quot;</span> <span style="color: #FF0000;">-f</span> <span style="color: #800080;">$byte</span><br />
<span style="color: #000000;">&#125;</span><br />
<span style="color: #0000FF;">Return</span> <span style="color: #000000;">&#91;</span>Convert<span style="color: #000000;">&#93;</span>::ToInt64<span style="color: #000000;">&#40;</span><span style="color: #800080;">$tmpString</span><span style="color: pink;">,</span><span style="color: #804000;">16</span><span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#125;</span><br />
<span style="color: #008000;">###############################################################################</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://cars.lostroncos.org/2009/03/09/big_endian-registry-values/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
