header image

Archive for August, 2008

W2KSG: Drive is Ready

Posted by: | August 31, 2008 | No Comment |

One last look at drives and then we are on to folders. Script Center Home > Microsoft Windows 2000 Scripting Guide > Scripting Concepts and Technologies for System Administration > Script Runtime Primer > FileSystemObject > Managing Disk Drives Ensuring That a Drive is Ready Listing 4.4 uses the Filesystem object to test if drives […]

under: PowerShell original

W2KSG: Drive Properties

Posted by: | August 30, 2008 | No Comment |

One of the most used objects in VBScript is the FileSystemObject.  While much of its functionality is available through other means in PowerShell as we will see in future posts there is still much we can do with it. Script Center Home > Microsoft Windows 2000 Scripting Guide > Scripting Concepts and Technologies for System […]

under: PowerShell original

Chapters 3 and 4 are now available through the Manning Early Access Program – http://www.manning.com/siddaway/ Chapter 3 is concerned with using some of the essential technologies with PowerShell – ADSI, .NET, COM and WMI. The new features in PowerShell V2 CTP2 are briefly covered Chapter 4 covers development for administrators, especially the ad hoc type […]

under: PowerShell original

I’m skipping Chapter 3 of the guide for now as its all about the Windows Script Host.  Jumping to chapter 4 Listing 4.1 enumerates the disk drives Script Center Home > Microsoft Windows 2000 Scripting Guide > Scripting Concepts and Technologies for System Administration > Script Runtime Primer > FileSystemObject > Managing Disk Drives  Returning […]

under: PowerShell original

Date Additions

Posted by: | August 29, 2008 | No Comment |

In http://richardsiddaway.spaces.live.com/blog/cns!43CFA46A74CF3E96!1658.entry we saw how to get the difference between two dates. Let’s look at working out a day in the future. Script Center Home > Microsoft Windows 2000 Scripting Guide > Scripting Concepts and Technologies for System Administration > VBScript Primer > VBScript Reference > Working with Dates and Times  Date Arithmetic Listing 2.17 […]

under: PowerShell original

Powershell event: Sweden

Posted by: | August 29, 2008 | No Comment |

If you are going to be in Stockholm on 16 September don’t forget the PowerShell event and the new PowerShell UG meeting http://www.microsoft.com/sverige/technet/events/powershell/   Share this post :   Technorati Tags: Powershell,Sweden

under: PowerShell original

W2KSG: Date differences

Posted by: | August 28, 2008 | No Comment |

The number of days between two dates has been covered before so we’ll keep this one quick. Script Center Home > Microsoft Windows 2000 Scripting Guide > Scripting Concepts and Technologies for System Administration > VBScript Primer > VBScript Reference > Working with Dates and Times  Date Arithmetic Listing 2.16 $test = [datetime]"10/10/2008"$span = $test […]

under: PowerShell original

Date Display

Posted by: | August 28, 2008 | No Comment |

While playing round with the dates for the previous post I made an odd discovery. PS> Get-Date 27 August 2008 22:09:50 PS> $now = Get-DatePS> $now 27 August 2008 22:09:59 PS> "Now: $($now)"Now: 08/27/2008 22:09:59PS>PS> "Now: $(get-date)"Now: 08/27/2008 22:10:37 Notice how the date and time are displayed in get-date and when setting it to  a […]

under: PowerShell original

W2KSG: Date Parts

Posted by: | August 28, 2008 | No Comment |

I am going to skip a bit of the guide as the input and error handling are quite different between VBScript and PowerShell.  We will see both of those concepts later.  For now we will jump forward to looking at dates Script Center Home > Microsoft Windows 2000 Scripting Guide > Scripting Concepts and Technologies […]

under: PowerShell original

W2KSG: Using Array

Posted by: | August 27, 2008 | No Comment |

If we want to extend our disk checking to multiple machines we can input the computer names via an array. Script Center Home > Microsoft Windows 2000 Scripting Guide > Scripting Concepts and Technologies for System Administration > VBScript Primer > VBScript Overview Arrays ## listing 2.12cls $convert = 1MB$computers = "pcrs2", "pcrs3", "pcrs4"$threshold = […]

under: PowerShell original

Older Posts »

Categories