<?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</title><link>http://powershell.com/cs/forums/</link><description>All Posts</description><dc:language>en-US</dc:language><generator>CommunityServer 2008.5 (Build: 30929.2835)</generator><item><title>Running a query against large numbers of computers</title><link>http://powershell.com/cs/forums/thread/23533.aspx</link><pubDate>Thu, 16 May 2013 19:46:58 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:23533</guid><dc:creator>tonyaldr</dc:creator><slash:comments>6</slash:comments><comments>http://powershell.com/cs/forums/thread/23533.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=201&amp;PostID=23533</wfw:commentRss><description>&lt;p&gt;I&amp;#39;ve been using the following query to check on whether a service is running on a small number of servers -&lt;/p&gt;
&lt;p&gt;Get-Service ov* -ComputerName joeserver01&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve just been asked to run this on over 100 servers.&amp;nbsp; I&amp;#39;m sure there&amp;#39;s a way to pipe in a txt file listing all the server names, but can&amp;#39;t seem to find a way to do it!&amp;nbsp; Appreciate any assistance.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Compare XML values?</title><link>http://powershell.com/cs/forums/thread/23539.aspx</link><pubDate>Fri, 17 May 2013 01:05:19 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:23539</guid><dc:creator>kernelphr34k</dc:creator><slash:comments>6</slash:comments><comments>http://powershell.com/cs/forums/thread/23539.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=200&amp;PostID=23539</wfw:commentRss><description>&lt;p&gt;I want to&amp;nbsp;apologize&amp;nbsp;if I&amp;#39;m not using the right&amp;nbsp;terminology... please correct me.&lt;/p&gt;
&lt;p&gt; I have an XML file that I need to parse through to get some data. One of the first things I need to do is get the version of the xml file and compare it with another XML file&amp;#39;s version in a remote location.&lt;/p&gt;
&lt;p&gt;To start, I&amp;#39;m&amp;nbsp;already&amp;nbsp;able to get the version of each file with the following 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:\Fixes.xml&amp;quot;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="var"&gt;$LocalXML&lt;/span&gt; &lt;span class="op"&gt;=&lt;/span&gt; &lt;span class="var"&gt;$LHotFixes&lt;/span&gt;.&lt;span class="namespace"&gt;WSU.HDR&lt;/span&gt; | Select Version &lt;br /&gt;&lt;br /&gt;Returns:&lt;br /&gt;&lt;br /&gt;Version&lt;br /&gt;&lt;span class="op"&gt;--------&lt;/span&gt;&lt;br /&gt;3.1.4&lt;/div&gt;
&lt;p&gt;How do I go about comparing the versions? My code seemed to barf all over me.&lt;/p&gt;
&lt;div class="pscode"&gt;&lt;span class="var"&gt;$CompareXML&lt;/span&gt;&lt;span class="op"&gt;=&lt;/span&gt;&lt;span class="verbnoun"&gt;Compare-Object&lt;/span&gt; (&lt;span class="var"&gt;$RemoteXML&lt;/span&gt;.&lt;span class="method"&gt;SelectNodes&lt;/span&gt;(&lt;span class="string"&gt;&amp;quot;/WSU/HDR&amp;quot;&lt;/span&gt;) | &lt;span class="verbnoun"&gt;Select-object&lt;/span&gt; &lt;span class="verbnoun"&gt;Select-Object&lt;/span&gt; &lt;span class="modifier"&gt;-Expand&lt;/span&gt; Name) (&lt;span class="var"&gt;$LocalXML&lt;/span&gt;.&lt;span class="method"&gt;SelectNodes&lt;/span&gt;(&lt;span class="string"&gt;&amp;quot;/WSU/HDR&amp;quot;&lt;/span&gt;) | &lt;span class="verbnoun"&gt;Select-Object&lt;/span&gt; &lt;span class="modifier"&gt;-Expand&lt;/span&gt; Name)&lt;/div&gt;
&lt;p&gt;Any suggestions? Been searching but not finding anything.. and or not using the right search terms.&lt;/p&gt;
&lt;p&gt;A question, My code above that returns the value... What if I only wanted to get the value and not the Version with the value under it? Possible? Get-Member showed the following:&lt;/p&gt;
&lt;div class="pscode"&gt;PS C:\temp&amp;gt; &lt;span class="var"&gt;$LHotFixes&lt;/span&gt;.&lt;span class="namespace"&gt;WSU.HDR&lt;/span&gt; | Select Version |&lt;span class="verbnoun"&gt;get-member&lt;/span&gt; &lt;span class="modifier"&gt;-force&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   TypeName: &lt;span class="namespace"&gt;Selected.System&lt;/span&gt;.&lt;span class="datatype"&gt;Xml&lt;/span&gt;.&lt;span class="method"&gt;XmlElement&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Name        MemberType   Definition&lt;br /&gt;&lt;span class="op"&gt;----&lt;/span&gt;        &lt;span class="op"&gt;----------&lt;/span&gt;   &lt;span class="op"&gt;----------&lt;/span&gt;&lt;br /&gt;pstypenames CodeProperty &lt;span class="namespace"&gt;System.Collections.ObjectModel.Collection&lt;/span&gt;`1[[System.&lt;span class="datatype"&gt;String&lt;/span&gt;, mscorlib, Version&lt;span class="op"&gt;=&lt;/span&gt;4.0.0.0, Cult..&lt;br /&gt;psadapted   MemberSet    psadapted {ToString, Equals, GetHashCode, GetType}&lt;br /&gt;psbase      MemberSet    psbase {ToString, Equals, GetHashCode, GetType}&lt;br /&gt;psextended  MemberSet    psextended {Version}&lt;br /&gt;psobject    MemberSet    psobject {BaseObject, Members, Properties, Methods, ImmediateBaseObject, TypeNames, get_Bas..&lt;br /&gt;Equals      Method       &lt;span class="datatype"&gt;bool&lt;/span&gt; Equals(&lt;span class="namespace"&gt;System.Object&lt;/span&gt; obj)&lt;br /&gt;GetHashCode Method       &lt;span class="datatype"&gt;int&lt;/span&gt; GetHashCode()&lt;br /&gt;GetType     Method       type GetType()&lt;br /&gt;ToString    Method       &lt;span class="datatype"&gt;string&lt;/span&gt; ToString()&lt;br /&gt;Version     NoteProperty System.&lt;span class="datatype"&gt;String&lt;/span&gt; Version&lt;span class="op"&gt;=&lt;/span&gt;3.1.4&lt;/div&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Setup  an Out Of Office text reply on a deprovisioned user's mailbox</title><link>http://powershell.com/cs/forums/thread/23501.aspx</link><pubDate>Wed, 15 May 2013 08:19:16 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:23501</guid><dc:creator>bareedaa</dc:creator><slash:comments>10</slash:comments><comments>http://powershell.com/cs/forums/thread/23501.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=203&amp;PostID=23501</wfw:commentRss><description>&lt;p&gt;I would like&amp;nbsp; to &lt;a href="http://powershell.com/message/35111#35111"&gt;Setup &amp;nbsp;an Out Of Office text reply&amp;nbsp;on a deprovisioned user&amp;#39;s mailbox&lt;/a&gt;&amp;nbsp;using powershell. I need to have auto reply whenever the user account in active directory is disabled. would you provide me the scripts?&lt;/p&gt;
&lt;p&gt;We would like to set up auto out of office reply for disabled/deprovisioned Active Directory users. Is there a power shell script that I can use?&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>Very Old FTP, Need Password Encripted</title><link>http://powershell.com/cs/forums/thread/23530.aspx</link><pubDate>Thu, 16 May 2013 17:33:11 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:23530</guid><dc:creator>Derleth</dc:creator><slash:comments>4</slash:comments><comments>http://powershell.com/cs/forums/thread/23530.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=230&amp;PostID=23530</wfw:commentRss><description>&lt;p&gt;&lt;span style="font-family:Times New Roman;font-size:small;"&gt;We have a very very very old mainframe here and the FTP that can pull from it is also old and I need to pull a couple of files from it on a daily basis using PowerShell (PS.) This is not a problem, it&amp;rsquo;s very easy.&amp;nbsp; The problem is I can&amp;rsquo;t encrypt the password because the only way I can figure out how to get the files is to have PS call a text file that fills in the FTP info.&lt;br /&gt;ftp -s:C:\POWERSHELL\LIVESCRIPTS\FTP.txt&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:Times New Roman;font-size:small;"&gt;The text file simply has&amp;hellip;&lt;br /&gt;open 123.456.78.90&lt;br /&gt;AccountName&lt;br /&gt;Password123&lt;br /&gt;get &amp;#39;taz.arc.tape.daily&amp;#39; E:\DAILY\DAILY1\DAILY&lt;br /&gt;quit&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:Times New Roman;font-size:small;"&gt;Note that the target is &amp;lsquo;taz.arc.tape.daily&amp;rsquo; and has periods instead of backslashes.&amp;nbsp; This is because there really is not a path, the full file name is &amp;lsquo;taz.arc.tape.daily&amp;rsquo; but when I pull it down it becomes simply &amp;lsquo;daily&amp;rsquo;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:Times New Roman;font-size:small;"&gt;This opens the FTP, logs on and pulls the file from the FTP to the location I want and closes the FTP.&amp;nbsp; It works perfectly except the fact that anybody can open the text file and see the password.&amp;nbsp;&amp;nbsp; I know how to encrypt the password in PS but what I need to know is&amp;hellip; Ether how to encrypt the password in the text file or how to have the password be a variable in PS that can be used at that spot in the text file.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:Times New Roman;font-size:small;"&gt;One solution I came up with is to have PS make the text file and delete it at the end of the script.&amp;nbsp; This is not perfect because somebody could grab the text file before PS has the chance to delete it.&amp;nbsp; It is at least making it harder for someone to get the password but I would like it to be a lot more secure than that.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:Times New Roman;font-size:small;"&gt;Any help is appreciated.&amp;nbsp; Thank you, -Dan&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;,&amp;#39;serif&amp;#39;;"&gt;&lt;span style="font-size:small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Import-PSSession, bug or bug-like feature?</title><link>http://powershell.com/cs/forums/thread/23552.aspx</link><pubDate>Fri, 17 May 2013 13:36:12 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:23552</guid><dc:creator>JMMurrah</dc:creator><slash:comments>1</slash:comments><comments>http://powershell.com/cs/forums/thread/23552.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=230&amp;PostID=23552</wfw:commentRss><description>&lt;p&gt;&lt;span style="font-family:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:black;font-size:9pt;"&gt;Good Morning,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:black;font-size:9pt;"&gt;I&amp;#39;ve come across a strange error with the import-pssession cmdlet, and wanted to run it by the experts. I&amp;#39;m using it in a larger account creation script the import the exchange cmdlets from an exchange server to create a mailbox. In testing it all in the shell the below commands work fine:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:orangered;font-size:7.5pt;"&gt;$session&lt;/span&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:black;font-size:7.5pt;"&gt; &lt;/span&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:darkgray;font-size:7.5pt;"&gt;=&lt;/span&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:black;font-size:7.5pt;"&gt; &lt;/span&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:blue;font-size:7.5pt;"&gt;New-PSSession&lt;/span&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:black;font-size:7.5pt;"&gt; &lt;/span&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:navy;font-size:7.5pt;"&gt;-ConfigurationName&lt;/span&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:black;font-size:7.5pt;"&gt; &lt;/span&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:blueviolet;font-size:7.5pt;"&gt;Microsoft.Exchange&lt;/span&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:black;font-size:7.5pt;"&gt; &lt;/span&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:navy;font-size:7.5pt;"&gt;-ConnectionUri&lt;/span&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:black;font-size:7.5pt;"&gt; &lt;/span&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:blueviolet;font-size:7.5pt;"&gt;&lt;a href="http://$exchangeserver/powershell"&gt;&lt;span style="color:#0000ff;"&gt;http://$&lt;/span&gt;&lt;span style="color:orangered;"&gt;exchangeserver&lt;/span&gt;&lt;span style="color:blueviolet;"&gt;/powershell&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:black;font-size:9pt;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:blue;font-size:7.5pt;"&gt;Import-PSSession&lt;/span&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:black;font-size:7.5pt;"&gt; &lt;/span&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:navy;font-size:7.5pt;"&gt;-session&lt;/span&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:black;font-size:7.5pt;"&gt; &lt;/span&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:orangered;font-size:7.5pt;"&gt;$session&lt;/span&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:black;font-size:7.5pt;"&gt; &lt;/span&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:navy;font-size:7.5pt;"&gt;-AllowClobber&lt;/span&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:black;font-size:7.5pt;"&gt; &lt;/span&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:navy;font-size:7.5pt;"&gt;-DisableNameChecking&lt;/span&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:black;font-size:7.5pt;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:black;font-size:9pt;"&gt;However, when I run them in my larger script, I get the below error:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:red;font-size:7.5pt;"&gt;Import-PSSession : Cannot convert null to type &amp;quot;System.DateTime&amp;quot;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:red;font-size:7.5pt;"&gt;At C:\scripts\importbug.ps1:8 char:5&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:red;font-size:7.5pt;"&gt;+ Import-PSSession -session $session -AllowClobber -DisableNameChecking&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:red;font-size:7.5pt;"&gt;+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:red;font-size:7.5pt;"&gt;+ CategoryInfo : MetadataError: (:) [Import-PSSession], ArgumentTransformationMetadataException&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:red;font-size:7.5pt;"&gt;+ FullyQualifiedErrorId : RuntimeException,Microsoft.PowerShell.Commands.ImportPSSessionCommand&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:black;font-size:9pt;"&gt;Now I couldn&amp;#39;t for the life of me figure out what Import-PSSession would be doing with any dateTime values, or even what null variable I was passing to it. After deconstructing my script I narrowed it down the following minimum code to illustrate the error:&lt;/span&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:12pt;"&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:12pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:darkblue;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;Function&lt;/span&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt; &lt;span style="color:blueviolet;"&gt;Get-Exchangecmdlets&lt;/span&gt; {&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:darkblue;"&gt;param&lt;/span&gt;(&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:darkgray;"&gt;[&lt;/span&gt;&lt;span style="color:teal;"&gt;string&lt;/span&gt;&lt;span style="color:darkgray;"&gt;]&lt;/span&gt;&lt;span style="color:orangered;"&gt;$ExchangeServer&lt;/span&gt;&lt;span style="color:darkgray;"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:darkgray;"&gt;[&lt;/span&gt;&lt;span style="color:teal;"&gt;datetime&lt;/span&gt;&lt;span style="color:darkgray;"&gt;]&lt;/span&gt;&lt;span style="color:orangered;"&gt;$date&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;)&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:orangered;"&gt;$session&lt;/span&gt; &lt;span style="color:darkgray;"&gt;=&lt;/span&gt; &lt;span style="color:blue;"&gt;New-PSSession&lt;/span&gt; &lt;span style="color:navy;"&gt;-ConfigurationName&lt;/span&gt; &lt;span style="color:blueviolet;"&gt;Microsoft.Exchange&lt;/span&gt; &lt;span style="color:navy;"&gt;-ConnectionUri&lt;/span&gt; &lt;span style="color:blueviolet;"&gt;http://&lt;/span&gt;&lt;span style="color:orangered;"&gt;$exchangeserver&lt;/span&gt;&lt;span style="color:blueviolet;"&gt;/powershell&lt;/span&gt; &lt;span style="color:navy;"&gt;-AllowRedirection&lt;/span&gt; &lt;span style="color:navy;"&gt;-Authentication&lt;/span&gt; &lt;span style="color:blueviolet;"&gt;Kerberos&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;Import-PSSession&lt;/span&gt; &lt;span style="color:navy;"&gt;-session&lt;/span&gt; &lt;span style="color:orangered;"&gt;$session&lt;/span&gt; &lt;span style="color:navy;"&gt;-AllowClobber&lt;/span&gt; &lt;span style="color:navy;"&gt;-DisableNameChecking&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:blue;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;Get-Exchangecmdlets&lt;/span&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt; &lt;span style="color:navy;"&gt;-ExchangeServer&lt;/span&gt; &lt;span style="color:darkred;"&gt;&amp;#39;exchangeserver1&amp;#39;&lt;/span&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:darkgreen;"&gt;#This throws the error&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:blue;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;Get-Exchangecmdlets&lt;/span&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt; &lt;span style="color:navy;"&gt;-ExchangeServer&lt;/span&gt; &lt;span style="color:darkred;"&gt;&amp;#39;exchangeserver1&amp;#39;&lt;/span&gt; &lt;span style="color:navy;"&gt;-Date&lt;/span&gt; &lt;span style="color:darkred;"&gt;&amp;quot;10/10/2013&amp;quot;&lt;/span&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:darkgreen;"&gt;#This does not&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;So it seems that when import-pssession runs, it validates all the variables in its parent function.&amp;nbsp; Since&amp;nbsp;$Date wasn&amp;#39;t specified, it was null, which can&amp;#39;t be converted to&amp;nbsp;DateTime, hence the error.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;This error also appeared with parameters using the [validatescript] setting, such as:&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:darkblue;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;Function&lt;/span&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt; &lt;span style="color:blueviolet;"&gt;Get-Exchangecmdlets&lt;/span&gt; {&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:darkgray;"&gt;[&lt;/span&gt;&lt;span style="color:deepskyblue;"&gt;cmdletbinding&lt;/span&gt;()&lt;span style="color:darkgray;"&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:darkblue;"&gt;param&lt;/span&gt;(&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:darkgray;"&gt;[&lt;/span&gt;&lt;span style="color:teal;"&gt;string&lt;/span&gt;&lt;span style="color:darkgray;"&gt;]&lt;/span&gt;&lt;span style="color:orangered;"&gt;$ExchangeServer&lt;/span&gt;&lt;span style="color:darkgray;"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:darkgray;"&gt;[&lt;/span&gt;&lt;span style="color:deepskyblue;"&gt;ValidateScript&lt;/span&gt;({&lt;span style="color:blue;"&gt;test-path&lt;/span&gt; (&lt;span style="color:blue;"&gt;Split-Path&lt;/span&gt; &lt;span style="color:navy;"&gt;-Path&lt;/span&gt; &lt;span style="color:orangered;"&gt;$_&lt;/span&gt; &lt;span style="color:navy;"&gt;-Parent&lt;/span&gt;)})&lt;span style="color:darkgray;"&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:darkgray;"&gt;[&lt;/span&gt;&lt;span style="color:teal;"&gt;string&lt;/span&gt;&lt;span style="color:darkgray;"&gt;]&lt;/span&gt;&lt;span style="color:orangered;"&gt;$ErrorLog&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;)&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:orangered;"&gt;$session&lt;/span&gt; &lt;span style="color:darkgray;"&gt;=&lt;/span&gt; &lt;span style="color:blue;"&gt;New-PSSession&lt;/span&gt; &lt;span style="color:navy;"&gt;-ConfigurationName&lt;/span&gt; &lt;span style="color:blueviolet;"&gt;Microsoft.Exchange&lt;/span&gt; &lt;span style="color:navy;"&gt;-ConnectionUri&lt;/span&gt; &lt;span style="color:blueviolet;"&gt;http://&lt;/span&gt;&lt;span style="color:orangered;"&gt;$exchangeserver&lt;/span&gt;&lt;span style="color:blueviolet;"&gt;/powershell&lt;/span&gt; &lt;span style="color:navy;"&gt;-AllowRedirection&lt;/span&gt; &lt;span style="color:navy;"&gt;-Authentication&lt;/span&gt; &lt;span style="color:blueviolet;"&gt;Kerberos&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;Import-PSSession&lt;/span&gt; &lt;span style="color:navy;"&gt;-session&lt;/span&gt; &lt;span style="color:orangered;"&gt;$session&lt;/span&gt; &lt;span style="color:navy;"&gt;-AllowClobber&lt;/span&gt; &lt;span style="color:navy;"&gt;-DisableNameChecking&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;color:blue;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;Get-Exchangecmdlets&lt;/span&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt; &lt;span style="color:navy;"&gt;-ExchangeServer&lt;/span&gt; &lt;span style="color:darkred;"&gt;&amp;#39;exchangeserver1&amp;#39;&lt;/span&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:darkgreen;"&gt;#This throws the error&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;&lt;span style="color:darkgreen;"&gt;
&lt;p&gt;&lt;span style="font-family:Lucida Console;color:#ff0000;font-size:xx-small;"&gt;&lt;span style="font-family:Lucida Console;color:#ff0000;font-size:xx-small;"&gt;&lt;span style="font-family:Lucida Console;color:#ff0000;font-size:xx-small;"&gt;Import-PSSession : Cannot bind argument to parameter &amp;#39;Path&amp;#39; because it is an empty string.
&lt;p&gt;At C:\scripts\importbug.ps1:10 char:5&lt;/p&gt;
&lt;p&gt;+ Import-PSSession -session $session -AllowClobber -DisableNameChecking&lt;/p&gt;
&lt;p&gt;+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/p&gt;
&lt;p&gt;+ CategoryInfo : InvalidData: (:) [Import-PSSession], ParameterBindingValidationException&lt;/p&gt;
&lt;p&gt;+ FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.ImportPSSessionCommand &lt;/p&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;I didn&amp;rsquo;t test the other validation methods, but I suspect they&amp;rsquo;ll all throw the error.&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;Once identified this is easy enough to work around, I simply made a separate function for the import-pssession with no optional parameters and no validation.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;However, since optional parameters should only be validated if a value is provided, this seems rather bug-like to me.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;Nothing in the documentation for Import-PSSession jumped out at me as suggesting that variables are re-processed or anything like that.&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:normal;margin:0in 0in 0pt;background:white;mso-layout-grid-align:none;"&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;font-size:9pt;mso-bidi-font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;Thoughts?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>adding new values to a psobject?</title><link>http://powershell.com/cs/forums/thread/23551.aspx</link><pubDate>Fri, 17 May 2013 12:16:22 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:23551</guid><dc:creator>Sven</dc:creator><slash:comments>4</slash:comments><comments>http://powershell.com/cs/forums/thread/23551.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=230&amp;PostID=23551</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;maybe I&amp;#39;m too stupid but I looked through the web for two days now and I can&amp;#39;t find a solution.&lt;/p&gt;
&lt;p&gt;I created a PSobject and added some properties and values. it looks like this:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp;$script:resultall = new-Object PSobject &lt;br /&gt;&amp;nbsp;&amp;nbsp;Add-Member -InputObject $resultall -memberType NoteProperty -Name DisplayName -Value &amp;quot;Test1&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;Add-Member -InputObject $resultall -memberType NoteProperty -Name Status -Value &amp;quot;Status1&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Now I want to add a second line with similar values to my object but it doesn&amp;#39;t work in any way. &lt;/p&gt;
&lt;p&gt;Every hint is welcome...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sven&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>map drive in workgroup error</title><link>http://powershell.com/cs/forums/thread/23541.aspx</link><pubDate>Fri, 17 May 2013 03:21:17 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:23541</guid><dc:creator>testmanps</dc:creator><slash:comments>1</slash:comments><comments>http://powershell.com/cs/forums/thread/23541.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=238&amp;PostID=23541</wfw:commentRss><description>&lt;p&gt;enviroment:&amp;nbsp; pc1(xp,pc1,192.168.10.1)&amp;nbsp; pc2(xp,pc2,192.168.10.130)&lt;/p&gt;
&lt;p&gt;&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; pc1,share 1&amp;nbsp; &amp;quot;c:\ps\ps2test&amp;quot; no need username/password,&lt;/p&gt;
&lt;p&gt;&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; pc1,share 2&amp;nbsp; &amp;quot;c:\ps\ps3&amp;quot;&amp;nbsp; need username/password,&lt;/p&gt;
&lt;p&gt; in pc2 can use psh create map drive:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $drivek=New-Object -ComObject wscript.network&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $drivek.MapNetworkDrive(&amp;quot;L:&amp;quot;, &amp;quot;\\192.168.10.1\ps3&amp;quot;,$true,&amp;quot;username&amp;quot;,&amp;quot;password&amp;quot;)&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $drivek.MapNetworkDrive(&amp;quot;K:&amp;quot;, &amp;quot;\\192.168.10.1\ps2test&amp;quot;,$true)&amp;nbsp; &lt;/p&gt;
&lt;p&gt;it work ok!&lt;/p&gt;
&lt;p&gt;but&lt;/p&gt;
&lt;p&gt;&amp;nbsp; in pc1,I can&amp;#39;t use invoke-command -session $rs -file .\mapdrive.ps1&lt;/p&gt;
&lt;p&gt;&amp;nbsp; $rs can work ,mapdrive.ps1 like pc2&amp;#39;s map code&lt;/p&gt;
&lt;p&gt;error:&amp;nbsp; MapNetworkDrive refuse&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&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>read a bunch of file and folders and copy them to a new target</title><link>http://powershell.com/cs/forums/thread/23540.aspx</link><pubDate>Fri, 17 May 2013 02:48:22 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:23540</guid><dc:creator>Noel.desousa</dc:creator><slash:comments>1</slash:comments><comments>http://powershell.com/cs/forums/thread/23540.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=200&amp;PostID=23540</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m very new to programing and have only done small script where i query AD for information and email results. This script is something I&amp;#39;ve never done.&lt;/p&gt;
&lt;p&gt;I have to take some code out of SVN via Jenkins and power shell. I got that to work but now need to read all these files and rename as i move them into a new target. I can create a line of code for each file. This then requires me to change my code every time we have a new change.&lt;/p&gt;
&lt;p&gt;how can I load an array and loop though each file as i rename and copy the file to a new location?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Windows Server Backup for multiple servers.</title><link>http://powershell.com/cs/forums/thread/23405.aspx</link><pubDate>Sat, 11 May 2013 08:31:38 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:23405</guid><dc:creator>Sanjeev Singh</dc:creator><slash:comments>8</slash:comments><comments>http://powershell.com/cs/forums/thread/23405.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=200&amp;PostID=23405</wfw:commentRss><description>&lt;p&gt;Hi Team,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I amp writing a powershell script for my windows infrastructure. And the idea is &amp;gt; A script will run on multiple servers and will get the details about windows server backup in excel file.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have done my com programing but i am mot able to make the script for multiple servers for windows server backup. I am not able to get any computer name parameter in WSB cmdlet.&lt;/p&gt;
&lt;p&gt;Please let me know, in case you help me out.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best Regards&lt;/p&gt;
&lt;p&gt;Sanjeev Singh&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Hashtable export-csv format output</title><link>http://powershell.com/cs/forums/thread/23515.aspx</link><pubDate>Thu, 16 May 2013 05:35:29 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:23515</guid><dc:creator>ddan</dc:creator><slash:comments>2</slash:comments><comments>http://powershell.com/cs/forums/thread/23515.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=230&amp;PostID=23515</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have a Hashtable that looks like this:&lt;/p&gt;
&lt;p&gt;NAME;VALUE&lt;/p&gt;
&lt;p&gt;LibraryA;345&lt;/p&gt;
&lt;p&gt;LibraryB;867&lt;/p&gt;
&lt;p&gt;LibraryC;858&lt;/p&gt;
&lt;p&gt;RegionalLibraryT;156&lt;/p&gt;
&lt;p&gt;RegionalLibraryY;99&lt;/p&gt;
&lt;p&gt;LibraryG;689&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is not the order in which I created the Hashtable, after I am done processing, this is the result I get when calling it.&lt;/p&gt;
&lt;p&gt;How do I go about putting it in the order I would like to specify (not assending/desending etc) but in an order of my choice (by row). I will eventually like to export it to csv.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Something like:&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;RegionalLibraryT;value&lt;/p&gt;
&lt;p&gt;RegionalLibraryY;value&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;LibraryC;value&lt;/p&gt;
&lt;p&gt;LibraryB;value&lt;/p&gt;
&lt;p&gt;LibraryA;value&lt;/p&gt;
&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&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>Installing an MSP works on the local machine, fails remotely.  Why?</title><link>http://powershell.com/cs/forums/thread/23495.aspx</link><pubDate>Tue, 14 May 2013 23:35:08 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:23495</guid><dc:creator>catt11</dc:creator><slash:comments>4</slash:comments><comments>http://powershell.com/cs/forums/thread/23495.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=200&amp;PostID=23495</wfw:commentRss><description>&lt;p&gt;Good afternoon,&lt;/p&gt;
&lt;p&gt;I need some advice.&lt;/p&gt;
&lt;p&gt;I need to install an application&amp;#39;s MSP update file on multiple Win08r2 servers.&amp;nbsp; If I run these commands locally, within the target machine&amp;#39;s PS window, it does exactly what I want it to:&lt;/p&gt;
&lt;p&gt;&lt;b&gt;$command = &amp;#39;msiexec.exe /p &amp;quot;c:\test\My Application Update 01.msp&amp;quot; REBOOTPROMPT=S /qb!&amp;#39;&lt;br /&gt;invoke-wmimethod -path win32_process -name create -argumentlist $command&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;The file being executed &lt;i&gt;is &lt;/i&gt;located on the target machine&lt;/p&gt;
&lt;p&gt;If I remotely connect to the machine, and execute the two commands, it opens two x64 msiexec.exe process, and one msiexec.exe *32 process, and just sits there.&lt;/p&gt;
&lt;p&gt;If I restart the server, it doesn&amp;#39;t show that the update was installed, so I don&amp;#39;t think it&amp;#39;s a timing thing.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;I&amp;#39;ve tried creating and remotely executing a PS1 file with the two lines, but that seems to do the same thing.&lt;/p&gt;
&lt;p&gt;If anyone has advice on getting my MSP update installed remotely, I&amp;#39;d be all ears.&lt;/p&gt;
&lt;p&gt;I think I&amp;#39;ve included all the information I have, but if something is missing, please ask questions, and I&amp;#39;ll fill in any blanks.&lt;/p&gt;
&lt;p&gt;Thank you in advance for your time and assistance!&lt;/p&gt;
&lt;p&gt;Catt11&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Need help putting a Log file and Error codes</title><link>http://powershell.com/cs/forums/thread/23455.aspx</link><pubDate>Tue, 14 May 2013 13:57:24 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:23455</guid><dc:creator>osramos</dc:creator><slash:comments>4</slash:comments><comments>http://powershell.com/cs/forums/thread/23455.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=230&amp;PostID=23455</wfw:commentRss><description>&lt;p&gt;Hi there&amp;nbsp; guys. I am a rookie in PS and i need some help of you.&lt;/p&gt;
&lt;p&gt;I have this script below to copy files/folder from one location to a list of servers, and i have 2 problems. The firts is to put some king of error output to a log when the copy of a file is unsucessfull ou sucessfull, and the other is how to put all this in a file Log. Because sometime we must show the logs of the copied files to our custumers when something is goin wrong.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;#Point the script to the text file&lt;br /&gt;&lt;br /&gt;$Computers = Get-Content &amp;quot;C:\DEP\servers.txt&amp;quot;&lt;br /&gt;&lt;br /&gt;# sets the varible for the file location ei c:\temp\ThisFile.exe&lt;br /&gt;#$Source = Get-Content -path &amp;quot;C:\DEPLOYMENT\SOURCE1&amp;quot;&lt;br /&gt;# sets the varible for the file destination&lt;br /&gt;#$Destination = Read-Host &amp;quot;\edp\sit_swaf\work\patches\dm_patches\&amp;quot;&lt;br /&gt;$rc = 0&lt;br /&gt;$Destination = &amp;quot;\output\&amp;quot;&lt;br /&gt;$date = (Get-Date -UFormat &amp;quot;%Y%m%d%H%M&amp;quot;)+&amp;quot;.log&amp;quot;&lt;br /&gt;&lt;br /&gt;# displays the computer names on screen&lt;br /&gt;&lt;br /&gt;$log = &amp;quot;C:\LOGS\copy_files.$date &lt;br /&gt;&lt;br /&gt;foreach($path in $Computers)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Echo &amp;quot;########################################################################################&amp;quot; &amp;gt;&amp;gt; $log&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Echo &amp;quot;`n########################################################################################&amp;quot; &amp;gt;&amp;gt; $log&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Echo &amp;quot;Working with Server $Computers&amp;quot; &amp;gt;&amp;gt; $log&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Copy-Item -Recurse -Path &amp;quot;C:\SOURCE1\*.*&amp;quot; -Destination \\$path\$Destination -Force&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($rc - neq 0)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Echo &amp;quot;`n########################################################################################&amp;quot; &amp;gt;&amp;gt; $log&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Echo &amp;quot;Copy files with error in $Computers&amp;quot; &amp;gt;&amp;gt; $log&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Echo &amp;quot;`nCompleted Working with $server&amp;quot; &amp;gt;&amp;gt; $log&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Echo &amp;quot;########################################################################################&amp;quot; &amp;gt;&amp;gt; $log&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could someone help me on this?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;osramos&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Output to SQL</title><link>http://powershell.com/cs/forums/thread/23524.aspx</link><pubDate>Thu, 16 May 2013 11:28:08 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:23524</guid><dc:creator>ScholesScores</dc:creator><slash:comments>2</slash:comments><comments>http://powershell.com/cs/forums/thread/23524.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=230&amp;PostID=23524</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have a script that will query WMI on my servers and return key metrics (disk space, memory use etc) to a SQL database.&amp;nbsp; I have the basics and can successfully write to the SQL database but I&amp;#39;ve hit a problem when there are multiple rows being returned for a single item.&lt;/p&gt;
&lt;p&gt;For example, I query Win32_Volume for each server in a list.&amp;nbsp; Each server has at least 3 volumes which PowerShell outputs as seperate &amp;quot;group&amp;quot; of data for each volume:&lt;/p&gt;
&lt;p&gt;&lt;img height="271" width="563" src="http://powershell.com/cs/cfs-file.ashx/__key/CommunityServer.Components.UserFiles/00.00.03.08.22/powershell_5F00_1.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;The problem is when the data is written to the SQL table, it is written as one row, with 3 pieces of information in each column.&lt;/p&gt;
&lt;p&gt;&lt;img height="31" width="576" src="http://powershell.com/cs/cfs-file.ashx/__key/CommunityServer.Components.UserFiles/00.00.03.08.22/powershell_5F00_2.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;I want it in SQL as one row per volume per server.&lt;/p&gt;
&lt;p&gt;I have the same issue when a server has multiple occurences of the same item, network adapter, processors etc.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve tried pipeing the results into each Format- but that does&amp;#39;t change what&amp;#39;s written into SQL.&amp;nbsp; I&amp;#39;m guessing I need to put the result into an array and perform a seperate SQL INSERT for each element but I don&amp;#39;t know where to start!&lt;/p&gt;
&lt;p&gt;The full script (as it stands):&lt;/p&gt;
&lt;p&gt;Add-PSSnapin SqlServerCmdletSnapin100&lt;br /&gt;Add-PSSnapin SqlServerProviderSnapin100&lt;/p&gt;
&lt;p&gt;# get server names from SQL table to loop through&lt;br /&gt;$DataSet = Invoke-Sqlcmd -Database ServerStats -Query &amp;quot;SELECT ServerName FROM [ServerStats].[dbo].[ServerList]&amp;quot; -ServerInstance &amp;lt;SQL&amp;gt;&lt;/p&gt;
&lt;p&gt;# get disk stats&lt;br /&gt;foreach ($element in $DataSet)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; $element&lt;br /&gt;&amp;nbsp; $Server = $element.ServerName&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Get metrics for each server in the ServerStats.ServerList&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $Output = Get-WmiObject -Class Win32_Volume -Computer $Server | Select-Object SystemName,Capacity,DriveType,DriveLetter,FreeSpace -ExcludeProperty &amp;quot;_*&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Output to SQL Server table&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ##Connect to the SQL server and the Database&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $conn = New-Object System.Data.SqlClient.SqlConnection(&amp;quot;Data Source=&amp;lt;SQL&amp;gt;; Initial Catalog=ServerStats; Integrated Security=SSPI&amp;quot;)&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ## Open DB Connection&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $conn.Open()&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #Create SQL Insert Statement with your values&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $insert_stmt = &amp;quot;INSERT INTO Disk(ComputerName,Size,DiskType,DriveLetter,FreeSpace) VALUES (&amp;#39;$Server&amp;#39;,&amp;#39;$($Output.Capacity)&amp;#39;,&amp;#39;$($Output.DriveType)&amp;#39;,&amp;#39;$($Output.DriveLetter)&amp;#39;,&amp;#39;$($Output.FreeSpace)&amp;#39;)&amp;quot; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ## Create your command&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $cmd = $conn.CreateCommand()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $cmd.CommandText = $insert_stmt&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ## Invoke the Insert statement&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $cmd.ExecuteNonQuery()&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ## Close DB Connection&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $conn.Close()&lt;br /&gt;}&lt;br /&gt;# end disk stats&lt;/p&gt;
&lt;p&gt;# get network adapter stats&lt;br /&gt;foreach ($element in $DataSet)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; $element&lt;br /&gt;&amp;nbsp; $Server = $element.ServerName&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Get metrics for each server in the ServerStats.ServerList&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $Output = Get-WmiObject -Class Win32_NetworkAdapter -Computer $Server | Select-Object PSComputerName,ServiceName,MACAddress,Name,Speed -ExcludeProperty &amp;quot;_*&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Output to SQL Server table&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ##Connect to the SQL server and the Database&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $conn = New-Object System.Data.SqlClient.SqlConnection(&amp;quot;Data Source=&amp;lt;SQL&amp;gt;; Initial Catalog=ServerStats; Integrated Security=SSPI&amp;quot;)&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ## Open DB Connection&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $conn.Open()&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #Create SQL Insert Statement with your values&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $insert_stmt = &amp;quot;INSERT INTO NetworkAdapter(ComputerName,ServiceName,MACAddress,Name,Speed) VALUES (&amp;#39;$Server&amp;#39;,&amp;#39;$($Output.ServiceName)&amp;#39;,&amp;#39;$($Output.MACAddress)&amp;#39;,&amp;#39;$($Output.Name)&amp;#39;,&amp;#39;$($Output.Speed)&amp;#39;)&amp;quot; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ## Create your command&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $cmd = $conn.CreateCommand()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $cmd.CommandText = $insert_stmt&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ## Invoke the Insert statement&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $cmd.ExecuteNonQuery()&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ## Close DB Connection&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $conn.Close()&lt;br /&gt;}&lt;br /&gt;# end network adapter stats&lt;/p&gt;
&lt;p&gt;Any help would be appreciated..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Speed up powershell script with PrimalForms</title><link>http://powershell.com/cs/forums/thread/23503.aspx</link><pubDate>Wed, 15 May 2013 09:10:13 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:23503</guid><dc:creator>lgieske</dc:creator><slash:comments>1</slash:comments><comments>http://powershell.com/cs/forums/thread/23503.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=230&amp;PostID=23503</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;i wrote a script that requires user interaction, the gui was designed with Primalforms. The user can run the script with a simple desktop link.&lt;/p&gt;
&lt;p&gt;The first time i run the script the start takes ca. 10-15 seconds. Some user thougth that nothing happens and starts the script again.&lt;/p&gt;
&lt;p&gt;Does anyone know a way to show a status while loading the script or any other ideas to show informations that the script starts?&lt;/p&gt;
&lt;p&gt;Tanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>All Users Report</title><link>http://powershell.com/cs/forums/thread/22903.aspx</link><pubDate>Fri, 19 Apr 2013 09:25:14 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:22903</guid><dc:creator>rishi.vohra</dc:creator><slash:comments>44</slash:comments><comments>http://powershell.com/cs/forums/thread/22903.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=197&amp;PostID=22903</wfw:commentRss><description>&lt;p&gt;&lt;span&gt;
&lt;p align="left" dir="ltr"&gt;Dear,&lt;/p&gt;
&lt;p align="left" dir="ltr"&gt;I am looking for a script that could generate ALL users report which should include:&lt;/p&gt;
&lt;p align="left" dir="ltr"&gt;DN, CN, FirstName, LastName, DisplayName, Email , TelephoneNumber, Mobile, Description, Office ,pwdLastSet, pwage, whenCreated, strAccountExpirationDate, userAccountControl, lastLogonTimeStamp, Disabled, Itsage, Site&lt;/p&gt;
&lt;p align="left" dir="ltr"&gt;　&lt;/p&gt;
&lt;p align="left" dir="ltr"&gt;I have a script which does give me few attribute, what Can I add more in my scipt to generate other attributes?&lt;/p&gt;
&lt;p align="left" dir="ltr"&gt;Here&amp;#39;s my script:&lt;/p&gt;
&lt;p align="left" dir="ltr"&gt;--------------------------&lt;/p&gt;
&lt;p align="left" dir="ltr"&gt;$NumDays = 0&lt;/p&gt;
&lt;p align="left" dir="ltr"&gt;$LogDir = &amp;quot;e:\script\User-Accounts.csv&amp;quot;&lt;/p&gt;
&lt;p align="left" dir="ltr"&gt;$currentDate = [System.DateTime]::Now&lt;/p&gt;
&lt;p align="left" dir="ltr"&gt;$currentDateUtc = $currentDate.ToUniversalTime()&lt;/p&gt;
&lt;p align="left" dir="ltr"&gt;$lltstamplimit = $currentDateUtc.AddDays(- $NumDays)&lt;/p&gt;
&lt;p align="left" dir="ltr"&gt;$lltIntLimit = $lltstampLimit.ToFileTime()&lt;/p&gt;
&lt;p align="left" dir="ltr"&gt;$adobjroot = [adsi]&amp;#39;&amp;#39;&lt;/p&gt;
&lt;p align="left" dir="ltr"&gt;$objstalesearcher = New-Object System.DirectoryServices.DirectorySearcher($adobjroot)&lt;/p&gt;
&lt;p align="left" dir="ltr"&gt;$objstalesearcher.filter = &amp;quot;(&amp;amp;(objectCategory=person)(objectClass=user)(lastLogonTimeStamp&amp;lt;=&amp;quot; + $lltIntLimit + &amp;quot;))&amp;quot;&lt;/p&gt;
&lt;p align="left" dir="ltr"&gt;$users = $objstalesearcher.findall() | select `&lt;/p&gt;
&lt;p align="left" dir="ltr"&gt;@{e={$_.properties.cn};n=&amp;#39;Display Name&amp;#39;},`&lt;/p&gt;
&lt;p align="left" dir="ltr"&gt;@{e={$_.properties.samaccountname};n=&amp;#39;Username&amp;#39;},`&lt;/p&gt;
&lt;p align="left" dir="ltr"&gt;@{e={[datetime]::FromFileTimeUtc([int64]$_.properties.lastlogontimestamp[0])};n=&amp;#39;Last Logon&amp;#39;},`&lt;/p&gt;
&lt;p align="left" dir="ltr"&gt;@{e={[string]$adspath=$_.properties.adspath;$account=[ADSI]$adspath;$account.psbase.invokeget(&amp;#39;AccountDisabled&amp;#39;)};n=&amp;#39;Account Is Disabled&amp;#39;}&lt;/p&gt;
&lt;p align="left" dir="ltr"&gt;$users | Export-CSV -NoType $LogDir&lt;/p&gt;
&lt;p align="left" dir="ltr"&gt;------------------------------------------&lt;/p&gt;
&lt;p align="left" dir="ltr"&gt;Thanks&lt;/p&gt;
&lt;p align="left" dir="ltr"&gt;&amp;nbsp;&lt;/p&gt;
&lt;span style="font-family:Calibri;font-size:x-small;"&gt;&lt;span style="font-family:Calibri;font-size:x-small;"&gt;
&lt;p align="left" dir="ltr"&gt;　&lt;/p&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Powershell when run under a scheduled task requires a local user profile</title><link>http://powershell.com/cs/forums/thread/23483.aspx</link><pubDate>Tue, 14 May 2013 20:27:30 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:23483</guid><dc:creator>rfiscus</dc:creator><slash:comments>11</slash:comments><comments>http://powershell.com/cs/forums/thread/23483.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=200&amp;PostID=23483</wfw:commentRss><description>&lt;p&gt;If I run a scheduled task that executes a PS script, it fails, actually does nothing.&amp;nbsp; If I log onto that system with the user account&amp;nbsp;running the task and then log off again, the scheduled task runs fine.&amp;nbsp; Why would a local profile need to be created before running a PS script with it?&amp;nbsp; We have a GPO that sets the MachinePolicy to RemoteSigned but have not been able to set the UserPolicy to RemoteSigned unless the user logs on.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>PowerShell for Developers - Cmdlets</title><link>http://powershell.com/cs/forums/thread/23511.aspx</link><pubDate>Wed, 15 May 2013 18:14:53 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:23511</guid><dc:creator>ps2</dc:creator><slash:comments>0</slash:comments><comments>http://powershell.com/cs/forums/thread/23511.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=74&amp;PostID=23511</wfw:commentRss><description>&lt;p&gt;In PowerShell we have a concept called Cmdlets, these are the functions we use.  We&amp;rsquo;ve already seem some of them, but this chapter will introduce you to the must-know Cmdlets.  This is not a catalog of all Cmdlets, not even close.  As of PowerShell 3.0 there are 2,430 in Windows Server 2012, without adding those available from the community.&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://timrayburn.net/blog/powershell-for-developers-cmdlets/" rel="nofollow"&gt;Read More&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Cross-post: RMS PowerShell cmdlets - preview release</title><link>http://powershell.com/cs/forums/thread/23510.aspx</link><pubDate>Wed, 15 May 2013 17:51:57 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:23510</guid><dc:creator>ps2</dc:creator><slash:comments>0</slash:comments><comments>http://powershell.com/cs/forums/thread/23510.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=74&amp;PostID=23510</wfw:commentRss><description>&lt;p&gt;The RMS team has been hard at work and now have our first preview release of a set of PowerShell cmdlets using AD RMS SDK.&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/b/rms/archive/2013/05/02/cross-post-rms-powershell-cmdlets-preview-release.aspx" rel="nofollow"&gt;Read More&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Finding a specific file on a list of servers' local drives</title><link>http://powershell.com/cs/forums/thread/23462.aspx</link><pubDate>Tue, 14 May 2013 15:48:01 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:23462</guid><dc:creator>tonyaldr</dc:creator><slash:comments>6</slash:comments><comments>http://powershell.com/cs/forums/thread/23462.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=200&amp;PostID=23462</wfw:commentRss><description>&lt;p&gt;I don&amp;#39;t know if this can be done, but I need to search for a specific file on only a server&amp;#39;s local drives in order to determine whether a certain program is installed.&amp;nbsp; The boxes were all originally built and managed by different people and so are installed with different folder structures and locations.&amp;nbsp; Also, the servers are a mix that have solely a C, a C &amp;amp; D, or a C and some other letters.&amp;nbsp; There are about 150 servers that I need to check and I have a txt file that I can pipe in.&amp;nbsp; Is there a way to have Powershell determine what a machine&amp;#39;s local drives (non-optical) are and limit the search to those?&amp;nbsp; Thx!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>$PrinterList = IMPORT-CSV C:\printersL.csv</title><link>http://powershell.com/cs/forums/thread/23374.aspx</link><pubDate>Thu, 09 May 2013 19:46:56 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:23374</guid><dc:creator>Morphius_ca</dc:creator><slash:comments>15</slash:comments><comments>http://powershell.com/cs/forums/thread/23374.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=230&amp;PostID=23374</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Need to include a csv file command below&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:10pt;font-family:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#c0504d;"&gt;&lt;span style="font-size:10pt;font-family:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;"&gt;Location.ps1&lt;/span&gt;&lt;font face="&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;" color="#c0504d" style="font-size:10pt;"&gt;
&lt;p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#c0504d;"&gt;$printer = Get-WmiObject win32_printer -Comp PPR235QFLS01| Where-Object { $_.name -eq &amp;quot;OTT235Q-354A-X7535&amp;quot; }&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#c0504d;"&gt;$printer.Location = &amp;quot;OTT235QDC&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#c0504d;"&gt;$printer.Put()&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#c0504d;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;Also tried &lt;/p&gt;
&lt;p class="MsoNormal"&gt;$PrinterList=IMPORT-CSV C:\printer.csv&lt;br /&gt;$USERLIST | FOREACH-OBJECT { $_ }&lt;/p&gt;
&lt;p class="MsoNormal"&gt;FOREACH ($Printer in $PrinterList) { &lt;br /&gt;$Location=$Printer.Location&lt;br /&gt;$printer = Get-WmiObject win32_printer -Comp PPR235QFLS01| Where-Object { $_.name -eq &amp;quot;$($Printer.Name)&amp;quot; }&lt;br /&gt;$printer.Location = &amp;quot;$($Printer.Location)&amp;quot;&lt;br /&gt;$printer.Put()&lt;br /&gt;}&lt;/p&gt;
&lt;/p&gt;
&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I need to update the printer location on roughly 900 printers in print management (Print Management Microsoft Corporation Version: 6.1.7600.16385)&lt;/p&gt;
&lt;p class="MsoNormal"&gt;csv file as:&amp;nbsp; &lt;/p&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;Server, Location, Printer Name,&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;Remi&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Help with adding a string to an existing script</title><link>http://powershell.com/cs/forums/thread/23457.aspx</link><pubDate>Tue, 14 May 2013 14:56:04 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:23457</guid><dc:creator>Shlomo</dc:creator><slash:comments>4</slash:comments><comments>http://powershell.com/cs/forums/thread/23457.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=203&amp;PostID=23457</wfw:commentRss><description>Guys,

I would like to know what should i use to add a manager to a user in AD i have the below script that working just fine, i just want to add the manger filed as well.

#Import ActiveDirectory module
Import-Module ActiveDirectory
#Input New User Parameters Here
$Password = ConvertTo-SecureString -string &amp;#39;password go here&amp;#39; -asPlainText -Force
$OU = &amp;#39;domain.com/domain/Users&amp;#39;
$first = &amp;#39;test&amp;#39;
$last = &amp;#39;test1&amp;#39;
$al = &amp;#39;test1&amp;#39;
$title = &amp;#39;Corporate Systems Engineer&amp;#39;
$dep = &amp;#39;Sales - Engineering&amp;#39; 
#Do Not Change
$displayname = $first + &amp;#39; &amp;#39; + $last
$UPN = $al+&amp;#39;@domain.com&amp;#39;
$SAM = $al
#Create New Exchange User
New-Mailbox -Name $displayname -Alias $al -OrganizationalUnit $OU -UserPrincipalName $UPN -SamAccountName $SAM -FirstName $first -Initials &amp;#39;&amp;#39; -LastName $last -Password $Password -ResetPasswordOnNextLogon $false
Set-ADUser $al -Title $title -Department $dep
Add-ADGroupMember -Identity group name -Members $al
Set-ADUser $al -Replace @{showInOrgChart=$true}
Set-ADUser $al -Office &amp;#39;France Office&amp;#39; -Company domain.com.&amp;#39; -Title $title -Department $dep -Country FR -Description Employee 
#Enable User for Lync
Enable-CsUser -Identity $displayname -RegistrarPool &amp;#39;server address.com&amp;#39; -SipAddressType EmailAddress&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>PowerShell the SQL Server Way</title><link>http://powershell.com/cs/forums/thread/23477.aspx</link><pubDate>Tue, 14 May 2013 18:46:43 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:23477</guid><dc:creator>ps2</dc:creator><slash:comments>0</slash:comments><comments>http://powershell.com/cs/forums/thread/23477.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=83&amp;PostID=23477</wfw:commentRss><description>&lt;p&gt;Although Windows PowerShell has been available to IT professionals going on seven years, there are still many IT pros who are just now deciding to see what the fuss is all about. Depending on your job, you might find PowerShell an invaluable tool. Microsoft&amp;#39;s plan is that PowerShell will be the management tool for all of its servers and platforms. For most IT pros, it&amp;#39;s not a matter of if you&amp;#39;ll be using PowerShell, only a matter of when.&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://sqlmag.com/powershell/powershell-sql-server-way" 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 Summit–My recorded sessions </title><link>http://powershell.com/cs/forums/thread/23476.aspx</link><pubDate>Tue, 14 May 2013 18:45:15 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:23476</guid><dc:creator>ps2</dc:creator><slash:comments>0</slash:comments><comments>http://powershell.com/cs/forums/thread/23476.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=173&amp;PostID=23476</wfw:commentRss><description>&lt;p&gt;&lt;a href="http://virtu-al.net/images/PowerShell-Summit-Sessions_9784/image.png"&gt;&lt;/a&gt;Recently I was lucky enough to attend the PowerShell Summit at Microsoft HQ in Redmond, this was an awesome event which was focused on PowerShell, it included not only people who are using PowerShell but also some of the people who wrote and designed it.&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.virtu-al.net/2013/05/07/powershell-summitmy-recorded-sessions/" rel="nofollow"&gt;Read More&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>One-Click Windows Azure VM (IaaS) Deployment with PowerShell User Experience </title><link>http://powershell.com/cs/forums/thread/23475.aspx</link><pubDate>Tue, 14 May 2013 18:43:41 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:23475</guid><dc:creator>ps2</dc:creator><slash:comments>0</slash:comments><comments>http://powershell.com/cs/forums/thread/23475.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=170&amp;PostID=23475</wfw:commentRss><description>&lt;p&gt;I somehow got into writing PowerShell script in the last few days for facilitating deploying Windows Azure VMs into configured subnets for our upcoming Windows Azure IaaS Training Days.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.technet.com/b/yungchou/archive/2013/05/09/one-click-windows-azure-vm-iaas-deployment-with-powershell-user-experience.aspx" rel="nofollow"&gt;Read More&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Backup and Restore SQL Server with the SQL Server 2012 PowerShell cmdlets</title><link>http://powershell.com/cs/forums/thread/23474.aspx</link><pubDate>Tue, 14 May 2013 18:41:23 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:23474</guid><dc:creator>ps2</dc:creator><slash:comments>0</slash:comments><comments>http://powershell.com/cs/forums/thread/23474.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=83&amp;PostID=23474</wfw:commentRss><description>&lt;p&gt;There are plenty of occasions when it makes a lot of sense to do backup and restore scripts in PowerShell. Microsoft have put effort into making it much easier, as Allen demonstrates.&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="https://www.simple-talk.com/sql/backup-and-recovery/backup-and-restore-sql-server-with-the-sql-server-2012-powershell-cmdlets/" rel="nofollow"&gt;Read More&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>