<?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>Networknet.nl Blog &#187; test-path</title>
	<atom:link href="http://www.networknet.nl/apps/wp/archives/tag/test-path/feed" rel="self" type="application/rss+xml" />
	<link>http://www.networknet.nl/apps/wp</link>
	<description>Stay Connected</description>
	<lastBuildDate>Mon, 05 Jul 2010 17:50:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>PowerShell: How to check list of computers for a specific remote file ?</title>
		<link>http://www.networknet.nl/apps/wp/archives/936</link>
		<comments>http://www.networknet.nl/apps/wp/archives/936#comments</comments>
		<pubDate>Sun, 31 Jan 2010 09:34:03 +0000</pubDate>
		<dc:creator>Ivan</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[check]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[remote]]></category>
		<category><![CDATA[test-path]]></category>
		<category><![CDATA[text]]></category>

		<guid isPermaLink="false">http://www.networknet.nl/apps/wp/archives/936</guid>
		<description><![CDATA[The following PowerShell script recipe will help you check a remote file based on a list of computers stored in a text file. A new PowerShell function will be created during the session which will be piped from the text file. In the following PowerShell example I will check if install.exe exists on the remote [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.networknet.nl/apps/wp/wp-content/uploads/PowerShellHowtochecklistofcomputersforas_951E/image.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="image" border="0" alt="image" align="left" src="http://www.networknet.nl/apps/wp/wp-content/uploads/PowerShellHowtochecklistofcomputersforas_951E/image_thumb.png" width="128" height="128" /></a> The following PowerShell script recipe will help you check a remote file based on a list of computers stored in a text file. A new PowerShell function will be created during the session which will be piped from the text file.</p>
<p>In the following PowerShell example I will check if install.exe exists on the remote systems and echo the computername if the file is there.</p>
<p>&#160;</p>
<p>Create new text file named C:\Scripts\Active_Computers.txt and populate the file with computer names.</p>
<p>[PowerShell]</p>
<p>function check-remotefile { </p>
<p>&#160;&#160;&#160; PROCESS { </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $file = &quot;\\$_\c$\install.exe&quot; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (test-path $file) </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; echo &quot;$_ file install.exe exists&quot; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; } </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; } </p>
<p>} </p>
<p>Get-Content&#160; C:\Scripts\Active_Computers.txt | check-remotefile</p>
<p>[PowerShell]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.networknet.nl/apps/wp/archives/936/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
