Scripting Blog

A place to learn about PowerShell and share stories of automation

Hey, Scripting Guy! Quick-Hits Friday: The Scripting Guys Respond to a Bunch of Questions (01/23/09)

How Can I Return File Names of Files Created in Less Than an Hour from the Current Time?   Hey, Scripting Guy! I am attempting to write a script that looks at the creation dates of all files in a certain directory. If the files were created less than an hour from the current time, the script will return those file names. The script will ...

Hey, Scripting Guy! How Can I Stop an Unwanted Process?

Hey, Scripting Guy! I need some help. There is a stupid process that launches every time I turn on my computer. I cannot find where it is starting from. I have looked in all the usual places, but I can't find it. This process was installed when I installed some software that I use only about once a month. I do not need this dumb process ...

Hey, Scripting Guy! How Can I Back Up a Database’s Data Folder While the Database Is Running?

Hey, Scripting Guy! I have a problem. I am trying to script the backup of a data folder used by our database application. The problem is that as long as the database service is running, the files that are used are locked, and I am unable to copy them. I have found the service that runs the database, and when I use WMI to stop the service, ...

Hey, Scripting Guy! How Do I Display a Message and the Time a Process Was Terminated?

Hey, Scripting Guy! We have this application that is supposed to run all the time. It is constantly giving us headaches and crashing. The applications vendor evidently expects it to crash all the time and has a thread that will restart it three times. After that, it is pretty much down for the count. The problem is that we never know when ...

Hey, Scripting Guy! How Can I Be Notified When a Process Begins?

Hey, Scripting Guy! I need to be notified when a process begins. I would like to use Windows PowerShell to do this, but it does not seem to work. While I could do this in VBScript, I prefer to use Windows PowerShell. Can this be done?- NL Hi NL, Because we have access to the .NET Framework in Windows PowerShell, it can most certainly be done...