<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-5987791209900104222</atom:id><lastBuildDate>Tue, 14 Apr 2026 09:24:47 +0000</lastBuildDate><category>PowerShell</category><category>Exchange</category><category>Scripting Games 2008</category><category>video</category><category>Server 2008</category><category>books</category><category>eBooks</category><category>one-liner</category><category>validation</category><category>CTP</category><category>CTP2</category><category>convert</category><category>SMO</category><category>SQL</category><category>automate</category><category>webcast</category><category>C#</category><category>PowerGUI</category><category>Server Core</category><category>command line</category><category>ip</category><category>logparser</category><category>misc</category><category>process</category><category>registry</category><category>remoting</category><category>smtp</category><category>sound</category><category>Dates</category><category>HTTP</category><category>Hyper-V</category><category>context menu</category><category>culture</category><category>environment</category><category>form</category><category>functions</category><category>ie</category><category>measure</category><category>monitor</category><category>podcast</category><category>prompt</category><category>search</category><category>snap-ins</category><category>Globalization</category><category>Group Policy</category><category>MVP</category><category>Photography</category><category>SMS</category><category>ServerManager</category><category>VBScript</category><category>Virtualization</category><category>WMI</category><category>WPF</category><category>batch</category><category>dos</category><category>efficient</category><category>filter</category><category>filters</category><category>ftp</category><category>funny</category><category>games</category><category>gotcha</category><category>hebrew</category><category>images</category><category>inline</category><category>login</category><category>mmc</category><category>mobile</category><category>progress bar</category><category>random</category><category>resizing</category><category>security</category><category>services</category><category>setup</category><category>spy</category><category>text editor</category><category>training</category><category>transcript</category><category>virtual machine</category><category>w3c</category><category>wallpaper</category><title>$cript Fanatic</title><description>If you repeat it [$CRIPT] it!</description><link>http://scriptolog.blogspot.com/</link><managingEditor>noreply@blogger.com (Shay Levy)</managingEditor><generator>Blogger</generator><openSearch:totalResults>224</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5987791209900104222.post-3368754073594042834</guid><pubDate>Mon, 21 Jul 2008 21:21:00 +0000</pubDate><atom:updated>2013-02-25T15:14:44.439+02:00</atom:updated><title>Blog Relocation - Reminder</title><description>&lt;br /&gt;
This blog has moved, please update your links:&lt;br /&gt;
&lt;br /&gt;
RSS Feed: &lt;a href=&quot;http://feeds.feedburner.com/ShayLevy&quot;&gt;http://feeds.feedburner.com/ShayLevy&lt;/a&gt;&lt;br /&gt;
New Blog URL: &lt;a href=&quot;http://powershay.com/&quot;&gt;http://PowerShay.com&lt;/a&gt;&lt;a href=&quot;http://blogs.microsoft.co.il/blogs/ScriptFanatic&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
-Shay</description><link>http://scriptolog.blogspot.com/2008/07/blog-relocation-reminder.html</link><author>noreply@blogger.com (Shay Levy)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5987791209900104222.post-3555278446982697902</guid><pubDate>Sun, 06 Jul 2008 21:22:00 +0000</pubDate><atom:updated>2008-07-07T00:22:12.323+03:00</atom:updated><title>Blog relocation</title><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;My blog is moving to &lt;a href=&quot;http://blogs.microsoft.co.il/blogs/&quot; target=&quot;_blank&quot;&gt;Microsoft&#39;s Israel blogs community&lt;/a&gt;. The new RSS feed is&lt;em&gt;:&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title=&quot;http://feeds.feedburner.com/ShayLevy&quot; href=&quot;http://feeds.feedburner.com/ShayLevy&quot;&gt;http://feeds.feedburner.com/ShayLevy&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;New posts will be published here: &lt;a title=&quot;http://blogs.microsoft.co.il/blogs/ScriptFanatic/&quot; href=&quot;http://blogs.microsoft.co.il/blogs/ScriptFanatic/&quot;&gt;http://blogs.microsoft.co.il/blogs/ScriptFanatic/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;Please update your feed reader.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;-Shay&lt;/p&gt;  </description><link>http://scriptolog.blogspot.com/2008/07/blog-relocation.html</link><author>noreply@blogger.com (Shay Levy)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5987791209900104222.post-3888205229538492077</guid><pubDate>Sun, 06 Jul 2008 19:37:00 +0000</pubDate><atom:updated>2008-07-06T22:37:19.046+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">eBooks</category><category domain="http://www.blogger.com/atom/ns#">SQL</category><title>Free eBook - Introducing SQL Server 2008</title><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://csna01.libredigital.com/?urss1q2we6&quot; target=&quot;_blank&quot;&gt;&lt;img style=&quot;margin: 0px 10px 0px 0px&quot; src=&quot;http://csna01.libredigital.com/images/ms_sql_srv_cvr.jpg&quot; align=&quot;left&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Microsoft is offering &lt;a href=&quot;http://csna01.libredigital.com/?urss1q2we6&quot; target=&quot;_blank&quot;&gt;Introducing SQL Server 2008&lt;/a&gt; by Peter DeBetta for free. Learn about major new features in SQL Server 2008 including security, administration, and performance.     &lt;/p&gt;  </description><link>http://scriptolog.blogspot.com/2008/07/free-ebook-introducing-sql-server-2008.html</link><author>noreply@blogger.com (Shay Levy)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5987791209900104222.post-2474382713171819624</guid><pubDate>Fri, 04 Jul 2008 16:43:00 +0000</pubDate><atom:updated>2008-07-04T19:43:26.987+03:00</atom:updated><title>IIS7 PowerShell Provider Tech Preview 2</title><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The second CTP of the &lt;a href=&quot;http://blogs.msdn.com/powershell/archive/2008/07/03/iis7-powershell-provider-tech-preview-2.aspx&quot; target=&quot;_blank&quot;&gt;IIS7 Powershell provider&lt;/a&gt; has released bumping up the total number of cmdlets to 55! &lt;/p&gt;  &lt;p&gt;After you download and install the provider you can start exploring it with the pre-built PowerShell console file:&lt;/p&gt;  &lt;p&gt;Click on the Start Menu -&amp;gt; &amp;quot;All Programs&amp;quot; -&amp;gt; &amp;quot;IIS 7.0 Extensions&amp;quot; -&amp;gt; &amp;quot;IIS PowerShell Management Console&amp;quot;. &lt;/p&gt;  &lt;p&gt;The prompt of the new PowerShell command window is set to &amp;quot;IIS:\&amp;quot; - the root of the IIS Provider namespace. &lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://lh3.ggpht.com/scriptolog/SG5TKSH3ORI/AAAAAAAAAsU/3Traoe7XcU8/s1600-h/image5.png&quot;&gt;&lt;img style=&quot;border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px&quot; height=&quot;115&quot; alt=&quot;image&quot; src=&quot;http://lh6.ggpht.com/scriptolog/SG5TLdYOhiI/AAAAAAAAAsY/3Tl-8vglUSs/image_thumb3.png?imgmax=800&quot; width=&quot;529&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In the example below I&#39;m loading the provider snap-in (manually) into my current PowerShell session. &lt;/p&gt;  &lt;div&gt;   &lt;pre style=&quot;padding-right: 2px; padding-left: 2px; padding-bottom: 2px; color: white; padding-top: 2px; background-color: navy&quot;&gt;&lt;p&gt;&lt;font color=&quot;#00ff00&quot;&gt;# find the IIS snap-in name&lt;/font&gt;&lt;br /&gt;PS &amp;gt; Get-PSSnapin -Registered &lt;/p&gt;
&lt;p&gt;Name&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; : &lt;font color=&quot;#ffff00&quot;&gt;IIsProviderSnapIn&lt;/font&gt;&lt;br /&gt;PSVersion&amp;#160;&amp;#160; : 1.0&lt;br /&gt;Description : IIS Administration Provider &lt;/p&gt;&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#00ff00&quot;&gt;# load the snap-in&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;PS &amp;gt; Add-PSSnapin IIsProviderSnapIn&lt;/p&gt;&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;&lt;font color=&quot;#00ff00&quot;&gt;# get a list off all cmdlets name in the provider&lt;/font&gt;&lt;br /&gt;PS &amp;gt; Get-Command -PSSnapin IIsProviderSnapIn | select name &lt;/p&gt;
&lt;p&gt;Name&lt;br /&gt;----&lt;br /&gt;Add-WebConfiguration&lt;br /&gt;Add-WebConfigurationProperty&lt;br /&gt;Backup-WebConfiguration&lt;br /&gt;Begin-CommitDelay&lt;br /&gt;Clear-FrebData&lt;br /&gt;Clear-WebConfiguration&lt;br /&gt;ConvertTo-WebApplication&lt;br /&gt;Disable-Freb&lt;br /&gt;Disable-WebModule&lt;br /&gt;Enable-Freb&lt;br /&gt;Enable-WebModule&lt;br /&gt;End-CommitDelay&lt;br /&gt;Get-AppDomain&lt;br /&gt;Get-AppPoolState&lt;br /&gt;Get-ConfigurationBackup&lt;br /&gt;Get-URL&lt;br /&gt;Get-WebConfiguration&lt;br /&gt;Get-WebConfigurationProperty&lt;br /&gt;Get-WebHandler&lt;br /&gt;Get-WebItemState&lt;br /&gt;Get-WebModule&lt;br /&gt;Get-WebRequest&lt;br /&gt;Get-WebSiteState&lt;br /&gt;New-AppPool&lt;br /&gt;New-FtpSite&lt;br /&gt;New-ManagedWebModule&lt;br /&gt;New-VirtualDirectory&lt;br /&gt;New-WebApplication&lt;br /&gt;New-WebBinding&lt;br /&gt;New-WebHandler&lt;br /&gt;New-WebModule&lt;br /&gt;New-WebSite&lt;br /&gt;Remove-AppPool&lt;br /&gt;Remove-ConfigurationBackup&lt;br /&gt;Remove-VirtualDirectory&lt;br /&gt;Remove-WebApplication&lt;br /&gt;Remove-WebBinding&lt;br /&gt;Remove-WebConfigurationProperty&lt;br /&gt;Remove-WebHandler&lt;br /&gt;Remove-WebModule&lt;br /&gt;Remove-WebSite&lt;br /&gt;Restart-AppPool&lt;br /&gt;Restart-WebItem&lt;br /&gt;Restore-WebConfiguration&lt;br /&gt;Set-WebBinding&lt;br /&gt;Set-WebConfiguration&lt;br /&gt;Set-WebConfigurationProperty&lt;br /&gt;Set-WebHandler&lt;br /&gt;Set-WebModule&lt;br /&gt;Start-AppPool&lt;br /&gt;Start-WebItem&lt;br /&gt;Start-WebSite&lt;br /&gt;Stop-AppPool&lt;br /&gt;Stop-WebItem&lt;br /&gt;Stop-WebSite
&lt;/p&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160; &lt;/p&gt;

