<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments for The Lonely Administrator</title>
	<atom:link href="http://jdhitsolutions.com/blog/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://jdhitsolutions.com/blog</link>
	<description>Advice, solutions, tips and more for the lonely Windows administrator with too much to do and not enough time.</description>
	<lastBuildDate>Fri, 03 Feb 2012 20:34:45 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>Comment on Export and Import Hash Tables by JV</title>
		<link>http://jdhitsolutions.com/blog/2012/02/export-and-import-hash-tables/#comment-6568</link>
		<dc:creator>JV</dc:creator>
		<pubDate>Fri, 03 Feb 2012 20:34:45 +0000</pubDate>
		<guid isPermaLink="false">http://jdhitsolutions.com/blog/?p=2062#comment-6568</guid>
		<description>Ther is no need to picj a single answer as best here.  If you are on-site and do not have Jeffs code or jsut need a quick snapshot of a hash that is not huge then use clixml.  It is fairly fast and is very simple to use.

If you need a bigger hash then take the extra time and dump to a CSV.  Both are usful and the drawbacks of both should be noted.</description>
		<content:encoded><![CDATA[<p>Ther is no need to picj a single answer as best here.  If you are on-site and do not have Jeffs code or jsut need a quick snapshot of a hash that is not huge then use clixml.  It is fairly fast and is very simple to use.</p>
<p>If you need a bigger hash then take the extra time and dump to a CSV.  Both are usful and the drawbacks of both should be noted.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Export and Import Hash Tables by Rob Campbell</title>
		<link>http://jdhitsolutions.com/blog/2012/02/export-and-import-hash-tables/#comment-6565</link>
		<dc:creator>Rob Campbell</dc:creator>
		<pubDate>Fri, 03 Feb 2012 19:53:55 +0000</pubDate>
		<guid isPermaLink="false">http://jdhitsolutions.com/blog/?p=2062#comment-6565</guid>
		<description>Personally, think it depends on the circumstances.  IMHO, there&#039;s also value in the fact that .csv data is a commonly understood and supported data format among a wide variety of applications, and you give that up with the clixml file.</description>
		<content:encoded><![CDATA[<p>Personally, think it depends on the circumstances.  IMHO, there&#8217;s also value in the fact that .csv data is a commonly understood and supported data format among a wide variety of applications, and you give that up with the clixml file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Export and Import Hash Tables by Jeffery Hicks</title>
		<link>http://jdhitsolutions.com/blog/2012/02/export-and-import-hash-tables/#comment-6564</link>
		<dc:creator>Jeffery Hicks</dc:creator>
		<pubDate>Fri, 03 Feb 2012 19:45:03 +0000</pubDate>
		<guid isPermaLink="false">http://jdhitsolutions.com/blog/?p=2062#comment-6564</guid>
		<description>Without a doubt XML will be larger than a corresponding CSV, but you get something valuable  for the &quot;cost&quot;. Personally, if my hash table had simple values, I&#039;d stick to a CSV. What really drove all of this is the new $PSDefaultParameterValues variable in PowerShell 3.0. I was looking for a way to easily import a new set of default values from a CSV file. But of course, one thing led to another and here we are.</description>
		<content:encoded><![CDATA[<p>Without a doubt XML will be larger than a corresponding CSV, but you get something valuable  for the &#8220;cost&#8221;. Personally, if my hash table had simple values, I&#8217;d stick to a CSV. What really drove all of this is the new $PSDefaultParameterValues variable in PowerShell 3.0. I was looking for a way to easily import a new set of default values from a CSV file. But of course, one thing led to another and here we are.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Export and Import Hash Tables by Rob Campbell</title>
		<link>http://jdhitsolutions.com/blog/2012/02/export-and-import-hash-tables/#comment-6563</link>
		<dc:creator>Rob Campbell</dc:creator>
		<pubDate>Fri, 03 Feb 2012 19:14:38 +0000</pubDate>
		<guid isPermaLink="false">http://jdhitsolutions.com/blog/?p=2062#comment-6563</guid>
		<description>It could have a dramatic effect on the size of the file if, for instance,  you built and then exported a hash table of host names and ip addresses, and whatever you used to do get that information was returning strongly typed ip addresses.</description>
		<content:encoded><![CDATA[<p>It could have a dramatic effect on the size of the file if, for instance,  you built and then exported a hash table of host names and ip addresses, and whatever you used to do get that information was returning strongly typed ip addresses.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Export and Import Hash Tables by Jeffery Hicks</title>
		<link>http://jdhitsolutions.com/blog/2012/02/export-and-import-hash-tables/#comment-6562</link>
		<dc:creator>Jeffery Hicks</dc:creator>
		<pubDate>Fri, 03 Feb 2012 19:09:54 +0000</pubDate>
		<guid isPermaLink="false">http://jdhitsolutions.com/blog/?p=2062#comment-6562</guid>
		<description>Not sure if I follow your thought. Is this supposed to be a problem? The Clixml format works the way I would expect.</description>
		<content:encoded><![CDATA[<p>Not sure if I follow your thought. Is this supposed to be a problem? The Clixml format works the way I would expect.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Export and Import Hash Tables by Rob Campbell</title>
		<link>http://jdhitsolutions.com/blog/2012/02/export-and-import-hash-tables/#comment-6559</link>
		<dc:creator>Rob Campbell</dc:creator>
		<pubDate>Fri, 03 Feb 2012 18:48:07 +0000</pubDate>
		<guid isPermaLink="false">http://jdhitsolutions.com/blog/?p=2062#comment-6559</guid>
		<description>It&#039;s not just the size of the hash, but the types of objects it contains. 

Try this once:
    [ipaddress]&#039;192.168.1.1&#039; &#124; export-clixml temp.xml
    get-content temp.xml</description>
		<content:encoded><![CDATA[<p>It&#8217;s not just the size of the hash, but the types of objects it contains. </p>
<p>Try this once:<br />
    [ipaddress]&#8217;192.168.1.1&#8242; | export-clixml temp.xml<br />
    get-content temp.xml</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Export and Import Hash Tables by Jeffery Hicks</title>
		<link>http://jdhitsolutions.com/blog/2012/02/export-and-import-hash-tables/#comment-6557</link>
		<dc:creator>Jeffery Hicks</dc:creator>
		<pubDate>Fri, 03 Feb 2012 16:17:14 +0000</pubDate>
		<guid isPermaLink="false">http://jdhitsolutions.com/blog/?p=2062#comment-6557</guid>
		<description>I guess I&#039;m real old school where CSV was the easiest format to work with. Simple to create and understand. But that simplicity also means some limitations. Thanks for your comments.</description>
		<content:encoded><![CDATA[<p>I guess I&#8217;m real old school where CSV was the easiest format to work with. Simple to create and understand. But that simplicity also means some limitations. Thanks for your comments.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Export and Import Hash Tables by JV</title>
		<link>http://jdhitsolutions.com/blog/2012/02/export-and-import-hash-tables/#comment-6556</link>
		<dc:creator>JV</dc:creator>
		<pubDate>Fri, 03 Feb 2012 16:09:02 +0000</pubDate>
		<guid isPermaLink="false">http://jdhitsolutions.com/blog/?p=2062#comment-6556</guid>
		<description>Alway good to have many different approaches.

Yes - size can be an issue with large hashes.  Using a CSV would be fast and more compact.  FOr an even more compace and useful approach try using an ADO Recordset saved as a Microsoft binary format &#039;persisted recordset&#039; file.  This alos allows for fast sorts and queries and is a good technique to have in your toolbox.

Jeff - I never though of using aa CSV to persist objects.  It is a very useful method which I am sure I will use.</description>
		<content:encoded><![CDATA[<p>Alway good to have many different approaches.</p>
<p>Yes &#8211; size can be an issue with large hashes.  Using a CSV would be fast and more compact.  FOr an even more compace and useful approach try using an ADO Recordset saved as a Microsoft binary format &#8216;persisted recordset&#8217; file.  This alos allows for fast sorts and queries and is a good technique to have in your toolbox.</p>
<p>Jeff &#8211; I never though of using aa CSV to persist objects.  It is a very useful method which I am sure I will use.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Export and Import Hash Tables by Jeffery Hicks</title>
		<link>http://jdhitsolutions.com/blog/2012/02/export-and-import-hash-tables/#comment-6555</link>
		<dc:creator>Jeffery Hicks</dc:creator>
		<pubDate>Fri, 03 Feb 2012 13:27:09 +0000</pubDate>
		<guid isPermaLink="false">http://jdhitsolutions.com/blog/?p=2062#comment-6555</guid>
		<description>As I tried to explain in my previous comment I started the whole process by thinking about external file. I like your ideas too. So there are a couple of ways to handle this task depending on your situation. Thanks for taking the time to share.</description>
		<content:encoded><![CDATA[<p>As I tried to explain in my previous comment I started the whole process by thinking about external file. I like your ideas too. So there are a couple of ways to handle this task depending on your situation. Thanks for taking the time to share.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Export and Import Hash Tables by Rob Campbell</title>
		<link>http://jdhitsolutions.com/blog/2012/02/export-and-import-hash-tables/#comment-6553</link>
		<dc:creator>Rob Campbell</dc:creator>
		<pubDate>Fri, 03 Feb 2012 12:37:44 +0000</pubDate>
		<guid isPermaLink="false">http://jdhitsolutions.com/blog/?p=2062#comment-6553</guid>
		<description>JV is right about the clixml being much more convenient.  It does have the downside of only being useful in Powershell, and the .xml file could be orders of magnitude larger than the .csv equivalent.

I&#039;ve done some of this sort of thing, and I&#039;ll offer a possible alternative for the import:

if ($_.type -and ($_.value -as $_.type)){
    $hash[$_.key] = $_.value -as $_.type
    }
    
    else {
            write-warning &quot;Value $($_.value) failed cast as type $($_.type) for key $($_.key).  Leaving value as string.&quot;
            $hash[$_.key] = $_.value
            }

That has the advantage of also checking whether the value will cast to that type before it creates the key.</description>
		<content:encoded><![CDATA[<p>JV is right about the clixml being much more convenient.  It does have the downside of only being useful in Powershell, and the .xml file could be orders of magnitude larger than the .csv equivalent.</p>
<p>I&#8217;ve done some of this sort of thing, and I&#8217;ll offer a possible alternative for the import:</p>
<p>if ($_.type -and ($_.value -as $_.type)){<br />
    $hash[$_.key] = $_.value -as $_.type<br />
    }</p>
<p>    else {<br />
            write-warning &#8220;Value $($_.value) failed cast as type $($_.type) for key $($_.key).  Leaving value as string.&#8221;<br />
            $hash[$_.key] = $_.value<br />
            }</p>
<p>That has the advantage of also checking whether the value will cast to that type before it creates the key.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

