Scripting Blog

A place to learn about PowerShell and share stories of automation

How Can I Configure the Screensaver Used When No One is Logged On to a Computer?

Hey, Scripting Guy! I recently downloaded your Script Center screensaver, and it works great as long as someone is logged on to the computer. However, when no one is logged on the computer uses a different screensaver. How can I get the computer to use the Script Center screensaver when no one is logged on?-- RF Hey, RF. You know, it ...

How Can I Log the Start Time and the End Time of the Screensaver?

Hey, Scripting Guy! How can I log the start time and the end time of the screensaver?-- JS Hey, JS. You know, one of the Scripting Guys (hey, who said “It must be Greg”?) is old enough to remember the days when screensavers first came out. Back then a script like this would have been meaningless: after all, once a screensaver started ...

How Can I Determine the ADsPath for the Logged-On User?

Hey, Scripting Guy! In my HTA, how can I determine the ADsPath for the logged-on user?-- AC Hey, AC. You know, when you work at Microsoft people automatically assume that you spend your days in an ivory tower, totally removed from the day-to-day activities and needs of system administrators. To be honest, that isn’t true: our tower is ...

How Can I Determine the Executable File Corresponding to a Shortcut?

Hey, Scripting Guy! How can I determine the executable file name corresponding to a .lnk shortcut file?-- AM Hey, DE. We’re glad you asked this question; unlike some questions we get (like, “How do I use a script to disable File and Print Sharing on my Windows 2000 computers?”), this happens to be one we have an answer for. As it ...

Can I Lock a Workstation Using a Script?

Hey, Scripting Guy! I know how I can shut down a computer using a script, and I even know how I can log a user off using a script. But is there any way I can lock a workstation using a script?-- TO-R Hey, TO-R. Most likely you’re familiar with the Win32Shutdown method found in the WMI class Win32_OperatingSystem; that method allows you to...

Feedback usabilla icon