&lt;p&gt;To navigate the namespace simply set your location to the root of the IIS Provider namespace, now you can navigate using the get-childitem (dir for short):&amp;#160;&amp;#160; &lt;/p&gt;

&lt;div&gt;
  &lt;pre style=&quot;padding-right: 2px; padding-left: 2px; padding-bottom: 2px; color: white; padding-top: 2px; background-color: navy&quot;&gt;PS &amp;gt; cd iis: 
PS &amp;gt; dir 

Name
----
Sites
AppPools
SslBindings &lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160; &lt;/p&gt;

&lt;p&gt;One thing I&#39;ve noticed is the lack of command completion when navigating the provider hierarchy. For example, cd si&amp;lt;tab&amp;gt; or dir iis:\si&amp;lt;tab&amp;gt; doesn&#39;t resolve to the sites container. Only after manually executing &#39;dir iis:\sites&#39; the list of sites became available for upcoming dir requests. &lt;/p&gt;

&lt;p&gt;To get a list of web sites we list the sites container which returns a site collection: &lt;/p&gt;

&lt;div&gt;
  &lt;pre style=&quot;padding-right: 2px; padding-left: 2px; padding-bottom: 2px; color: white; padding-top: 2px; background-color: navy&quot;&gt;PS &amp;gt; dir iis:\sites&lt;br /&gt;
Name             ID State   Physical Path                 Bindings
----             -- -----   -------------                 --------
Default Web Site 1  Started %SystemDrive%\inetpub\wwwroot http *:80:
test1            2  Started                               http *:80:test1
test2            3  Started                               http *:80:test2
&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160; &lt;/p&gt;

&lt;p&gt;The same applies for the AppPool container. It can be quiet long to type this each time you want to get all (or even one) web sites or app pools. I excepted to find corresponding cmdlets such as Get-WebSite or Get-AppPool but there are no. 
  &lt;br /&gt;&lt;/p&gt;

&lt;div&gt;
  &lt;pre style=&quot;padding-right: 2px; padding-left: 2px; padding-bottom: 2px; color: white; padding-top: 2px; background-color: navy&quot;&gt;PS &amp;gt; get-command -noun appp* -pss iis* | select name

CommandType     Name
-----------     ----
Cmdlet          Get-AppPoolState
Cmdlet          New-AppPool
Cmdlet          Remove-AppPool
Cmdlet          Restart-AppPool
Cmdlet          Start-AppPool
Cmdlet          Stop-AppPool


PS &amp;gt; get-command -noun webs* -pss iis* | select name

CommandType     Name
-----------     ----
Cmdlet          Get-WebSiteState
Cmdlet          New-WebSite
Cmdlet          Remove-WebSite
Cmdlet          Start-WebSite
Cmdlet          Stop-WebSite&lt;br /&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160; &lt;/p&gt;

&lt;p&gt;You can overcome the absence of this cmdlets by defining your own functions to get this objects: &lt;/p&gt;

