<?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>PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources: Active Threads</title><link>http://powershell.com/cs/forums/TopicsActive.aspx</link><description>Posts with recent activity</description><dc:language>en-US</dc:language><generator>CommunityServer 2008.5 (Build: 30929.2835)</generator><item><title>Finding Path of file and copy it to the right path</title><link>http://powershell.com/cs/forums/thread/23803.aspx</link><pubDate>Wed, 29 May 2013 22:25:00 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:23803</guid><dc:creator>kernelphr34k</dc:creator><slash:comments>6</slash:comments><comments>http://powershell.com/cs/forums/thread/23803.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=200&amp;PostID=23803</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m trying to figure out how to determine the full path of files from a compare-object cmdlet.. 
Here&amp;#39;s some of my code:
&lt;/p&gt;
&lt;div class="pscode"&gt;[&lt;span class="datatype"&gt;xml&lt;/span&gt;]&lt;span class="var"&gt;$LHotFixes&lt;/span&gt; &lt;span class="op"&gt;=&lt;/span&gt; &lt;span class="verbnoun"&gt;Get-Content&lt;/span&gt; &lt;span class="string"&gt;&amp;quot;E:\WSU_REPO\Hotfixes1.xml&amp;quot;&lt;/span&gt;&lt;/div&gt;
&lt;div class="pscode"&gt;&lt;/div&gt;
&lt;div class="pscode"&gt;&lt;/div&gt;
&lt;div class="pscode"&gt;&lt;/div&gt;
&lt;div class="pscode"&gt;&lt;span class="comment"&gt;#This command parses an XML file and lists the value of &amp;quot;file&amp;quot; in it. &lt;/span&gt;&lt;br /&gt;&lt;span class="var"&gt;$LCompareXmlFile&lt;/span&gt; &lt;span class="op"&gt;=&lt;/span&gt; &lt;span class="var"&gt;$LHotFixes&lt;/span&gt;.&lt;span class="method"&gt;SelectNodes&lt;/span&gt;(&lt;span class="string"&gt;&amp;quot;//HF&amp;quot;&lt;/span&gt;) | Select &lt;span class="modifier"&gt;-ExpandProperty&lt;/span&gt; File&lt;/div&gt;
&lt;div class="pscode"&gt;&lt;/div&gt;
&lt;div class="pscode"&gt;&lt;/div&gt;
&lt;div class="pscode"&gt;&lt;/div&gt;
&lt;div class="pscode"&gt;&lt;span class="comment"&gt;#Compare file values from remote and local xml files&lt;/span&gt;&lt;br /&gt;&lt;span class="var"&gt;$CompareXmlKBDiff&lt;/span&gt; &lt;span class="op"&gt;=&lt;/span&gt; (&lt;span class="verbnoun"&gt;Compare-object&lt;/span&gt; &lt;span class="modifier"&gt;-Ref&lt;/span&gt; &lt;span class="var"&gt;$RCompareXmlFile&lt;/span&gt; &lt;span class="modifier"&gt;-Diff&lt;/span&gt; &lt;span class="var"&gt;$LCompareXmlFile&lt;/span&gt; &lt;span class="modifier"&gt;-SyncWindow&lt;/span&gt; 25)&lt;/div&gt;
&lt;div class="pscode"&gt;&lt;/div&gt;
&lt;div class="pscode"&gt;&lt;/div&gt;
&lt;p&gt;A file value looks like this: File=&amp;quot;KB974571.MSU&amp;quot;&amp;nbsp;&lt;/p&gt;
&lt;div class="pscode"&gt;&lt;/div&gt;
&lt;div class="pscode"&gt;&lt;/div&gt;
&lt;p&gt;The problem with the compare statement is that it lists all the files, but I don&amp;#39;t know the path of the file so I can copy it into the right folder. For example the files will be in &amp;quot;c:\temp\x86&amp;quot; or &amp;quot;c:\temp\x64&amp;quot;. How do I go about finding the file path, and then copying them into the right folder?&lt;/p&gt;
&lt;div class="pscode"&gt;&lt;/div&gt;
&lt;div class="pscode"&gt;&lt;/div&gt;
&lt;p&gt;I do have an md5 hash of every file on the remote and local system, but not sure how to use this data to copy it to the right folder. Here&amp;#39;s one of the commands to get hash of the local files:&lt;/p&gt;
&lt;div class="pscode"&gt;&lt;/div&gt;
&lt;div class="pscode"&gt;&lt;span class="var"&gt;$LocalHashx64&lt;/span&gt; &lt;span class="op"&gt;=&lt;/span&gt; (dir &lt;span class="string"&gt;&amp;quot;E:\WSU_REPO\2008\x64&amp;quot;&lt;/span&gt; &lt;span class="modifier"&gt;-Recurse&lt;/span&gt; | &lt;span class="verbnoun"&gt;Where-Object&lt;/span&gt; {&lt;span class="op"&gt;!&lt;/span&gt;&lt;span class="var"&gt;$_&lt;/span&gt;.&lt;span class="method"&gt;psiscontainer&lt;/span&gt;} | &lt;span class="verbnoun"&gt;Get-Hash&lt;/span&gt; &lt;span class="modifier"&gt;-StringEncoding&lt;/span&gt; ASCII &lt;span class="modifier"&gt;-Algorithm&lt;/span&gt; MD5)&lt;/div&gt;
&lt;p&gt;Thanks for your help and suggestions. If you need more info, context or script examples please let me know. Thank you!&lt;/p&gt;
&lt;div class="pscode"&gt;&lt;/div&gt;
&lt;div class="pscode"&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RSS -&gt; Out-GridView as text</title><link>http://powershell.com/cs/forums/thread/24284.aspx</link><pubDate>Sat, 15 Jun 2013 15:53:15 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:24284</guid><dc:creator>Stan</dc:creator><slash:comments>3</slash:comments><comments>http://powershell.com/cs/forums/thread/24284.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=230&amp;PostID=24284</wfw:commentRss><description>&lt;p&gt;This works perfectly.&lt;/p&gt;
&lt;p&gt;$url=&amp;#39;http://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml&amp;#39;&lt;br /&gt;$wc = New-Object Net.WebClient&lt;br /&gt;[xml]$resp = $wc.DownloadString($url)&lt;br /&gt;$resp.rss.channel.item |Select Link,Description |Out-Gridview -Title &amp;quot;NY TIMES RSS&amp;quot;&lt;/p&gt;
&lt;p&gt;but I would like the Link and Description columns in the Gridview to be plain text, and is it possible to wrap a column in the Gridview.&lt;/p&gt;
&lt;p&gt;still learning....&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>select lines which contains date &amp; copy them to a new .csv file</title><link>http://powershell.com/cs/forums/thread/24295.aspx</link><pubDate>Sun, 16 Jun 2013 11:10:22 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:24295</guid><dc:creator>priyanka64</dc:creator><slash:comments>4</slash:comments><comments>http://powershell.com/cs/forums/thread/24295.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=200&amp;PostID=24295</wfw:commentRss><description>&lt;p&gt;I want to filter csv file on the basis of the lines which starts with date copy them to new .csv file&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Date_received,date_occurred,time_to_close,event_handle,CLASS,status,severity,mc_host,tec_class,help_key,msg,mc_object_class,mc_object,mc_parameter,mc_parameter_value,mc_owner,mc_object_owner,mc_origin,mc_origin_key,mc_origin_sev,mc_event_category,ap_id,bao_action,bao_notify,bao_reply_received,delay_action,check_delay,da_instance,da_oncall,da_oncall_group,da_instance_oncall,da_supported,ecc_supported,environment,support_level,disposition,host_os,os_detail,repeat_count,incident_id,renotify,send_email,to_email,send_page,to_page,send_incident,to_incident,send2bao,to_bao,send2console,send2log,to_logfile,thresh_action,thresh_count,thresh_seconds,el_event_id,el_event_type,mc_client_address,adapter_host,snmp_enterprise,snmp_vals,mc_operations&lt;/p&gt;
&lt;p&gt;BMC Impact Query 7.3.02.19 (Build 1684421 - 27-Oct-2010),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,&lt;/p&gt;
&lt;p&gt;Copyright 1998-2010 BMC Software, Inc. as an unpublished work. &amp;nbsp;All rights reserved.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,&lt;/p&gt;
&lt;p&gt;3/9/2013 23:00,3/10/2013 23:00,0,50331328,DATABASE_EVENT,CLOSED,WARNING,THD729SQ,DataBaseEmail,,&amp;quot;DataBaseEmail sqlrebuildix Rebuild index failed on ProfileAbstractionInternal in instance D1XX01, Rebuild Index Skipped. THD729SQ.&amp;quot;,,,,,,,,,,,,,,NO,-1,90,,NO,-,none,NO,NO,DEVELOPMENT,0,INSTALLATION,W2K3-X64ENTERPRISE,RTM+SP2,0,,0,NO,,NO,,NO,,NO,,NO,NO,,[],[],[],,,10.40.239.30,THD729SQ,,,[]&lt;/p&gt;
&lt;p&gt;BMC Impact Query 7.3.02.19 (Build 1684421 - 27-Oct-2010),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,&lt;/p&gt;
&lt;p&gt;Copyright 1998-2010 BMC Software, Inc. as an unpublished work. &amp;nbsp;All rights reserved.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,&lt;/p&gt;
&lt;p&gt;3/9/2013 23:00,3/11/2013 23:00,0,50331381,DATABASE_EVENT,CLOSED,WARNING,THQ001SQ,DbmsInitializationFailure,,DbmsInitializationFailure SqlNight Could not initialize SQL Server instance q1rt06. THQ001SQ autosysRun,,,,,,,,,,,,,,NO,0,0,,NO,-,none,YES,YES,QA,2,CERTIFIED,W2K3-ENTERPRISE,RTM+SP1,0,,0,NO,DA_NTGRP_Email_Group,NO,DA_ONCALL_MSSQLServer_Page_Group,NO,,NO,,NO,NO,,[],[],[],,,10.41.247.4,THQ001SQ,,,[]&lt;/p&gt;
&lt;p&gt;BMC Impact Query 7.3.02.19 (Build 1684421 - 27-Oct-2010),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,&lt;/p&gt;
&lt;p&gt;Copyright 1998-2010 BMC Software, Inc. as an unpublished work. &amp;nbsp;All rights reserved.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,&lt;/p&gt;
&lt;p&gt;3/9/2013 23:01,3/9/2013 23:01,1,50331390,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Replace numbers in stings with another number by adding fixed amount to it</title><link>http://powershell.com/cs/forums/thread/24296.aspx</link><pubDate>Sun, 16 Jun 2013 12:13:45 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:24296</guid><dc:creator>space22</dc:creator><slash:comments>21</slash:comments><comments>http://powershell.com/cs/forums/thread/24296.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=201&amp;PostID=24296</wfw:commentRss><description>&lt;p&gt;&lt;br /&gt;I am a beginner, sorry.&lt;/p&gt;
&lt;p&gt;I think I can replace numbers in a file called &amp;quot;Test.txt&amp;quot; like this (correct me if wrong)&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;(Get-Content C:\Scripts\Test.txt) | &lt;br /&gt;Foreach-Object {$_ -replace &amp;quot;start=\&amp;quot;20\&amp;quot;&amp;quot;, &amp;quot;start=\&amp;quot;40\&amp;quot;&amp;quot;} | &lt;br /&gt;Set-Content C:\Scripts\Test.txt&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;However my problem is that I want to replace a number in a string with another number that is a fixed amount less than the number I am replacing. &lt;br /&gt;&lt;br /&gt;My strings go like this &lt;br /&gt;&amp;nbsp;start=&amp;quot;1342177280&amp;quot;&lt;br /&gt;&amp;nbsp;start=&amp;quot;1342439424&amp;quot;&lt;br /&gt;&amp;nbsp;start=&amp;quot;1342701568&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;And what I need to do is deduct 1342177280 from each number giving me&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;start=&amp;quot;0&amp;quot;&lt;br /&gt;&amp;nbsp;start=&amp;quot;262144&amp;quot;&lt;br /&gt;&amp;nbsp;start=&amp;quot;524288&amp;quot;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Or, setting each value to &amp;quot;0&amp;quot; then incrementing each by 262144 would also work. &lt;br /&gt;&lt;br /&gt;There are other numbers in the strings so it is best to replace the complete start=&amp;quot;&amp;lt;number&amp;gt;&amp;quot;.&lt;/p&gt;
&lt;p&gt;Is this possible in PowerShell? I think Perl can do it, but PowerShell may be more convenient.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Release: AWS Tools for Windows PowerShell 1.1.3 </title><link>http://powershell.com/cs/forums/thread/24370.aspx</link><pubDate>Tue, 18 Jun 2013 15:28:22 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:24370</guid><dc:creator>ps2</dc:creator><slash:comments>0</slash:comments><comments>http://powershell.com/cs/forums/thread/24370.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=79&amp;PostID=24370</wfw:commentRss><description>&lt;p&gt;This release adds a new Amazon EC2 cmdlet to easily get the latest AMI images using filter name and adds consistent cross-service aliases for parameters that control paging of service results.&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://aws.amazon.com/releasenotes/5017969630087549" rel="nofollow"&gt;Read More&amp;nbsp;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>PowerShell Scripts for Cluster Management</title><link>http://powershell.com/cs/forums/thread/24369.aspx</link><pubDate>Tue, 18 Jun 2013 15:26:05 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:24369</guid><dc:creator>ps2</dc:creator><slash:comments>0</slash:comments><comments>http://powershell.com/cs/forums/thread/24369.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=80&amp;PostID=24369</wfw:commentRss><description>&lt;h3&gt;Release Notes&lt;/h3&gt;
&lt;div id="ReleaseNotes" class="WikiContent"&gt;
&lt;div class="wikidoc"&gt;PowerShell Scripts for HDInsight Cluster Management&lt;/div&gt;
&lt;/div&gt;
&lt;div class="wikidoc"&gt;&lt;/div&gt;
&lt;div class="wikidoc"&gt;&lt;a target="_blank" href="http://hadoopsdk.codeplex.com/releases/view/107708" rel="nofollow"&gt;Read More&lt;/a&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>PowerShell script to download TechEd NA 2013 slides and recordings</title><link>http://powershell.com/cs/forums/thread/24368.aspx</link><pubDate>Tue, 18 Jun 2013 15:23:54 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:24368</guid><dc:creator>ps2</dc:creator><slash:comments>0</slash:comments><comments>http://powershell.com/cs/forums/thread/24368.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=80&amp;PostID=24368</wfw:commentRss><description>&lt;p&gt;I had a blast last week at TechEd but because of scheduling conflicts, and me 
sleeping in the Resource Center I missed some of the sessions I wanted to see. 
Fortunately this morning my Twitter and blog feed has been sprouting ways do 
download the scripts like the dandelions sprout in my yard in the spring.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=416" rel="nofollow"&gt;Read More&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>PowerShell Command Line Introduction</title><link>http://powershell.com/cs/forums/thread/24367.aspx</link><pubDate>Tue, 18 Jun 2013 15:21:52 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:24367</guid><dc:creator>ps2</dc:creator><slash:comments>0</slash:comments><comments>http://powershell.com/cs/forums/thread/24367.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=74&amp;PostID=24367</wfw:commentRss><description>&lt;p&gt;Here&amp;rsquo;s a slick PowerShell 3.0 one-liner. If you want to pull down an RSS feed from a blog, displaying only the title and publication date try:&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://programming.oreilly.com/2013/06/powershell-command-line-introduction.html" rel="nofollow"&gt;Read More&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Export-Mailbox exchange 2007</title><link>http://powershell.com/cs/forums/thread/24319.aspx</link><pubDate>Mon, 17 Jun 2013 11:06:26 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:24319</guid><dc:creator>Lior</dc:creator><slash:comments>3</slash:comments><comments>http://powershell.com/cs/forums/thread/24319.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=203&amp;PostID=24319</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I wrote a script that get users from group in AD, and delete all mails in those users mailbox until specific date. the script is working fine.&lt;/p&gt;
&lt;p&gt;In the end the command &amp;quot;Export-Mailbox&amp;quot; generate report via XML file, some of the lines are:&lt;/p&gt;
&lt;p&gt;StatusMessage &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: Messages have been deleted from the source mailbox.&lt;/p&gt;
&lt;p&gt;DisplayName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: LiorTest1&lt;/p&gt;
&lt;p&gt;PrimarySmtpAddress &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : LiorTest1@yes.co.il&lt;/p&gt;
&lt;p&gt;StandardMessagesDeleted &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: 264&lt;/p&gt;
&lt;p&gt;AssociatedMessagesDeleted &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: 0&lt;/p&gt;
&lt;p&gt;DumpsterMessagesDeleted &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: 0&lt;/p&gt;
&lt;p&gt;MoveType &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : DeleteOnly&lt;/p&gt;
&lt;p&gt;MoveStage &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: Completed&lt;/p&gt;
&lt;p&gt;I need two things:&lt;/p&gt;
&lt;p&gt;1) to disable this report&lt;/p&gt;
&lt;p&gt;2) generate anther report that will include: PrimarySmtpAddress, MoveStage&lt;/p&gt;
&lt;p&gt;(exchange 2007)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;
&lt;p&gt;Lior&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title> split &amp; paste the lines in different pattern/custom transposed pattern</title><link>http://powershell.com/cs/forums/thread/24334.aspx</link><pubDate>Mon, 17 Jun 2013 18:32:22 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:24334</guid><dc:creator>priyanka64</dc:creator><slash:comments>12</slash:comments><comments>http://powershell.com/cs/forums/thread/24334.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=200&amp;PostID=24334</wfw:commentRss><description>&lt;p&gt;I want &amp;nbsp;to split &amp;amp; paste the lines in different pattern , filter the lines which starts with # or junk data present in it this is my text file .&lt;/p&gt;
&lt;pre&gt;tlprdhwa   base   atlas3
#ggasbkdjkddddbdb
tlprdhwb   base   atlas3
#jbksljs;blmnnf
tlprdhwc   base   atlas3
#23/15/bknlm;;ds;mmsld
tlprdhwd   base   atlas3
tlprdhwe   base   atlas3
tlprdhwf   base   atlas3
tlprdnwa   base   atlas3
tlprdnwb   base   atlas3&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;output should come like this &lt;/pre&gt;
&lt;pre&gt;&lt;pre&gt;tlprdhwa base&lt;/pre&gt;
&lt;pre&gt;tlprdhwb atlas3&lt;/pre&gt;
&lt;pre&gt;tlprdhwc base&lt;/pre&gt;
&lt;pre&gt;tlprdhwc atlas3&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Powershell for SQL Script Execution</title><link>http://powershell.com/cs/forums/thread/24312.aspx</link><pubDate>Mon, 17 Jun 2013 09:26:48 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:24312</guid><dc:creator>vysakhv90</dc:creator><slash:comments>1</slash:comments><comments>http://powershell.com/cs/forums/thread/24312.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=198&amp;PostID=24312</wfw:commentRss><description>&lt;p&gt;&lt;span&gt;I am new to powershell. Even I dont think I know the basics..But now I am assigned a work to do the execution of sql scripts residing in a remote server.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;1) we have to connect to that particular database/server using ip and the credentials--For this I need powershell to ask user to give the required parameters(such like server/database name/ip and credentials)&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;2) The next step is to get the sql scripts from 3 different folders based on 3 different inputs from user--Here I need powershell to ask user to enter the parameters(Eg:a=1st folder, m=2nd folder and x=3rd folder)&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;3) Then the execution of the script.After the execution, then it should again ask user to continue or exit.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;The 3 steps described above is my requirement. Someone please help on this..Any help would be really appreciated..&lt;/span&gt;&lt;span&gt;I am new to powershell. Even I dont think I know the basics..But now I am assigned a work to do the execution of sql scripts residing in a remote server.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;1) we have to connect to that particular database/server using ip and the credentials--For this I need powershell to ask user to give the required parameters(such like server/database name/ip and credentials)&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;2) The next step is to get the sql scripts from 3 different folders based on 3 different inputs from user--Here I need powershell to ask user to enter the parameters(Eg:a=1st folder, m=2nd folder and x=3rd folder)&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;3) Then the execution of the script.After the execution, then it should again ask user to continue or exit.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;The 3 steps described above is my requirement. Someone please help on this..Any help would be really appreciated..&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Browse to a directory and assign to a variable</title><link>http://powershell.com/cs/forums/thread/24259.aspx</link><pubDate>Fri, 14 Jun 2013 10:20:21 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:24259</guid><dc:creator>TheBishopOfSligo</dc:creator><slash:comments>4</slash:comments><comments>http://powershell.com/cs/forums/thread/24259.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=230&amp;PostID=24259</wfw:commentRss><description>&lt;p&gt;I would like to be able to browse to a local directory and then assign the path to a variable.&lt;/p&gt;
&lt;p&gt;Ideally it would be by using&amp;nbsp;the windows&amp;nbsp;browse function or something similar.&lt;/p&gt;
&lt;p&gt;I would imagine this would be fairly easy to achieve.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m still fairly new to PS and am finding myself lost and confused a lot of the time.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Ray&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>find number of drafts per document in sharepoint?</title><link>http://powershell.com/cs/forums/thread/24308.aspx</link><pubDate>Mon, 17 Jun 2013 06:21:37 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:24308</guid><dc:creator>jokke</dc:creator><slash:comments>1</slash:comments><comments>http://powershell.com/cs/forums/thread/24308.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=196&amp;PostID=24308</wfw:commentRss><description>&lt;p&gt;i&amp;acute;m trying to help a colleague of mine with some sharepoint administration, i dont know alot about sharepoint and she doesnt know a lot about powershell (neither do i, but i know more then her at least)&lt;/p&gt;
&lt;p&gt;The problem that we are facing is a sharepoint system that has been allowed to grow wild for a few years, the content database is almost 500gb in size and we think it is a result of users always saving documents as drafts and never as major versions&lt;/p&gt;
&lt;p&gt;It seems it is impossible to control the number of drafts that is allowed per document, only the number of major versions.&lt;/p&gt;
&lt;p&gt;is there a way to list the number of draft / minor versions that is saved for each document?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Call Powershell script from VBA using Shell() function</title><link>http://powershell.com/cs/forums/thread/24198.aspx</link><pubDate>Thu, 13 Jun 2013 02:10:31 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:24198</guid><dc:creator>leknowlton</dc:creator><slash:comments>5</slash:comments><comments>http://powershell.com/cs/forums/thread/24198.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=230&amp;PostID=24198</wfw:commentRss><description>&lt;p&gt;&lt;code&gt;&lt;span class="pln"&gt;Hello,&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;span class="pln"&gt;I&amp;#39;m trying to pull a path string variable&amp;nbsp;from the following VBA code into a PS script:&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;span class="pln"&gt;&lt;code&gt;&lt;span class="pln"&gt;:VBA CODE:&lt;/span&gt;&lt;/code&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;span class="pln"&gt;&lt;code&gt;&lt;span class="pln"&gt;Shell&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="str"&gt;&lt;span style="color:#800000;"&gt;&amp;quot;powershell.exe -ExecutionPolicy Unrestricted -File &amp;lt;pathname&amp;gt;\Convert_To_Tab_Delimited.ps1 -path &amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;&amp;amp;&lt;/span&gt;&lt;span class="pln"&gt; pathVariable &lt;/span&gt;&lt;span class="pun"&gt;&amp;amp;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="str"&gt;&lt;span style="color:#800000;"&gt;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;,&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;&lt;span style="color:#800000;"&gt;1&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;span class="pln"&gt;:END OF VBA CODE:&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;span class="pln"&gt;I then have the string variable parameter set&amp;nbsp;as a param in the PS script:&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;span class="pln"&gt;:PS CODE:&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;span class="pln"&gt;param([String]$FileToOpen)&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;span class="pln"&gt;gc $FileToOpen&lt;/span&gt;&lt;span class="com"&gt;&lt;span style="color:#808080;"&gt;| % { $_ -replace &amp;#39;&amp;nbsp; +&amp;#39;,&amp;quot;`t&amp;quot; } | set-content &amp;quot;&amp;lt;my path&amp;gt;\temp.txt&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;span class="com"&gt;&lt;span style="color:#808080;"&gt;:END OF PS CODE:&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;span class="com"&gt;&lt;span style="color:#808080;"&gt;I am using full paths outside of the path variable.&amp;nbsp; Does anyone have any ideas?&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Desired State Configuration in Windows Server 2012 R2 – Online hands on lab</title><link>http://powershell.com/cs/forums/thread/24344.aspx</link><pubDate>Mon, 17 Jun 2013 18:56:41 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:24344</guid><dc:creator>ps2</dc:creator><slash:comments>0</slash:comments><comments>http://powershell.com/cs/forums/thread/24344.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=235&amp;PostID=24344</wfw:commentRss><description>&lt;p&gt;I am sure you all must have already looked at the Desired State Configuration (DSC) feature announcement by Jeffrey Snover and Kenneth Hansen at TechEd 2013. This exciting change is coming up in Windows Server 2012 R2 and with PowerShell version 4. But, none of these are available yet for a public preview.&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.powershellmagazine.com/2013/06/12/desired-state-configuration-in-windows-server-2012-r2-online-hands-on-lab/" rel="nofollow"&gt;Read More&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>It's In the Mail Part 2: Sending Rich Messages </title><link>http://powershell.com/cs/forums/thread/24343.aspx</link><pubDate>Mon, 17 Jun 2013 18:54:50 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:24343</guid><dc:creator>ps2</dc:creator><slash:comments>0</slash:comments><comments>http://powershell.com/cs/forums/thread/24343.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=74&amp;PostID=24343</wfw:commentRss><description>&lt;p&gt;Last time we looked at using Send-MailMessage to distribute PowerShell data through email messages. In the first part we looked at essentially plain text messages. But where&amp;#39;s the fun in that? Why not send rich messages from PowerShell using HTML? Here&amp;#39;s one way.&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://mcpmag.com/articles/2013/06/11/in-the-mail-part-2.aspx?admgarea=BDNA" rel="nofollow"&gt;Read More&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Deleting Active Directory User Accounts with Remove-ADUser</title><link>http://powershell.com/cs/forums/thread/24341.aspx</link><pubDate>Mon, 17 Jun 2013 18:44:39 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:24341</guid><dc:creator>ps2</dc:creator><slash:comments>0</slash:comments><comments>http://powershell.com/cs/forums/thread/24341.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=77&amp;PostID=24341</wfw:commentRss><description>&lt;p&gt;Account deletion is a task to approach very carefully, and PowerShell gives us a safe method.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://windowsitpro.com/systems-management/deleting-active-directory-user-accounts-remove-aduser" rel="nofollow"&gt;Read More&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Installing a SQL server on a remote system using Powershell 3</title><link>http://powershell.com/cs/forums/thread/24310.aspx</link><pubDate>Mon, 17 Jun 2013 08:08:00 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:24310</guid><dc:creator>THT</dc:creator><slash:comments>6</slash:comments><comments>http://powershell.com/cs/forums/thread/24310.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=230&amp;PostID=24310</wfw:commentRss><description>&lt;p&gt;Hello, &lt;/p&gt;
&lt;p&gt;I am trying to make a skript which installs the SQL Server (2013 Express) remote on another mashine (Server 2012). The first thought was, to use the Invoke-command:&lt;/p&gt;
&lt;p&gt;Invoke-Command&amp;nbsp; -ComputerName $SRV1 -Credential $cred2&amp;nbsp; -Script {&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Start-Process -FilePath &amp;quot;c:\install\sql\SQLEXPRADV_x64_DEU.exe&amp;quot;&amp;nbsp; -ArgumentList &amp;quot; /Q `&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /INDICATEPROGRESS `&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /IACCEPTSQLSERVERLICENSETERMS=1 `&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /TCPENABLED=1 `&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;This starts the EXE on the remote system. But it seems that the EXE cannot launch other processes, so this command stops quite soon. &lt;/p&gt;
&lt;p&gt;Is there a trick, to start it another way (and waiting until its finished)? &lt;/p&gt;
&lt;p&gt;I got a workarround which has a strange behavior on passwords: &lt;/p&gt;
&lt;p&gt;I put everything in one line :&lt;/p&gt;
&lt;p&gt;$SQL=&amp;quot;c:\install\sql\SQLEXPRADV_x64_DEU.exe /Q /INDICATEPROGRESS /IACCEPTSQLSERVERLICENSETERMS=1 /SQLSYSADMINACCOUNTS=$ad\SQLM ...&lt;/p&gt;
&lt;p&gt;and write it to the remote system using the Inwoke-Command and start the script: &lt;/p&gt;
&lt;p&gt;Invoke-Command&amp;nbsp; -ComputerName $SRV1 -Credential $cred2&amp;nbsp; -Script { &lt;/p&gt;
&lt;p&gt;Set-Content -Path d:\sql.ps1 -Encoding Unicode -Value $sql&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Start-Process powershell.exe -ArgumentList &amp;quot;-file d:\sQL.ps1&amp;quot; -Wait&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;The strange thing on this solution is, that if I put any User-Informattion like &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; /SQLSVCACCOUNT=sbsrv\SQLSVC `&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /SQLSVCPassword= P@ssw0rd `&lt;/p&gt;
&lt;p&gt;in this commandline, it will work only , if I execute the SQL.PS1 directly on the computer (console) or use an interactive session on this mashine. But if I use the invoke-Command the script stops after a while, with the error that Username or Password are not correct. &lt;/p&gt;
&lt;p&gt;Without any user parameter the installation will be completed without any errors. &lt;/p&gt;
&lt;p&gt;Do you know, why? &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Many thanks in advance&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thorsten&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Removing Insecure Wireless Connections with PowerShell</title><link>http://powershell.com/cs/forums/thread/24338.aspx</link><pubDate>Mon, 17 Jun 2013 18:40:56 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:24338</guid><dc:creator>ps2</dc:creator><slash:comments>0</slash:comments><comments>http://powershell.com/cs/forums/thread/24338.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=74&amp;PostID=24338</wfw:commentRss><description>&lt;p&gt;All devices let you &amp;quot;forget&amp;quot; a network when you are in range, and Windows 7 (and before) even had an interface that let you delete networks when they were out of range.&lt;/p&gt;
&lt;p&gt;This dialog was removed in Windows 8, although the &amp;lsquo;netsh&amp;rsquo; command still lets you accomplish it from the command line.&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.leeholmes.com/blog/2013/06/06/removing-insecure-wireless-connections-with-powershell/" rel="nofollow"&gt;Read More&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Building up Hash Tables avoiding key name conflicts</title><link>http://powershell.com/cs/forums/thread/24279.aspx</link><pubDate>Sat, 15 Jun 2013 10:51:29 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:24279</guid><dc:creator>EBrant</dc:creator><slash:comments>6</slash:comments><comments>http://powershell.com/cs/forums/thread/24279.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=230&amp;PostID=24279</wfw:commentRss><description>&lt;p&gt;Hello All&lt;br /&gt;&lt;br /&gt;Can someone please assist me with the following question :) &lt;br /&gt;In the past when creating hash tables I have mistakenly specified the same key name and therefore get an error saying that key name already exists in the hash table. Therefore I was trying to think of a way to take data from a pipeline with may contain duplicate values and create a hash table but&amp;nbsp;automatically skip&amp;nbsp;duplicates as they arise (using PosH 2 at the moment)&lt;/p&gt;
&lt;p&gt;I came up with the following solution (do not worry about the values at this time, just keeping it simply and thinking about the keys)&lt;/p&gt;
&lt;p&gt;My question is, is there an easier/more&amp;nbsp;elegant way to&amp;nbsp;achieve this,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks all&lt;/p&gt;
&lt;p&gt;Ernie&lt;/p&gt;
&lt;div class="pscode"&gt;cls&lt;br /&gt;&lt;span class="var"&gt;$HT&lt;/span&gt; &lt;span class="op"&gt;=&lt;/span&gt; @{&lt;span class="string"&gt;&amp;quot;John Smith&amp;quot;&lt;/span&gt; &lt;span class="op"&gt;=&lt;/span&gt; 0;&lt;span class="string"&gt;&amp;quot;Jane Brown&amp;quot;&lt;/span&gt; &lt;span class="op"&gt;=&lt;/span&gt; 0}&lt;br /&gt;&lt;span class="var"&gt;$X&lt;/span&gt; &lt;span class="op"&gt;=&lt;/span&gt; &lt;span class="string"&gt;&amp;quot;Ernest Brant&amp;quot;&lt;/span&gt;,&lt;span class="string"&gt;&amp;quot;Bert Jackson&amp;quot;&lt;/span&gt;,&lt;span class="string"&gt;&amp;quot;Jack Brown&amp;quot;&lt;/span&gt;,&lt;span class="string"&gt;&amp;quot;Jane Brown&amp;quot;&lt;/span&gt;,&lt;span class="string"&gt;&amp;quot;Ernest Brant&amp;quot;&lt;/span&gt;,&lt;span class="string"&gt;&amp;quot;Bert Jackson&amp;quot;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="keyword"&gt;foreach&lt;/span&gt; (&lt;span class="var"&gt;$element&lt;/span&gt; &lt;span class="keyword"&gt;in&lt;/span&gt; &lt;span class="var"&gt;$X&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;&lt;span class="keyword"&gt;if&lt;/span&gt; ((&lt;span class="var"&gt;$HT&lt;/span&gt;.&lt;span class="method"&gt;Keys&lt;/span&gt; | &lt;span class="op"&gt;%&lt;/span&gt; {&lt;span class="var"&gt;$_&lt;/span&gt;.&lt;span class="method"&gt;ToString&lt;/span&gt;()}) &lt;span class="op"&gt;-match&lt;/span&gt; &lt;span class="var"&gt;$element&lt;/span&gt;) {&lt;span class="keyword"&gt;continue&lt;/span&gt;} &lt;span class="keyword"&gt;else&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;{&lt;span class="var"&gt;$HT&lt;/span&gt;.&lt;span class="method"&gt;Add&lt;/span&gt;(&lt;span class="var"&gt;$element&lt;/span&gt;,0)}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span class="var"&gt;$HT&lt;/span&gt;&lt;/div&gt;
&lt;div class="pscode"&gt;&lt;span class="var"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="pscode"&gt;&lt;span class="var"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>how to not concern invoke commad 's return?</title><link>http://powershell.com/cs/forums/thread/23665.aspx</link><pubDate>Thu, 23 May 2013 10:02:28 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:23665</guid><dc:creator>testmanps</dc:creator><slash:comments>5</slash:comments><comments>http://powershell.com/cs/forums/thread/23665.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=238&amp;PostID=23665</wfw:commentRss><description>&lt;p&gt;thanks nohandle ,i will question the net map question.&lt;/p&gt;
&lt;p&gt;now i have a new question:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;env:pc1/2/3 use xp , all installed powershell v2 &amp;nbsp;&lt;/p&gt;
&lt;p&gt;pc1 want to use invoke&amp;nbsp; pc2,pc3&amp;nbsp; for change ip address&lt;/p&gt;
&lt;p&gt;after run script,pc1&amp;#39;s script wait a long time to stop (about 3min)&lt;/p&gt;
&lt;p&gt;perhaps the reason is pc2/3&amp;#39;s ip changed ?&lt;/p&gt;
&lt;p&gt;remote script last 2 comand:&lt;/p&gt;
&lt;p&gt;$nic.EnableStatic($newip,&amp;quot;255.255.255.0&amp;quot;)&lt;/p&gt;
&lt;p&gt;Restart-Computer -force&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;how i can set only send script and no concern about the remote execute ?&lt;/p&gt;
&lt;p&gt;or &lt;/p&gt;
&lt;p&gt;how to tell pc1 ,the script run over? &lt;/p&gt;
&lt;p&gt;or&lt;/p&gt;
&lt;p&gt;how to set invoke timeout?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>IT Professionals are Invited to Complimentary Webinar on Advanced Scripting Using PowerShell &amp; SharePoint Online Presented by NetCom Learning </title><link>http://powershell.com/cs/forums/thread/24292.aspx</link><pubDate>Sun, 16 Jun 2013 00:04:35 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:24292</guid><dc:creator>ps2</dc:creator><slash:comments>0</slash:comments><comments>http://powershell.com/cs/forums/thread/24292.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=67&amp;PostID=24292</wfw:commentRss><description>&lt;p&gt;NetCom Learning announces a forthcoming free webinar on Advanced Scripting Using PowerShell and SharePoint Online. The interactive webinar will take place on Friday, June 21, 2013 from 1:00 &amp;ndash; 2:00 PM EST. The webinar which will be conducted by Microsoft MVP, Jerry Yasir, in conjunction with IT and business skills training leader, NetCom Learning, will look at the use of SharePoint cmdLets for PowerShell, and the creation and management of both web and service applications in PowerShell.&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.prweb.com/releases/2013/6/prweb10818998.htm" rel="nofollow"&gt;Read More&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>How The Hyper-V Extensible Switch Can Transform Your Network</title><link>http://powershell.com/cs/forums/thread/24290.aspx</link><pubDate>Sat, 15 Jun 2013 21:57:16 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:24290</guid><dc:creator>ps2</dc:creator><slash:comments>0</slash:comments><comments>http://powershell.com/cs/forums/thread/24290.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=158&amp;PostID=24290</wfw:commentRss><description>&lt;p&gt;Grappling with a virtualised network architecture that&amp;rsquo;s difficult to manage? The Hyper-V Extensible Switch running on Windows Server 2012 can simplify your management workload, letting you add capabilities to your virtualised network to meet your exact needs.&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.lifehacker.com.au/2013/06/how-the-hyper-v-extensible-switch-can-transform-your-network/" rel="nofollow"&gt;Read More&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>AD group member count - Memory issue</title><link>http://powershell.com/cs/forums/thread/23676.aspx</link><pubDate>Fri, 24 May 2013 02:30:54 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:23676</guid><dc:creator>ddan</dc:creator><slash:comments>39</slash:comments><comments>http://powershell.com/cs/forums/thread/23676.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=197&amp;PostID=23676</wfw:commentRss><description>&lt;p&gt;Hi Guys,&lt;/p&gt;
&lt;p&gt;Im attempting to write a script that does a count of users in specific groups &amp;amp; regions. So basically if the group is part of specific OU then do a Get-QADGroupMember and increment the number of users for that region.&lt;/p&gt;
&lt;p&gt;My script works fine but I seem to be running out of memory and the the processing slows right down, I end up having to stop it.&lt;/p&gt;
&lt;p&gt;I tried to put a&amp;nbsp;[System.GC]::Collect() in my loop but that didnt seem to help, unless im using it incorrectly, can you pls advise how to make this more efficient memory wise.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;Here is a cut down version of my code:&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;foreach ($Group in $GroupMembers){&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; switch ($Group)&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {[Regex]::IsMatch($Group.DN,&amp;quot;(?i)OU=A,OU=X,DC=Y,DC=Z$&amp;quot;)} {Get-QADGroupMember -Identity $Group.sAMAccountName -Indirect -Connection $conn -ShowProgress -SizeLimit 0 -DontUseDefaultIncludedProperties -type user | ForEach-Object {$Region1++}}&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {[Regex]::IsMatch($Group.DN,&amp;quot;(?i)OU=B,OU=X,DC=Y,DC=Z$&amp;quot;)} {Get-QADGroupMember -Identity $Group.sAMAccountName -Indirect -Connection $conn -ShowProgress -SizeLimit 0 -DontUseDefaultIncludedProperties -type user | ForEach-Object {$Region2++}}&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {[Regex]::IsMatch($Group.DN,&amp;quot;(?i)OU=C,OU=X,DC=Y,DC=Z$&amp;quot;)} {Get-QADGroupMember -Identity $Group.sAMAccountName -Indirect -Connection $conn -ShowProgress -SizeLimit 0 -DontUseDefaultIncludedProperties -type user | ForEach-Object {$Region3++}}&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {[Regex]::IsMatch($Group.DN,&amp;quot;(?i)OU=D,OU=X,DC=Y,DC=Z$&amp;quot;)} {Get-QADGroupMember -Identity $Group.sAMAccountName -Indirect -Connection $conn -ShowProgress -SizeLimit 0 -DontUseDefaultIncludedProperties -type user | ForEach-Object {$Region4++}}&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {[Regex]::IsMatch($Group.DN,&amp;quot;(?i)OU=E,OU=X,DC=Y,DC=Z$&amp;quot;)} {Get-QADGroupMember -Identity $Group.sAMAccountName -Indirect -Connection $conn -ShowProgress -SizeLimit 0 -DontUseDefaultIncludedProperties -type user | ForEach-Object {$Region5++}}&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {[Regex]::IsMatch($Group.DN,&amp;quot;(?i)OU=F,OU=X,DC=Y,DC=Z$&amp;quot;)} {Get-QADGroupMember -Identity $Group.sAMAccountName -Indirect -Connection $conn -ShowProgress -SizeLimit 0 -DontUseDefaultIncludedProperties -type user | ForEach-Object {$Region6++}}&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {[Regex]::IsMatch($Group.DN,&amp;quot;(?i)OU=G,OU=X,DC=Y,DC=Z$&amp;quot;)} {Get-QADGroupMember -Identity $Group.sAMAccountName -Indirect -Connection $conn -ShowProgress -SizeLimit 0 -DontUseDefaultIncludedProperties -type user | ForEach-Object {$Region7++}}&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; default {$UnknownRegion += Get-QADGroupMember -Identity $Group.sAMAccountName -Indirect -Connection $conn -ShowProgress -SizeLimit 0 -type user | select {$_.name}, {$_.sAMAccountName}}&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;
&lt;/p&gt;
&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>How to Get All Workflow History List data from the site which is older then 3 months or years. </title><link>http://powershell.com/cs/forums/thread/24277.aspx</link><pubDate>Sat, 15 Jun 2013 05:28:42 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:24277</guid><dc:creator>deepeshyevle</dc:creator><slash:comments>0</slash:comments><comments>http://powershell.com/cs/forums/thread/24277.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=196&amp;PostID=24277</wfw:commentRss><description>&lt;p&gt;HI,&lt;/p&gt;
&lt;p&gt;many of admins - works for SharePoint workflow history list data status which is completed and not deleted long time. because of &amp;nbsp;ids not mat .&lt;/p&gt;
&lt;p&gt;IS there power-shell scrip for huge workflow history data first check status completed then deleted the data which has older then a 3 &amp;nbsp;months or a year.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Deepesh&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>