Scripting Blog

A place to learn about PowerShell and share stories of automation

How Can I Get Yesterday’s Date?
How Can I Get Yesterday’s Date?
Hey, Scripting Guy! I’m writing a script, and I need to know yesterday’s date. I can use Date() to figure out today’s date, but how do I figure out yesterday’s date?-- SS Hey, SS. You’re right; it’s easy to determine today’s date using a script: But what about yesterday’s date? Listen, we’ve got good news for you: it’s ...
Registry Script Doesn't Work
Registry Script Doesn't Work
Hey, Scripting Guy! I tried writing a script to read data from the registry, but I keep getting this error:   Do you have any idea what's wrong? I'm running Windows XP Professional, Service Pack 1, and this is the code I'm using: -- LW, Omaha, NE Hey, LW. The error you are getting (80041010) means that the specified class (in this case...