&lt;div&gt;
  &lt;pre style=&quot;padding-right: 2px; padding-left: 2px; padding-bottom: 2px; color: white; padding-top: 2px; background-color: navy&quot;&gt;PS &amp;gt; function Get-WebSite($name=&#39;*&#39;) {Get-Item IIS:\Sites\$name}&lt;br /&gt;PS &amp;gt; function Get-AppPool($name=&#39;*&#39;) {Get-Item IIS:\AppPools\$name}

&lt;font color=&quot;#00ff00&quot;&gt;# get all websites&lt;/font&gt;
PS 153&amp;gt; Get-WebSite

Name             ID State   Physical Path                 Bindings
----             -- -----   -------------                 --------
Default Web Site 1  Started %SystemDrive%\inetpub\wwwroot http *:80:
test1            2  Started                               http *:80:test1
test2            3  Started                               http *:80:test2&lt;br /&gt;

&lt;font color=&quot;#00ff00&quot;&gt;&lt;br /&gt;&lt;br /&gt;# get a website name using wildcards&lt;/font&gt;
PS &amp;gt; Get-WebSite def*

Name             ID State   Physical Path                 Bindings
----             -- -----   -------------                 --------
Default Web Site 1  Started %SystemDrive%\inetpub\wwwroot http *:80:&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160; &lt;/p&gt;

&lt;p&gt;OK, time to build a new site. There is a new cmdlet just for that: &lt;/p&gt;

&lt;div&gt;
  &lt;pre style=&quot;padding-right: 2px; padding-left: 2px; padding-bottom: 2px; color: white; padding-top: 2px; background-color: navy&quot;&gt;&lt;p&gt;PS &amp;gt; New-Website -name NewWebsite

Name        ID State Physical Path Bindings
----        -- ----- ------------- --------
NewWebsite  4                      http *:80:NewWebsite&lt;/font&gt;
&lt;font color=&quot;#ff0000&quot;&gt;New-WebSite : The &lt;span class=&quot;kwrd&quot;&gt;object&lt;/span&gt; identifier does not represent a valid &lt;span class=&quot;kwrd&quot;&gt;object&lt;/span&gt;.&lt;br /&gt;Exception from HRESULT: 0x800710D8)
At line:1 &lt;span class=&quot;kwrd&quot;&gt;char&lt;/span&gt;:12
+ New-Website &amp;lt;&amp;lt;&amp;lt;&amp;lt;  -name NewWebsite&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160; &lt;br /&gt;&lt;br /&gt;&lt;font color=&quot;#00ff00&quot;&gt;# the site was created but with an error. I&#39;m not sure what is the &lt;br /&gt;# cause so I logged a comment on that IIS.net forums 

# I found that if you assign the command to a 
# variable then the error is gone
# e.g. $newSite = New-WebSite -name NewWebSite

# despite the error the new site is up and running &lt;/font&gt; &lt;br /&gt;
&lt;font color=&quot;#ffffff&quot;&gt;PS &amp;gt; Get-WebSite new* 

Name       ID State   Physical Path Bindings
----       -- -----   ------------- --------
NewWebsite 4  Started               http *:80:NewWebsite&lt;br /&gt;
&lt;/font&gt;&lt;/p&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;
Now lets try to remove it:&amp;#160; &lt;p&gt;&lt;/p&gt;

&lt;pre style=&quot;padding-right: 2px; padding-left: 2px; padding-bottom: 2px; color: white; padding-top: 2px; background-color: navy&quot;&gt;PS &amp;gt; Get-WebSite NewWebsite | Remove-WebSite
PS &amp;gt; Get-WebSite

Name             ID State   Physical Path                 Bindings
----             -- -----   -------------                 --------
Default Web Site 1  Started %SystemDrive%\inetpub\wwwroot http *:80:
test1            2  Started                               http *:80:test1
test2            3  Started                               http *:80:test2&lt;/pre&gt;

&lt;div&gt;
  &lt;br /&gt;&amp;#160;&lt;/div&gt;

&lt;div&gt;The site was removed successfully but WITHOUT any warning or confirmation. This is were another PowerShell built-in feature comes to rescue, the -confirm parameter. &lt;/div&gt;
&lt;/font&gt;

&lt;div&gt;When a cmdlet action significantly affects the system, such as by deleting data or by using a significant amount of system resources, Windows PowerShell can automatically prompt you for confirmation before performing the action:&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div&gt;
  &lt;pre style=&quot;padding-right: 2px; padding-left: 2px; padding-bottom: 2px; color: white; padding-top: 2px; background-color: navy&quot;&gt;PS 197&amp;gt; Get-WebSite new* | Remove-WebSite -Confirm

Confirm
Are you sure you want to perform this action?
Performing operation &amp;quot;Remove-WebSite&amp;quot; on Target &amp;quot;NewWebsite&amp;quot;.
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  &lt;br /&gt;[?] Help (default is &amp;quot;Y&amp;quot;):&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;You can get more information on PowerShell&#39;s common parameters by typing:&lt;/p&gt;

&lt;div&gt;
  &lt;pre style=&quot;padding-right: 2px; padding-left: 2px; padding-bottom: 2px; color: white; padding-top: 2px; background-color: navy&quot;&gt;PS &amp;gt; help about_CommonParameters&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;That&#39;s it for now :)&lt;/p&gt;  </description><link>http://scriptolog.blogspot.com/2008/07/iis7-powershell-provider-tech-preview-2.html</link><author>noreply@blogger.com (Shay Levy)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/scriptolog/SG5TLdYOhiI/AAAAAAAAAsY/3Tl-8vglUSs/s72-c/image_thumb3.png?imgmax=800" height="72" width="72"/><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5987791209900104222.post-4479961687351206571</guid><pubDate>Tue, 01 Jul 2008 18:27:00 +0000</pubDate><atom:updated>2008-07-01T23:17:24.518+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">MVP</category><category domain="http://www.blogger.com/atom/ns#">PowerShell</category><title>2008 Microsoft MVP Award</title><description>&lt;p&gt;&amp;#160;&lt;a href=&quot;http://lh4.ggpht.com/scriptolog/SGp3JeAkmpI/AAAAAAAAAr8/PTOGUHoDjKI/s1600-h/mvp%5B9%5D.png&quot;&gt;&lt;img style=&quot;border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; margin: 0px 10px 0px 0px; border-right-width: 0px&quot; height=&quot;184&quot; alt=&quot;mvp&quot; src=&quot;http://lh6.ggpht.com/scriptolog/SGp3KxwIwJI/AAAAAAAAAsA/w5FNgr7o5Ec/mvp_thumb%5B5%5D.png?imgmax=800&quot; width=&quot;239&quot; align=&quot;left&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;     &lt;br /&gt;I got an email from Microsoft regarding the 2008 Microsoft MVP Award. I was chosen for the award in the &lt;strong&gt;Admin Frameworks&lt;/strong&gt; category (&lt;a href=&quot;http://www.microsoft.com/powershell&quot; target=&quot;_blank&quot;&gt;Windows PowerShell&lt;/a&gt;).&lt;/p&gt;  &lt;p&gt;What a day! What can I say. It feels like walking on the moon. It is an honor to be among the &lt;a href=&quot;https://mvp.support.microsoft.com/communities/mvp.aspx?product=1&amp;amp;competency=Admin+Frameworks&amp;amp;page=1&quot; target=&quot;_blank&quot;&gt;great guys&lt;/a&gt;. I would like to thank the people who supported me along the way and to &lt;a href=&quot;http://www.microsoft.com&quot; target=&quot;_blank&quot;&gt;Microsoft&lt;/a&gt; for the award. &lt;/p&gt;  &lt;p&gt;PowerShell ROCKS!&lt;/p&gt;  </description><link>http://scriptolog.blogspot.com/2008/07/2008-microsoft-mvp-award.html</link><author>noreply@blogger.com (Shay Levy)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/scriptolog/SGp3KxwIwJI/AAAAAAAAAsA/w5FNgr7o5Ec/s72-c/mvp_thumb%5B5%5D.png?imgmax=800" height="72" width="72"/><thr:total>11</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5987791209900104222.post-5088563009470531196</guid><pubDate>Mon, 30 Jun 2008 19:03:00 +0000</pubDate><atom:updated>2008-06-30T23:48:20.520+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">PowerShell</category><title>Do you know your aliases?</title><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This little &lt;a href=&quot;http://blogs.microsoft.co.il/files/folders/110020/download.aspx&quot;&gt;PowerShell script&lt;/a&gt; you can check how familiar you are with all the built-in aliases in PowerShell V2 CTP2.     &lt;br /&gt;For each alias there are 7 cmdlet names to choose from. There are 10 questions, and at the end of the quiz you can review your results and optionally run the quiz again. &lt;/p&gt;  &lt;p&gt;You need to have &lt;a href=&quot;http://www.microsoft.com/downloads/details.aspx?FamilyId=7C8051C2-9BFC-4C81-859D-0864979FA403&amp;amp;displaylang=en&quot;&gt;PowerShell V2 CTP2&lt;/a&gt; installed for the script to run. &lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;Good luck :)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://lh6.ggpht.com/scriptolog/SGkq6lMimUI/AAAAAAAAArs/ZJ4e4xq91qI/s1600-h/quiz117.jpg&quot;&gt;&lt;img style=&quot;border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px&quot; height=&quot;294&quot; src=&quot;http://lh3.ggpht.com/scriptolog/SGkq78DGYTI/AAAAAAAAArw/HgIQMXFTWCA/quiz1_thumb13.jpg?imgmax=800&quot; width=&quot;511&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://lh3.ggpht.com/scriptolog/SGkq8d88MkI/AAAAAAAAAr0/WHCfls8ILZY/s1600-h/quiz218.jpg&quot;&gt;&lt;img style=&quot;border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px&quot; height=&quot;294&quot; src=&quot;http://lh4.ggpht.com/scriptolog/SGkq9DWCD2I/AAAAAAAAAr4/Co4c6-E58TU/quiz2_thumb14.jpg?imgmax=800&quot; width=&quot;511&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  </description><link>http://scriptolog.blogspot.com/2008/06/do-you-know-your-aliases.html</link><author>noreply@blogger.com (Shay Levy)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/scriptolog/SGkq78DGYTI/AAAAAAAAArw/HgIQMXFTWCA/s72-c/quiz1_thumb13.jpg?imgmax=800" height="72" width="72"/><thr:total>3</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5987791209900104222.post-522836602742283915</guid><pubDate>Thu, 26 Jun 2008 10:55:00 +0000</pubDate><atom:updated>2008-06-26T13:55:02.956+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">PowerShell</category><title>ActiveXPoSH - PowerShell for VBScript/JScript</title><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://www.sapien.com/&quot; target=&quot;_blank&quot;&gt;SAPIEN Technologies&lt;/a&gt; has released a new COM component named &lt;a href=&quot;http://blog.sapien.com/index.php/2008/06/25/activexposh-is-now-a-free-download/&quot;&gt;ActiveXPoSH&lt;/a&gt; (included in &lt;a href=&quot;http://www.primaltools.com/&quot;&gt;PrimalScript 2007&lt;/a&gt; script editor). It is a special PowerShell host that allow developers/scripters to run single cmdlets or entire scripts from VBScript/JScript code. The component is free for personal and commercial use.&lt;/p&gt;  &lt;p&gt;You can find more details in this &lt;a href=&quot;http://support.sapien.com/bulletins/activexposh.pdf&quot;&gt;document&lt;/a&gt; and download it from &lt;a href=&quot;http://www.primalscript.com/Free_Tools/index.asp&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;  </description><link>http://scriptolog.blogspot.com/2008/06/activexposh-powershell-for.html</link><author>noreply@blogger.com (Shay Levy)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5987791209900104222.post-7251170466965364238</guid><pubDate>Sat, 21 Jun 2008 18:13:00 +0000</pubDate><atom:updated>2008-06-21T21:13:12.682+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">PowerShell</category><title>Generating TinyURLs from PowerShell</title><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://tinyurl.com/&quot; target=&quot;_blank&quot;&gt;TinyURL&lt;/a&gt; is a web service that provides short aliases for long URLs. Here&#39;s a function to generate URL aliases using TinyURL&#39;s API. The returned URL is short and never expires.&lt;/p&gt;  &lt;div&gt;   &lt;pre class=&quot;csharpcode&quot;&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre class=&quot;csharpcode&quot;&gt;function New-TinyUrl($url){
    (&lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt;-&lt;span class=&quot;kwrd&quot;&gt;object&lt;/span&gt; net.webclient).downloadString(&lt;span class=&quot;str&quot;&gt;&amp;quot;http://tinyurl.com/api-create.php?url=$url&amp;quot;&lt;/span&gt;) 
}&lt;/pre&gt;

  &lt;pre class=&quot;csharpcode&quot;&gt;&amp;#160;&lt;/pre&gt;

  &lt;div&gt;
    &lt;pre class=&quot;csharpcode&quot;&gt;PS &amp;gt; $vug = New-TinyUrl -url http:&lt;span class=&quot;rem&quot;&gt;//marcoshaw.blogspot.com/2008/06/windows-powershell-virtual-user-group.html&lt;/span&gt;
PS &amp;gt; $vug
PS &amp;gt; &lt;a href=&quot;http://tinyurl.com/4k9ons&quot;&gt;http:&lt;span class=&quot;rem&quot;&gt;//tinyurl.com/4k9ons&lt;/a&gt;&lt;/span&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Test it in your default browser: &lt;/p&gt;

&lt;div&gt;
  &lt;pre class=&quot;csharpcode&quot;&gt;PS &amp;gt; (&lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt;-&lt;span class=&quot;kwrd&quot;&gt;object&lt;/span&gt; -com shell.application).open($vug) &lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;-Shay &lt;/p&gt;  </description><link>http://scriptolog.blogspot.com/2008/06/generating-tinyurls-from-powershell.html</link><author>noreply@blogger.com (Shay Levy)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5987791209900104222.post-394645533602693287</guid><pubDate>Fri, 20 Jun 2008 14:49:00 +0000</pubDate><atom:updated>2008-06-20T17:50:20.536+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">PowerShell</category><title>Windows PowerShell Virtual User Group #6</title><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://marcoshaw.blogspot.com/&quot; target=&quot;_blank&quot;&gt;Marco&#39;s&lt;/a&gt; Windows PowerShell Virtual User Group #6 is going to take place next week:    &lt;br /&gt;Tuesday, Jun 24 7:30pm &amp;#8211; 10:30pm (Timezone: Eastern Time) &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;strong&gt;Agenda       &lt;br /&gt;&lt;/strong&gt;&lt;/u&gt;    &lt;br /&gt;8:00PM-8:10PM: Introduction     &lt;br /&gt;8:10PM-8:40PM: Bruce Payette (Microsoft)     &lt;br /&gt;8:40PM-9:10PM: Wassim Fayed (Microsoft)     &lt;br /&gt;9:10PM-9:40PM: Hal Rottenberg     &lt;br /&gt;9.40PM-9:50PM: Closing&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Speaker topics       &lt;br /&gt;&lt;/u&gt;&lt;/strong&gt;    &lt;br /&gt;Bruce Payette : PowerShell v2 modules.     &lt;br /&gt;Wassim Fayed : PowerShell v2 remoting.     &lt;br /&gt;Hal Rottenberg: Managing VMware Infrastructure using PowerShell.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;To join for video:    &lt;br /&gt;&lt;a href=&quot;https://www.livemeeting.com/cc/winserver_usergroup/join?id=5H2F88&amp;amp;role=attend&amp;amp;pw=8%5E-%5CzqX&quot;&gt;https://www.livemeeting.com/cc/winserver_usergroup/join?id=5H2F88&amp;amp;role=attend&amp;amp;pw=8%5E-%5CzqX&lt;/a&gt;    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;To join for audio:    &lt;br /&gt;Toll free: +1 (866) 553-8146     &lt;br /&gt;Participant code: 5592528585&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Required login information (via LiveMeeting)       &lt;br /&gt;&lt;/u&gt;&lt;/strong&gt;    &lt;br /&gt;Meeting ID: 5H2F88     &lt;br /&gt;Entry Code: 8^-\zqX &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Mark your calendar :)   &lt;/p&gt;  </description><link>http://scriptolog.blogspot.com/2008/06/windows-powershell-virtual-user-group-6.html</link><author>noreply@blogger.com (Shay Levy)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5987791209900104222.post-8191841086850385514</guid><pubDate>Wed, 18 Jun 2008 10:22:00 +0000</pubDate><atom:updated>2008-06-18T13:22:37.700+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">PowerShell</category><title>Portable PowerShell</title><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Hallelujah! Get all the details on &lt;a href=&quot;http://karlprosser.com/coder/2008/06/17/portable-powershell-v1-and-v2-side-by-side-even-on-server-core/&quot; target=&quot;_blank&quot;&gt;Karl Prosser&lt;/a&gt; [MVP] blog.&lt;/p&gt;  </description><link>http://scriptolog.blogspot.com/2008/06/portable-powershell.html</link><author>noreply@blogger.com (Shay Levy)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5987791209900104222.post-100773046661327440</guid><pubDate>Tue, 17 Jun 2008 15:30:00 +0000</pubDate><atom:updated>2008-06-17T18:30:58.440+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Hyper-V</category><category domain="http://www.blogger.com/atom/ns#">PowerShell</category><category domain="http://www.blogger.com/atom/ns#">webcast</category><category domain="http://www.blogger.com/atom/ns#">WMI</category><title>Webcast: Managing Hyper-V Virtual Machines with WMI and Windows PowerShell</title><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Start Date: &lt;/strong&gt;Wednesday, July 02, 2008 8:00 AM Pacific Time (US &amp;amp; Canada)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032381324&amp;amp;EventCategory=4&amp;amp;culture=en-US&amp;amp;CountryCode=US&quot; target=&quot;_blank&quot;&gt;&lt;u&gt;&lt;strong&gt;Event Overview&lt;/strong&gt;&lt;/u&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Before the beta release of Microsoft System Center Virtual Machine Manager 2008, there was only one option for automating management of Hyper-V virtual machines&amp;#8212;Windows Management Instrumentation (WMI). In this webcast, you learn how to automate the most common management tasks, how to create a delegation model using Windows Authorization Manager, and where the power of WMI can pick up where Virtual Machine Manager leaves off. In addition, the Hewlett-Packard Windows Server 2008 Academy team shares their experience automating the deployment of 600 virtual machines in less than three hours using WMI and Windows PowerShell.&lt;/p&gt;  &lt;p&gt;&amp;#160; &lt;br /&gt;&lt;b&gt;Presenters: &lt;/b&gt;&lt;a href=&quot;http://dungkhoang.spaces.live.com/default.aspx&quot; target=&quot;_blank&quot;&gt;Dung Hoang Khac&lt;/a&gt;, Principal Consultant, HP, and Aric Bernard, Senior Technology Consultant, HP&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032381324&amp;amp;EventCategory=4&amp;amp;culture=en-US&amp;amp;CountryCode=US &quot; target=&quot;_blank&quot;&gt;Register&lt;/a&gt; for the event.&lt;/p&gt;  </description><link>http://scriptolog.blogspot.com/2008/06/webcast-managing-hyper-v-virtual.html</link><author>noreply@blogger.com (Shay Levy)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5987791209900104222.post-4481827055073919624</guid><pubDate>Tue, 17 Jun 2008 11:52:00 +0000</pubDate><atom:updated>2008-06-17T14:52:57.879+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">PowerShell</category><title>Listing enumeration type values (updated)</title><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The &lt;a href=&quot;http://scriptolog.blogspot.com/2007/10/listing-enumeration-type-values.html&quot;&gt;old function&lt;/a&gt; return duplicate names when the enumeration has two names with the same value, for example:&amp;#160; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div&gt;   &lt;pre class=&quot;csharpcode&quot;&gt;PS &amp;gt;  Get-EnumValues Microsoft.PowerShell.ExecutionPolicy

        Name Value
        ---- -----
Unrestricted     0
RemoteSigned     1
   AllSigned     2
  &lt;font color=&quot;#ffff00&quot;&gt;Restricted     3
  Restricted     3&lt;/font&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Here is the modified version of the function:&lt;/p&gt;

&lt;div&gt;
  &lt;pre class=&quot;csharpcode&quot;&gt;function Get-EnumValues([type]$type){ 
   [&lt;span class=&quot;kwrd&quot;&gt;enum&lt;/span&gt;]::getNames($type) | select @{n=&lt;span class=&quot;str&quot;&gt;&amp;quot;Name&amp;quot;&lt;/span&gt;;e={$_}},@{n=&lt;span class=&quot;str&quot;&gt;&amp;quot;Value&amp;quot;&lt;/span&gt;;e={$type::$_.value__}} | ft -auto
}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;And the results:&lt;/p&gt;

&lt;div&gt;
  &lt;pre class=&quot;csharpcode&quot;&gt;PS &amp;gt;  Get-EnumValues Microsoft.PowerShell.ExecutionPolicy

Name         Value
----         -----
Unrestricted     0
RemoteSigned     1
AllSigned        2
&lt;font color=&quot;#ffff00&quot;&gt;Restricted       3
Default          3&lt;/font&gt;&lt;/pre&gt;

  &lt;pre class=&quot;csharpcode&quot;&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre class=&quot;csharpcode&quot;&gt;-Shay&lt;/pre&gt;
&lt;/div&gt;  </description><link>http://scriptolog.blogspot.com/2008/06/listing-enumeration-type-values-updated.html</link><author>noreply@blogger.com (Shay Levy)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5987791209900104222.post-502022142691089825</guid><pubDate>Mon, 16 Jun 2008 09:02:00 +0000</pubDate><atom:updated>2008-06-18T12:53:33.080+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">misc</category><category domain="http://www.blogger.com/atom/ns#">PowerShell</category><title>Scripting Sysadmin meme</title><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In response to Steve&#39;s &lt;a href=&quot;http://www.mindofroot.com/2008/06/10/scriptingsysadmin-meme/&quot;&gt;Scripting/Sysadmin Meme&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;4&quot;&gt;How old were you when you started programming?&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;I was 27 when I started to write HTML/ASP pages.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;4&quot;&gt;What was your first machine?&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;My first real computer was Windows 95 PC. When I was 12 (I think), my uncle gave me a Texas Instruments (I can&#39;t remember the model name) but at that time I wasn&#39;t a computer geek. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;4&quot;&gt;What was the first real script you wrote?&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;Looping through ADO recordset and populating Active Server Pages (ASP). &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;4&quot;&gt;What scripting languages have you used?&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;JavaScript/DHTML, VBScript/JScript.    &lt;br /&gt;Now that PowerShell is out all other scripting languages are set aside. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;4&quot;&gt;What was your first professional sysadmin gig?&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;I started as a sysadmin in a government institution back in 1998 and I&#39;m still holding that position (aside from one year in which I left and returned). &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;4&quot;&gt;If you knew then what you know now, would have started in IT?&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;Yes. Ever since I have been in the field I have found that being in IT brings out the best in&amp;#160; me. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;4&quot;&gt;If there is one thing you learned along the way that you would tell new sysadmins, what would it be?&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;Learn to script! Knowing to script is your sysadmin added value, sorts of a &#39;super sysadmin&#39; if you will. You&#39;ll be able to do magic when your boss wants something that the GUI can&#39;t provide. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;4&quot;&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;4&quot;&gt;What&amp;#8217;s the most fun you&amp;#8217;ve ever had scripting?&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;Every day that passes with Windows PowerShell scripting is a great deal of fun. I learn something new every day. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;4&quot;&gt;Who am I calling out?&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://powershellers.blogspot.com/&quot; target=&quot;_blank&quot;&gt;Alexandair Nicolic&lt;/a&gt;, &lt;a href=&quot;http://www.powershell-ag.de/ps/Blog/tabid/73/EntryID/1091/Default.aspx&quot; target=&quot;_blank&quot;&gt;Rolf Masuch&lt;/a&gt; and &lt;a href=&quot;http://get-powershell.com/2008/06/16/sysadmin-meme/&quot; target=&quot;_blank&quot;&gt;Andy Schneider&lt;/a&gt;&lt;/p&gt;  </description><link>http://scriptolog.blogspot.com/2008/06/scripting-sysadmin-meme.html</link><author>noreply@blogger.com (Shay Levy)</author><thr:total>3</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5987791209900104222.post-6181374951574615272</guid><pubDate>Sun, 15 Jun 2008 09:25:00 +0000</pubDate><atom:updated>2008-06-15T12:25:04.628+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">misc</category><category domain="http://www.blogger.com/atom/ns#">PowerShell</category><category domain="http://www.blogger.com/atom/ns#">sound</category><title>PowerShell Popcorn</title><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;My son heard all the alien &lt;a href=&quot;http://scriptolog.blogspot.com/2008/06/close-encounters-of-powershell-kind.html&quot;&gt;beeps&lt;/a&gt; and asked me for this one, the &lt;a href=&quot;http://en.wikipedia.org/wiki/Popcorn_(instrumental)&quot;&gt;Popcorn&lt;/a&gt; tune. I couldn&#39;t say no :)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div&gt;   &lt;pre class=&quot;csharpcode&quot;&gt;1..2  | % {
    
    1..2 | % {900,800,900,700,550,700,450 | % { [console]::beep($_,50); sleep -m 150}; sleep -m 250}
    
    900,1000,1050,1000,1050,1000,1050,900,1000,900,1000,800,900,800,900 | % { [console]::beep($_,50); sleep -m 150}
    sleep -m 250
    
    1..2 | % {900,800,900,700,550,700,450 | % { [console]::beep($_,50); sleep -m 150}; sleep -m 250}
    
    900,1000,1050,1000,1050,1000,1050,900,1000,900,1000,800,900,1000,1050 | % { [console]::beep($_,50); sleep -m 150}
    sleep -m 250    

    1..2 | % {
        1..2 | % {1350,1250,1350,1050,800,1050,680 | % { [console]::beep($_,50); sleep -m 150}; sleep -m 250}
        1350,1500,1600,1500,1600,1500,1600,1350,1500,1350,1500,1200,1350,1200,1350 | % { [console]::beep($_,50); sleep -m 150}
        sleep -m 250
    }
}&lt;/pre&gt;
&lt;/div&gt;  </description><link>http://scriptolog.blogspot.com/2008/06/powershell-popcorn.html</link><author>noreply@blogger.com (Shay Levy)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5987791209900104222.post-4090552022399125974</guid><pubDate>Fri, 13 Jun 2008 22:46:00 +0000</pubDate><atom:updated>2008-06-14T13:27:59.560+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">PowerShell</category><category domain="http://www.blogger.com/atom/ns#">webcast</category><title>Webcast - Using Windows PowerShell with Visual Studio 2008</title><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;u&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032370949&amp;amp;EventCategory=5&amp;amp;culture=en-US&amp;amp;CountryCode=US&quot; target=&quot;_blank&quot;&gt;&lt;strong&gt;&lt;u&gt;Event Overview         &lt;br /&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Windows PowerShell is arguably one of the coolest things to happen to developers and administrators alike. Harness the power of the Microsoft .NET Framework from the command line and learn how to write scripts in no time at all. With Windows PowerShell, we leverage your current .NET Framework experience to turn you into one heck of a good scripter.    &lt;br /&gt;    &lt;br /&gt;&lt;b&gt;Presenter: &lt;/b&gt;Zain Naboulsi, Developer Evangelist, Microsoft Corporation &lt;/p&gt;  &lt;p&gt;The &lt;a href=&quot;http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032370949&amp;amp;EventCategory=5&amp;amp;culture=en-US&amp;amp;CountryCode=US&quot; target=&quot;_blank&quot;&gt;webcast&lt;/a&gt; is available for offline viewing.&lt;/p&gt;  </description><link>http://scriptolog.blogspot.com/2008/06/webcast-using-windows-powershell-with.html</link><author>noreply@blogger.com (Shay Levy)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5987791209900104222.post-3504649162062468217</guid><pubDate>Fri, 13 Jun 2008 10:41:00 +0000</pubDate><atom:updated>2008-06-13T13:41:31.324+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">CTP2</category><category domain="http://www.blogger.com/atom/ns#">PowerShell</category><title>Enhanced CSV file handling in CTP2</title><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In PowerShell v1 you could import comma separated CSV files only. That&#39;s not a problem anymore in CTP2. The Import/Export CSV cmdlets got enhanced and now they support a new -delimiter parameter:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div&gt;   &lt;pre class=&quot;csharpcode&quot;&gt;PS &amp;gt; get-help import-csv -Parameter delimiter

