<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://powershell.com/cs/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results for 'sectionid:200' matching tags 'powershell' and 'command'</title><link>http://powershell.com/cs/search/SearchResults.aspx?q=sectionid%3A200&amp;tag=powershell%2Ccommand&amp;orTags=0&amp;o=DateDescending</link><description>Search results for 'sectionid:200' matching tags 'powershell' and 'command'</description><dc:language>en-US</dc:language><generator>CommunityServer 2008.5 (Build: 30929.2835)</generator><item><title>Powershell script to move files in folders and subfolders from one Network location to the local server (X Days old)</title><link>http://powershell.com/cs/forums/thread/21651.aspx</link><pubDate>Mon, 18 Feb 2013 06:00:00 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:21651</guid><dc:creator>shubh</dc:creator><description>&lt;p&gt;I am trying to use to below Powershell script:&lt;/p&gt;
&lt;p&gt;get-childitem -Path &lt;a&gt;\\servername\location&lt;/a&gt; |&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; where-object {$_.LastWriteTime -lt (get-date).AddDays(-31)} | &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; move-item -destination &amp;quot;C:\Dumps&amp;quot;&lt;/p&gt;
&lt;p&gt;The script works absolutely fine on testing but its not moving the files in subfolders.&lt;/p&gt;
&lt;p&gt;Please help....&lt;/p&gt;</description></item><item><title>Passing credentials with system.Net.WebClient?</title><link>http://powershell.com/cs/forums/thread/18692.aspx</link><pubDate>Wed, 29 Aug 2012 05:00:00 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:18692</guid><dc:creator>jwhite</dc:creator><description>&lt;p&gt;
&lt;p&gt;So I&amp;#39;m trying to validate connectivity to a website in my local environment. &amp;nbsp;Using the blog:&amp;nbsp;http://learn-powershell.net/2011/02/11/using-powershell-to-query-web-site-information/.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using the following code:&lt;/p&gt;
&lt;p&gt;Function webtest {&lt;br /&gt;$web = New-Object system.Net.WebClient&amp;nbsp;&lt;br /&gt;Try{&lt;br /&gt;$web.Downloadstring(&amp;quot;http://website&amp;quot;)&lt;br /&gt;}&lt;br /&gt;Catch {&amp;nbsp;&lt;br /&gt;Write-Warning &amp;quot;$($error[0])&amp;quot;&amp;nbsp;&lt;br /&gt;&lt;span&gt;	&lt;/span&gt;}&amp;nbsp;&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;So the error I&amp;#39;m getting is:&lt;/p&gt;
&lt;p&gt;WARNING: Exception calling &amp;quot;DownloadString&amp;quot; with &amp;quot;1&amp;quot; argument(s): &amp;quot;The remote server returned an error: (401)&lt;br /&gt;Unauthorized.&amp;quot;&lt;/p&gt;
&lt;p&gt;According to the blog, I should see the contents of the website upon successful validation. &amp;nbsp;How would i pass credentials to the website to ensure that I&amp;#39;m not getting denied access?&lt;/p&gt;
&lt;/p&gt;</description></item><item><title>Re: Install Dotnet Framework 4 using powershell.</title><link>http://powershell.com/cs/forums/thread/14193.aspx</link><pubDate>Wed, 25 Jan 2012 06:00:00 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:14193</guid><dc:creator>virtuallynothere</dc:creator><description>&lt;p&gt;Thanks, remoting is enabled and I will verify credssp is enabled as I am not positive about that. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Why would credssp be required for this script if the client computer and destination server are in the same domain and the account used to login and also to run the remote powershell session are both domain admin accounts?&lt;br /&gt;&lt;br /&gt;I know credssp is for multi-hop authentication, but it didn&amp;#39;t look like that was required in this configuration I am using.&lt;/p&gt;
&lt;p&gt;Also, for the file copy portion, I have another script that just copies a file and that works fine being run exactly as I ran this. &amp;nbsp;How does that work? &amp;nbsp;That script is below and I&amp;#39;ve not had any issues with it.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Import-Csv c:\Scripts\servers.txt | foreach {&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;$server = $_.name&amp;nbsp;&lt;/p&gt;
&lt;p&gt;$location = &amp;quot;\c:\Temp&amp;quot;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Copy-Item &amp;quot;\\server\Applications\dotnet4\dotNetFx40_Full_x86_x64.exe&amp;quot; -Destination $location -Force -ErrorAction silentlyContinue | out-null&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;if(-not $?)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;{&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;quot;ERROR: could not copy file(s) to: $server at $location&amp;quot;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;}&amp;nbsp;&lt;/p&gt;
&lt;p&gt;} | out-file errors.txt&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>