<?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 on: Variables, Arrays, and Hash Tables</title>
	<atom:link href="http://www.powershellpro.com/powershell-tutorial-introduction/variables-arrays-hashes/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.powershellpro.com</link>
	<description>Sharing the Experience</description>
	<lastBuildDate>Mon, 06 Sep 2010 23:05:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: daveb</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/variables-arrays-hashes/comment-page-1/#comment-515</link>
		<dc:creator>daveb</dc:creator>
		<pubDate>Tue, 31 Aug 2010 23:02:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/variables-arrays-hashes/#comment-515</guid>
		<description>Alasdair Carnie:
Try using a hash instead. Then you can loop through the Name Value pairs</description>
		<content:encoded><![CDATA[<p>Alasdair Carnie:<br />
Try using a hash instead. Then you can loop through the Name Value pairs</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alasdair Carnie</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/variables-arrays-hashes/comment-page-1/#comment-495</link>
		<dc:creator>Alasdair Carnie</dc:creator>
		<pubDate>Sun, 20 Jun 2010 14:23:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/variables-arrays-hashes/#comment-495</guid>
		<description>Hi,

I am trying to figure out how to set the ip address of an array of hosts using two arrays.  Array 1 has the host names and array 2 has the IP addresses.  I tried using a for each loop but I can&#039;t figure out how to get the information from the second array into the loop.  I then tried a regular for loop and then  a do loop, but I can&#039;t get the code to work with the values for the second array.

Any help would be appreciated.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I am trying to figure out how to set the ip address of an array of hosts using two arrays.  Array 1 has the host names and array 2 has the IP addresses.  I tried using a for each loop but I can&#8217;t figure out how to get the information from the second array into the loop.  I then tried a regular for loop and then  a do loop, but I can&#8217;t get the code to work with the values for the second array.</p>
<p>Any help would be appreciated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: marizion</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/variables-arrays-hashes/comment-page-1/#comment-491</link>
		<dc:creator>marizion</dc:creator>
		<pubDate>Fri, 04 Jun 2010 10:01:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/variables-arrays-hashes/#comment-491</guid>
		<description>i figured out whats wrong with the code,

the split method of the string is returning a string array so the key for the app_dll is an array of strings rather than a single string, and the variable a contains a single string, so to solve the problem, remove the .split() behind app = temp[0].split and remove the .split behind dll = $temp[1].split()

great tutorial by the way, keep them coming, i’ve come so far just from your teachings

Correction below without the change, sorry

now one thing i don’t understand, $app_dll.get_item($dll) produces results without the change but why dosen’t $app_dll[$dll] produce anything ?
thanks</description>
		<content:encoded><![CDATA[<p>i figured out whats wrong with the code,</p>
<p>the split method of the string is returning a string array so the key for the app_dll is an array of strings rather than a single string, and the variable a contains a single string, so to solve the problem, remove the .split() behind app = temp[0].split and remove the .split behind dll = $temp[1].split()</p>
<p>great tutorial by the way, keep them coming, i’ve come so far just from your teachings</p>
<p>Correction below without the change, sorry</p>
<p>now one thing i don’t understand, $app_dll.get_item($dll) produces results without the change but why dosen’t $app_dll[$dll] produce anything ?<br />
thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: marizion</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/variables-arrays-hashes/comment-page-1/#comment-490</link>
		<dc:creator>marizion</dc:creator>
		<pubDate>Fri, 04 Jun 2010 09:58:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/variables-arrays-hashes/#comment-490</guid>
		<description>i figured out whats wrong with the code,

the split method of the string is returning a string array so the key for the app_dll is an array of strings rather than a single string, and the variable a contains a single string, so to solve the problem, remove the .split() behind app = temp[0].split and remove the .split behind dll = $temp[1].split()

great tutorial by the way, keep them coming, i&#039;ve come so far just from your teachings

now one thing i don&#039;t understand, $app_dll.get_item($dll) produces results after the change but why dosen&#039;t $app_dll[$dll] produce anything ?
thanks</description>
		<content:encoded><![CDATA[<p>i figured out whats wrong with the code,</p>
<p>the split method of the string is returning a string array so the key for the app_dll is an array of strings rather than a single string, and the variable a contains a single string, so to solve the problem, remove the .split() behind app = temp[0].split and remove the .split behind dll = $temp[1].split()</p>
<p>great tutorial by the way, keep them coming, i&#8217;ve come so far just from your teachings</p>
<p>now one thing i don&#8217;t understand, $app_dll.get_item($dll) produces results after the change but why dosen&#8217;t $app_dll[$dll] produce anything ?<br />
thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: marizion</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/variables-arrays-hashes/comment-page-1/#comment-489</link>
		<dc:creator>marizion</dc:creator>
		<pubDate>Fri, 04 Jun 2010 00:17:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/variables-arrays-hashes/#comment-489</guid>
		<description>i&#039;ve been trying very hard to go through this code to figure out what moshe is doing wrong but i can&#039;t seem to figure it out
when i print out $app_dll instead of showing 
def    abc 
it shows 
{def}  {abc}

By moshe ro on January 18th, 2009 at 6:11 am 
I have a problem to get value from Hash:
####################
#Create hash
$App_dll=@{}
#define string
$Hyrarchy=”ABC\def”
$temp=$Hyrarchy.split(’\&#039;)
#devide the string
$App=$temp[0].split()
$dll=$temp[1].split()

#Update Hash Table
$App_dll.Add($dll,$App)

$dll
$a=”def”
$b=$App_dll.Get_Item($a)
###################################
The problem is that $b contains nothing</description>
		<content:encoded><![CDATA[<p>i&#8217;ve been trying very hard to go through this code to figure out what moshe is doing wrong but i can&#8217;t seem to figure it out<br />
when i print out $app_dll instead of showing<br />
def    abc<br />
it shows<br />
{def}  {abc}</p>
<p>By moshe ro on January 18th, 2009 at 6:11 am<br />
I have a problem to get value from Hash:<br />
####################<br />
#Create hash<br />
$App_dll=@{}<br />
#define string<br />
$Hyrarchy=”ABC\def”<br />
$temp=$Hyrarchy.split(’\&#8217;)<br />
#devide the string<br />
$App=$temp[0].split()<br />
$dll=$temp[1].split()</p>
<p>#Update Hash Table<br />
$App_dll.Add($dll,$App)</p>
<p>$dll<br />
$a=”def”<br />
$b=$App_dll.Get_Item($a)<br />
###################################<br />
The problem is that $b contains nothing</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RobertS</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/variables-arrays-hashes/comment-page-1/#comment-450</link>
		<dc:creator>RobertS</dc:creator>
		<pubDate>Wed, 10 Mar 2010 14:23:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/variables-arrays-hashes/#comment-450</guid>
		<description>Hi,
About moshe&#039;problem :
You&#039;ve to assigne the data type to variables, like this casting :
[String]$App=$temp[0].split()
[String]$dll=$temp[1].split()

Without this  you can&#039;t Update Hash Table
$App_dll.Add($dll,$App)
-&gt; because $dll and $App was System.Array in your first script...</description>
		<content:encoded><![CDATA[<p>Hi,<br />
About moshe&#8217;problem :<br />
You&#8217;ve to assigne the data type to variables, like this casting :<br />
[String]$App=$temp[0].split()<br />
[String]$dll=$temp[1].split()</p>
<p>Without this  you can&#8217;t Update Hash Table<br />
$App_dll.Add($dll,$App)<br />
-&gt; because $dll and $App was System.Array in your first script&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: arenas</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/variables-arrays-hashes/comment-page-1/#comment-405</link>
		<dc:creator>arenas</dc:creator>
		<pubDate>Fri, 18 Sep 2009 14:34:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/variables-arrays-hashes/#comment-405</guid>
		<description>hello

pls, how i have to to wenth i save or restor variables
thnx</description>
		<content:encoded><![CDATA[<p>hello</p>
<p>pls, how i have to to wenth i save or restor variables<br />
thnx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carl</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/variables-arrays-hashes/comment-page-1/#comment-401</link>
		<dc:creator>Carl</dc:creator>
		<pubDate>Tue, 08 Sep 2009 12:44:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/variables-arrays-hashes/#comment-401</guid>
		<description>Hi,
I&#039;ve just started to use the PowerShell and (one of my first todos) it is really easy to create a hash from astring or a file but I hven&#039;t found anywhere to store a hash hopefully that easy (??) into a file.
Can you add this (write hash to a file) to your hash-section, I would appreciate this!
THanks Carl</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I&#8217;ve just started to use the PowerShell and (one of my first todos) it is really easy to create a hash from astring or a file but I hven&#8217;t found anywhere to store a hash hopefully that easy (??) into a file.<br />
Can you add this (write hash to a file) to your hash-section, I would appreciate this!<br />
THanks Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Rogers</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/variables-arrays-hashes/comment-page-1/#comment-344</link>
		<dc:creator>David Rogers</dc:creator>
		<pubDate>Wed, 27 May 2009 00:43:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/variables-arrays-hashes/#comment-344</guid>
		<description>RE: &quot;Did you get John Doe for the output? Yes… great! No?… I knew you were going to skip the long version of using the “Set-Variable” cmdlet.&quot;

Smarty Pants! ;-)</description>
		<content:encoded><![CDATA[<p>RE: &#8220;Did you get John Doe for the output? Yes… great! No?… I knew you were going to skip the long version of using the “Set-Variable” cmdlet.&#8221;</p>
<p>Smarty Pants! <img src='http://www.powershellpro.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: serge</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/variables-arrays-hashes/comment-page-1/#comment-322</link>
		<dc:creator>serge</dc:creator>
		<pubDate>Mon, 20 Apr 2009 20:17:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/variables-arrays-hashes/#comment-322</guid>
		<description>The samples for working with arrays don&#039;t seem to be completely correct?
$strComputers = &quot;comp 1&quot;, &quot;comp 2&quot; defines an array, but $strComputers = @{&quot;comp 1&quot; = &quot;Dell&quot;} is defining a hashtable?

Great tutorial to get up to speed in a quick and efficient way! Thanks!</description>
		<content:encoded><![CDATA[<p>The samples for working with arrays don&#8217;t seem to be completely correct?<br />
$strComputers = &#8220;comp 1&#8243;, &#8220;comp 2&#8243; defines an array, but $strComputers = @{&#8220;comp 1&#8243; = &#8220;Dell&#8221;} is defining a hashtable?</p>
<p>Great tutorial to get up to speed in a quick and efficient way! Thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