-Delimiter [&amp;lt;&lt;span class=&quot;kwrd&quot;&gt;char&lt;/span&gt;&amp;gt;]
    Specifies the delimiter that separates the property values &lt;span class=&quot;kwrd&quot;&gt;in &lt;/span&gt;the file that &lt;span class=&quot;kwrd&quot;&gt;is&lt;/span&gt; being imported. The &lt;span class=&quot;kwrd&quot;&gt;default&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;is&lt;/span&gt; a com
    ma (,). Enter a character, such &lt;span class=&quot;kwrd&quot;&gt;as&lt;/span&gt; a semicolon (;).

    Required?                    &lt;span class=&quot;kwrd&quot;&gt;false&lt;/span&gt;
    Position?                    2
    Default &lt;span class=&quot;kwrd&quot;&gt;value&lt;/span&gt;                ,
    Accept pipeline input?       &lt;span class=&quot;kwrd&quot;&gt;false&lt;/span&gt;
    Accept wildcard characters?  &lt;span class=&quot;kwrd&quot;&gt;false&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Note that the delimiter is limited to a single character.
  &lt;br /&gt;&lt;/p&gt;

&lt;div&gt;
  &lt;pre class=&quot;csharpcode&quot;&gt;# Export processes to a space separated csv file&lt;br /&gt;PS &amp;gt; get-process | export-csv -delimiter &lt;span class=&quot;str&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt; -path processes.csv&lt;/pre&gt;

  &lt;pre class=&quot;csharpcode&quot;&gt;# Convert csv files: comma separated to tab separated&lt;br /&gt;&lt;br /&gt;PS &amp;gt; import-csv test.csv | export-csv -del &lt;span class=&quot;str&quot;&gt;&amp;quot;`t&amp;quot;&lt;/span&gt; -p test1.csv 
 &lt;/pre&gt;
