How Can I Determine the Day of the Week?

  Hey, PowerShell! I have a script that does certain management tasks based on the day of the week. I know how get the date in a script, but how can I tell whether it’s a Monday or a Tuesday or whatever? This is very easy to do with Syste.Datetime class. param ([system.datetime]$date = $([system.datetime]::now)) $dayofweek…

0

How Can I Determine the Date for the Friday in a Given Week?

Hey, Powershell! Given a date, can a script tell me the date that the Friday for that week occurs?    Here’s a script that – given a date – will report back the date that the Friday of that week falls on:   param ([system.datetime]$date = $([system.datetime]::now))   $intday = [int] $date.DayOfWeek $intadder = 5…

1

How Can I Determine the Beginning and Ending Date of the Previous Month?

Hey, PowerShell! Given a specific date, how can I determine the beginning and ending date of the previous month? In other words, given 8/11/2005, I need to get back 7/1/2005 and 7/31/2005. Powershell provides access to .Net framework.  We can use .Net framework  DateTime class to solve the problem.  Let’s write a script to solve…

0

Transcript of Solving Management Problems with Windows PowerShell

Along with Jeffrey, I presented Solving Management Problems with Windows PowerShell session at TechEd Barcelona.   Many people asked for the script examples  I used during the presentation. Attached zip file contains transcript as well as input files used during presentation. ——————————————————————————————————————-  Arul Kumaravel [MSFT] Development Manager, Windows PowerShell, My PowerShell blog: http://blogs.msdn.com/arulk TechEd.zip

1

Windows PowerShell 1.0 Launched

I am here at TechED-IT Forum at  Barcelona, Spain.   Today, in his keynote address Bob Muglia, Senior Vice President, Microsoft Corporation, officially launched Windows PowerShell 1.0.  Jeffrey Snover showed an awesome demo of using PowerShell to manage IIS 7  in Longhorn  Server.     PowerShell has been multiyear effort by many members of Windows PowerShell…

0