Scripting Blog

A place to learn about PowerShell and share stories of automation

Quick-Hits Friday: The Scripting Guys Respond to a Bunch of Questions (9/10/10)

Summary: The Scripting Guys answer questions about Windows Features, and discuss troubleshooting VBScript scripts and Windows PowerShell. In this post:    Converting a VBScript Script to a Windows PowerShell Script Hey, Scripting Guy! I need to convert one VBScript script to Windows PowerShell. Mostly, it is very easy, ...

Hey, Scripting Guy! Weekend Scripter: Configuring W32Time Service Logging

  Microsoft Scripting Guy Ed Wilson here, yesterday I wrote a script that configured my domain controller with an external time source. After doing that, I thought it would be a good idea to have the ability to enable and disable diagnostic logging for the W32Time service. I ran across a pretty good knowledge base article, KB 816043, ...

Hey, Scripting Guy! Weekend Scripter: Configuring an Authoritative Time Server in Windows Server

  Microsoft Scripting Guy Ed Wilson here. I finally had a chance to sit down and catch my breath from the 2010 Scripting Games. I reviewed some awesome scripts, and learned many new tricks. I happened to notice that my desktop computer clock was about five minutes slow. I checked and the domain controller was also slow. After looking ...

Hey, Scripting Guy! Weekend Scripter: Accessing Environmental Variables

 Microsoft Scripting Guy Ed Wilson here. I spent the day at SQL Saturday in Charlotte, NC. I could not resist the opportunity to network with that many rabid Windows PowerShell addicts. I mean, anyone who gives up their Saturday to come to a Microsoft office and sit in training sessions all day is dedicated. Definitely my type of geek. It...

Hey, Scripting Guy! Quick-Hits Friday: The Scripting Guys Respond to a Bunch of Questions (3/12/10)

In this post:   How Can I Format Dates in Windows PowerShell? Hey, Scripting Guy! I am having trouble formatting a date in Windows PowerShell. I would like to format the date as seen here: (Get-Date).AddDays(-1) | $_.ToString("yyyy-MM-dd") However, I am getting an error when I run that command. The only way I found to...