&lt;/div&gt;  </description><link>http://scriptolog.blogspot.com/2008/06/enhanced-csv-file-handling-in-ctp2.html</link><author>noreply@blogger.com (Shay Levy)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5987791209900104222.post-723028804315871803</guid><pubDate>Wed, 11 Jun 2008 16:33:00 +0000</pubDate><atom:updated>2008-06-11T19:33:02.162+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">CTP2</category><category domain="http://www.blogger.com/atom/ns#">misc</category><category domain="http://www.blogger.com/atom/ns#">PowerShell</category><category domain="http://www.blogger.com/atom/ns#">sound</category><title>Close Encounters of the PowerShell Kind</title><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;Five tones:&lt;/p&gt;  &lt;div&gt;   &lt;pre class=&quot;csharpcode&quot;&gt;$notes = 900,1000,800,400,600
$duration = 400,400,400,400,1600
0..($notes.length-1) | &lt;span class=&quot;kwrd&quot;&gt;% &lt;/span&gt;{[console]::beep($notes[$_],$duration[$_]) }&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Spaceship Siren:&lt;/p&gt;

&lt;div&gt;
  &lt;pre class=&quot;csharpcode&quot;&gt;1..10 | % { 370..470 | % { [console]::beep($_,5) }}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Talking alien :)&lt;/p&gt;

&lt;div&gt;
  &lt;pre class=&quot;csharpcode&quot;&gt;900,500,1000,800,400,600,1200,300,200,500,1100,300 | &lt;span class=&quot;kwrd&quot;&gt;%&lt;/span&gt;{[console]::beep($_,100)}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;CTP2 Alien:&lt;/p&gt;

&lt;div&gt;
  &lt;pre class=&quot;csharpcode&quot;&gt;1..20 | &lt;span class=&quot;kwrd&quot;&gt;foreach&lt;/span&gt; { 
    
    $rnd = (Get-Random -min 0 -max 20)*100
    
    &lt;span class=&quot;kwrd&quot;&gt;if&lt;/span&gt;($rnd -eq 0) {
        sleep -m 10
    } &lt;span class=&quot;kwrd&quot;&gt;else&lt;/span&gt; {
        [console]::beep($rnd,100)
    }
}&lt;/pre&gt;
&lt;/div&gt;  </description><link>http://scriptolog.blogspot.com/2008/06/close-encounters-of-powershell-kind.html</link><author>noreply@blogger.com (Shay Levy)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5987791209900104222.post-7767595488004314624</guid><pubDate>Wed, 11 Jun 2008 08:41:00 +0000</pubDate><atom:updated>2008-06-11T11:41:00.822+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">CTP2</category><category domain="http://www.blogger.com/atom/ns#">PowerShell</category><category domain="http://www.blogger.com/atom/ns#">process</category><category domain="http://www.blogger.com/atom/ns#">services</category><title>CTP2 - Get Process/Service from remote computers</title><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;One major change to the Get-Process/Get-Service cmdlets in CTP2 is the ability to get objects from remote computers via a new parameter, computerName (or -c for short). You can map process/service objects to their computer by the machineName member.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div&gt;   &lt;pre class=&quot;csharpcode&quot;&gt;PS &amp;gt; Get-Service s* -c computer1,computer2 | select name,machineName

Name                  MachineName
----                  -----------
sacsvr                computer2
SamSs                 computer1
SCardSvr              computer1
Schedule              computer1
seclogon              computer1
SENS                  computer1
ServeRAIDManagerAgent computer2
(...)&lt;/pre&gt;

  &lt;pre class=&quot;csharpcode&quot;&gt;

PS &amp;gt; Get-Process s* -c computer1,computer2 | select name,machineName

Name          MachineName
----          -----------
searchindexer computer1
services      computer2
services      computer1
slp_srvreg    computer2
smax4pnp      computer1
smss          computer2
smss          computer1
snmp          computer2
spoolsv       computer2
spoolsv       computer1
(...)&lt;/pre&gt;
&lt;/div&gt;  </description><link>http://scriptolog.blogspot.com/2008/06/ctp2-get-processservice-from-remote.html</link><author>noreply@blogger.com (Shay Levy)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5987791209900104222.post-8662559848151065546</guid><pubDate>Sun, 01 Jun 2008 11:09:00 +0000</pubDate><atom:updated>2008-06-01T14:09:57.052+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">eBooks</category><title>Free eBook - TCP/IP Fundamentals for Microsoft Windows</title><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The &lt;a href=&quot;http://www.microsoft.com/downloads/details.aspx?FamilyID=c76296fd-61c9-4079-a0bb-582bca4a846f&amp;amp;DisplayLang=en&quot;&gt;eBook&lt;/a&gt; (4.7 MB PDF), from &lt;a href=&quot;http://www.microsoft.com/&quot;&gt;Microsoft&lt;/a&gt;, describes the fundamentals of TCP/IP in Windows Vista, Windows Server 2008, Windows XP, and Windows Server 2003.&lt;/p&gt;  </description><link>http://scriptolog.blogspot.com/2008/06/free-ebook-tcpip-fundamentals-for.html</link><author>noreply@blogger.com (Shay Levy)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5987791209900104222.post-8109879843424791022</guid><pubDate>Thu, 29 May 2008 20:15:00 +0000</pubDate><atom:updated>2008-06-15T10:50:04.673+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">measure</category><category domain="http://www.blogger.com/atom/ns#">PowerShell</category><title>Select and then Sort</title><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;When you use both select-object and sort-object in a pipeline, what&#39;s the proper order? Let&#39;s check how fast they execute.    &lt;br /&gt;Each speed test is built from two similar commands with a different sort/select piping order and each test is executed 10 times. The total execution time is measured in Milliseconds.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;- Updated: 06/11/2008 (see comment below by &lt;a href=&quot;http://www.leeholmes.com/blog&quot; target=&quot;_blank&quot;&gt;Lee Holmes&lt;/a&gt;) -&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Test #1&lt;/u&gt;&lt;/strong&gt; &lt;/p&gt;  &lt;div&gt;   &lt;pre class=&quot;csharpcode&quot;&gt;PS &amp;gt; (measure-Command { 1..10 | &lt;span class=&quot;kwrd&quot;&gt;foreach&lt;/span&gt; { gsv | sort name | select name,status }}).TotalMilliseconds

444.5451


PS &amp;gt; (measure-Command { 1..10 | &lt;span class=&quot;kwrd&quot;&gt;foreach&lt;/span&gt; { gsv | select name,status | sort name}}).TotalMilliseconds

384.7565&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;font style=&quot;background-color: #000000&quot; color=&quot;#ffff00&quot;&gt;&lt;/font&gt;

  &lt;br /&gt;&lt;strong&gt;Result&lt;/strong&gt;: Second command is &lt;strong&gt;15%&lt;/strong&gt; faster.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Test #2 &lt;/strong&gt;&lt;/u&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;strike&gt;# this command is the third example of select-object command from the help files. &lt;/strike&gt;&lt;/p&gt;

&lt;div&gt;
  &lt;pre class=&quot;csharpcode&quot;&gt;&lt;strike&gt;PS &amp;gt; (measure-command { 1..10 | &lt;span class=&quot;kwrd&quot;&gt;foreach&lt;/span&gt; { gps | sort ws | select -last 5 }}).TotalMilliseconds

346.0652


PS &amp;gt; (measure-command { 1..10 | &lt;span class=&quot;kwrd&quot;&gt;foreach&lt;/span&gt; { gps | select -last 5 | sort WS }}).TotalMilliseconds

100.4444&lt;/strike&gt;&lt;strong&gt;
    &lt;br /&gt;&lt;strike&gt;Result&lt;/strike&gt;&lt;/strong&gt;&lt;strike&gt;: Second command is &lt;strong&gt;3.44&lt;/strong&gt; times faster.&lt;/strike&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt; # this command is the sixth example of sort-object command from the CTP help files. I changed the extension to ps1.&lt;/p&gt;

&lt;div&gt;
  &lt;pre class=&quot;csharpcode&quot;&gt;PS &amp;gt; (measure-Command { 1..10 | &lt;span class=&quot;kwrd&quot;&gt;foreach&lt;/span&gt; { dir *.ps1 | sort @{Expression={$_.LastWriteTime-$_.CreationTime}; Ascending=$
&lt;span class=&quot;kwrd&quot;&gt;false&lt;/span&gt;} | select LastWriteTime, CreationTime}}).TotalMilliseconds&lt;br /&gt;
640.9769&lt;/pre&gt;

  &lt;pre class=&quot;csharpcode&quot;&gt;
PS &amp;gt; (measure-Command { 1..10 | &lt;span class=&quot;kwrd&quot;&gt;foreach&lt;/span&gt; { dir *.ps1 | select LastWriteTime, CreationTime | sort @{Expression={$_.LastWr
iteTime-$_.CreationTime}; Ascending=$&lt;span class=&quot;kwrd&quot;&gt;false&lt;/span&gt;}}}).TotalMilliseconds&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;

  &lt;pre class=&quot;csharpcode&quot;&gt;592.3512&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;strong&gt;Result&lt;/strong&gt;: Second command is &lt;strong&gt;8.2%&lt;/strong&gt; faster&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Test #3&lt;/u&gt;&lt;/strong&gt;&lt;strong&gt;&lt;u&gt;&amp;#160;&lt;/u&gt;&lt;/strong&gt;&amp;#160;&lt;/p&gt;

&lt;div&gt;
  &lt;pre class=&quot;csharpcode&quot;&gt;PS &amp;gt; (measure-Command { 1..10 | &lt;span class=&quot;kwrd&quot;&gt;foreach&lt;/span&gt; { dir | sort -unique | select name}}).TotalMilliseconds

6405.653


PS &amp;gt; (measure-Command { 1..10 | &lt;span class=&quot;kwrd&quot;&gt;foreach&lt;/span&gt; { dir | select name | sort -unique}}).TotalMilliseconds

750.8251&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
  &lt;br /&gt;&lt;strong&gt;Result&lt;/strong&gt;: Second command is &lt;strong&gt;753%&lt;/strong&gt; faster! &lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;The reason why &#39;select then sort&#39; is faster to execute is because there are much less properties for sort-object to work on. When you select certain properties from a collection, select-object creates a new object with just the specified properties of the incoming object thus resulting in a smaller object to process.&lt;/p&gt;

&lt;p&gt;One thing is for sure: In most cases, select objects before sorting them, and ALWAYS make sure they produce the SAME output!. &lt;/p&gt;  </description><link>http://scriptolog.blogspot.com/2008/05/select-and-then-sort.html</link><author>noreply@blogger.com (Shay Levy)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5987791209900104222.post-1363311040621529647</guid><pubDate>Wed, 28 May 2008 13:46:00 +0000</pubDate><atom:updated>2008-05-28T16:46:58.137+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">CTP2</category><category domain="http://www.blogger.com/atom/ns#">Dates</category><category domain="http://www.blogger.com/atom/ns#">PowerShell</category><category domain="http://www.blogger.com/atom/ns#">random</category><title>Generating Random Dates</title><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;One of the new cmdlets in PowerShell CTP2 is &lt;a href=&quot;http://blogs.msdn.com/powershell/archive/2008/04/27/get-random.aspx&quot;&gt;Get-Random&lt;/a&gt;. Get-Random gets a random number or selects objects randomly from a collection.&amp;#160; &lt;/p&gt;  &lt;p&gt;I wanted to generate random DateTime objects with it but there is no built-in capability for that, yet it doesn&#39;t mean you can&#39;t use Get-Random it to generate random dates :) &lt;/p&gt;  &lt;p&gt;At its base, a DateTime object is measured in 100-nanosecond units called &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.datetime.ticks.aspx&quot;&gt;Ticks&lt;/a&gt;. So I tried to use Get-Date to initialize a DateTime using Ticks. Again, Get-Date doesn&#39;t have any parameter for that so I checked the underlying object, &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/z2xf7zzk.aspx&quot;&gt;System.DateTime&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;One of the System.DateTime constructors allows you to initialize a new instance of the DateTime structure to a specified number of ticks. The maximum value for ticks is determined by:&lt;/p&gt;  &lt;p&gt;PS &amp;gt; [datetime]::maxValue.ticks   &lt;br /&gt;3155378975999999999&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now, Can I use Get-Random to generate a number in the range of 0-3155378975999999999 (exclusive)?&amp;#160; &lt;br /&gt;The help for Get-Random says: &lt;strong&gt;&lt;u&gt;Without parameters or input&lt;/u&gt;&lt;/strong&gt;, &amp;quot;Get-Random&amp;quot; returns a randomly selected 32-bit unsigned integer between 0 and Int32.MaxValue (0x7FFFFFFF, 2,147,483,647), so it shouldn&#39;t be a problem with the ticks input to generate a higher value then the max value of Int32.MaxValue:    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;PS &amp;gt; Get-Random ([datetime]::maxValue.ticks)   &lt;br /&gt;1.34540044929813E+18    &lt;br /&gt;    &lt;br /&gt;PS &amp;gt; Get-Random ([datetime]::maxValue.ticks)    &lt;br /&gt;8.71609536968019E+17    &lt;br /&gt;    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;Yes I can! So I tried to generate a new DateTime using that method:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;PS &amp;gt; new-object dateTime (Get-Random ([datetime]::maxValue.ticks))   &lt;br /&gt;Friday, March 09, 3951 11:00:06 PM&lt;/p&gt;  &lt;p&gt;PS &amp;gt; new-object dateTime (Get-Random ([datetime]::maxValue.ticks))   &lt;br /&gt;Wednesday, October 07, 2476 1:36:05 AM &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Cool. But this can give a date between the Year 0 and 9999:   &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;PS &amp;gt; new-object datetime ([datetime]::maxValue.ticks) &lt;/p&gt;  &lt;p&gt;Friday, December 31, 9999 11:59:59 PM&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If you want to have random DateTime between a specific period of time then you can use the Get-Random -min and -max parameters:   &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;PS &amp;gt; $dateMin = get-date -year 1980 -month 1 -day 1   &lt;br /&gt;PS &amp;gt; $dateMax = get-date -year 2007 -month 1 -day 1    &lt;br /&gt;    &lt;br /&gt;PS &amp;gt; new-object datetime (Get-Random -min $dateMin.ticks -max $dateMax.ticks) Thursday, November 14, 2002 9:45:23 AM &lt;/p&gt;  &lt;p&gt;PS &amp;gt; new-object datetime (Get-Random -min $dateMin.ticks -max $dateMax.ticks)   &lt;br /&gt;Friday, December 07, 2001 6:17:54 PM &lt;/p&gt;  &lt;p&gt;PS &amp;gt; new-object datetime (Get-Random -min $dateMin.ticks -max $dateMax.ticks)    &lt;br /&gt;Monday, April 01, 2002 4:50:52 PM &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I didn&#39;t find any use for random dates yet, but it is good to know you can create them.&lt;/p&gt;  </description><link>http://scriptolog.blogspot.com/2008/05/generating-random-dates.html</link><author>noreply@blogger.com (Shay Levy)</author><thr:total>4</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5987791209900104222.post-400163185690057708</guid><pubDate>Wed, 28 May 2008 10:45:00 +0000</pubDate><atom:updated>2008-05-28T13:45:51.510+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">WPF</category><title>Adobe Illustrator to XAML converter</title><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;img src=&quot;http://www.mikeswanson.com/XAMLExport/Images/AI to XAML.gif&quot; /&gt; &lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;AI&amp;gt;XAML is plug-in, by &lt;a href=&quot;http://blogs.msdn.com/mswanson/&quot;&gt;Michael Swanson&lt;/a&gt;, that enables graphic designers to export vector artwork from &lt;a href=&quot;http://www.adobe.com/products/illustrator/main.html&quot;&gt;Adobe&lt;sup&gt;&amp;#174;&lt;/sup&gt; Illustrator&lt;sup&gt;&amp;#174;&lt;/sup&gt;&lt;/a&gt; to WPF and Silverlight compatible XAML. It&#39;s free for &lt;a href=&quot;http://www.mikeswanson.com/XAMLExport/default.htm&quot;&gt;download&lt;/a&gt; and there is also a video tutorial on &lt;a href=&quot;http://channel9.msdn.com/ShowPost.aspx?PostID=87407&quot;&gt;Channel9&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;I need to try it in WPF forms! This week, the PowerShell blog sphere is full with WPF walk through&#39;s introduced by &lt;a href=&quot;http://huddledmasses.org&quot;&gt;Joel&lt;/a&gt;, &lt;a href=&quot;http://thepowershellguy.com&quot;&gt;MoW&lt;/a&gt; and &lt;a href=&quot;http://blogs.msdn.com/powershell&quot;&gt;James Brundage from the PowerShell team&lt;/a&gt;.&lt;/p&gt;  </description><link>http://scriptolog.blogspot.com/2008/05/adobe-illustrator-to-xaml-converter.html</link><author>noreply@blogger.com (Shay Levy)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5987791209900104222.post-4748538319346466791</guid><pubDate>Fri, 23 May 2008 09:19:00 +0000</pubDate><atom:updated>2008-05-23T12:26:16.225+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">PowerShell</category><category domain="http://www.blogger.com/atom/ns#">Server 2008</category><title>Fine Grain Password Policy Tool (cmdlet)</title><description>&lt;p&gt;   &lt;br /&gt;In Microsoft Windows 2000 and Windows Server 2003 Active Directory domains, only one password policy and account lockout policy could be applied to all users in the domain.     &lt;br /&gt;The Windows Server 2008 operating system provides a way to define different (fine-grained)password and account lockout policies and apply different restrictions to different sets of users in a domain. &lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://blogs.chrisse.se/blogs/chrisse/default.aspx&quot; target=&quot;_blank&quot;&gt;Christoffer Andersson&lt;/a&gt;, Directory Services MVP, has released the second beta of &lt;strong&gt;FGPP&lt;/strong&gt; - Fine Grain Password Policy Tool. The tool is available as MMC snap-in and a PowerShell cmdlet. &lt;/p&gt;  &lt;p&gt;A quick start guide, download link and usage examples are available on &lt;a href=&quot;http://blogs.chrisse.se/blogs/chrisse/archive/2008/02/06/fine-grain-password-policy-tool-beta-2-is-ready.aspx&quot; target=&quot;_blank&quot;&gt;Christoffer&#39;s blog&lt;/a&gt;.    &lt;/p&gt;  </description><link>http://scriptolog.blogspot.com/2008/05/fine-grain-password-policy-tool-cmdlet.html</link><author>noreply@blogger.com (Shay Levy)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5987791209900104222.post-3773865416291159163</guid><pubDate>Thu, 22 May 2008 11:27:00 +0000</pubDate><atom:updated>2008-05-22T14:27:08.705+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">PowerShell</category><title>PowerShell Community Toolbar</title><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The PowerShell Community Toolbar has passed 200 installations. Don&#39;t know what I&#39;m talking about? Find out &lt;a href=&quot;http://scriptolog.blogspot.com/2008/01/powershell-at-tip-of-your-browser.html&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;  </description><link>http://scriptolog.blogspot.com/2008/05/powershell-community-toolbar.html</link><author>noreply@blogger.com (Shay Levy)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5987791209900104222.post-4566678011221041283</guid><pubDate>Tue, 20 May 2008 18:24:00 +0000</pubDate><atom:updated>2008-05-20T21:24:17.689+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">mobile</category><category domain="http://www.blogger.com/atom/ns#">PowerShell</category><title>Explore your mobile device with Windows PowerShell</title><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://www.nivot.org&quot; target=&quot;_blank&quot;&gt;Oisin Grehan&lt;/a&gt; [MVP] has released a beta version of his PowerShell provider for mobile devices: SmartPhone, PocketPC and Windows Mobile. Now you can start browsing your mobile like any other PowerShell drive:&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;ps c:\&amp;gt; add-pssnapin psmobile    &lt;br /&gt;ps c:\&amp;gt; cd mobile:    &lt;br /&gt;ps mobile:\&amp;gt; cd \temp    &lt;br /&gt;ps mobile:\temp&amp;gt; copy \windows\*.gif .    &lt;br /&gt;ps mobile:\temp&amp;gt; ii banner.gif    &lt;br /&gt;ps mobile:\temp&amp;gt; ii -local banner.gif    &lt;br /&gt;ps mobile:\temp&amp;gt; ii \windows\tasks.exe    &lt;br /&gt;ps mobile:\temp&amp;gt; convertfrom-wmfile *.gif c:\temp\&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This is COOL! &lt;/p&gt;  &lt;p&gt;Get all the details and download it at &lt;a href=&quot;http://www.codeplex.com/psmobile/&quot; target=&quot;_blank&quot;&gt;CodePlex&lt;/a&gt;.&lt;/p&gt;  </description><link>http://scriptolog.blogspot.com/2008/05/explore-your-mobile-device-with-windows.html</link><author>noreply@blogger.com (Shay Levy)</author><thr:total>0</thr:total></item></channel></rss>