The “Hey, Scripting Guys!” blog has been retired. There are many useful posts in this blog, so we keep the blog here for historical reference. However, some information might be very outdated and many of the links might not work anymore.
New PowerShell content is being posted to the PowerShell Community blog where members of the community can create posts by submitting content in the GitHub repository.
(image)
Hey, Scripting Guy! Is there any way to monitor a folder for file creations and deletions, all with just one script?
-- HA(image) (image) (image)
Hey, HA. By the way, thanks for the question: you temporarily saved us from answering a different question, one that was proving a bit difficult thanks to some surprising ...
(image)
Hey, Scripting Guy! Is there a way I can be notified any time a network cable gets unplugged on a computer?-- DD(image) (image) (image)
Hey, DD. A lot of people, when growing up, had a grandmother or an aunt or someone somewhere who had a house with a big attic, an attic overflowing with stuff. Admittedly, most of the time you had ...
(image)
Hey, Scripting Guy! Is it possible to have a script automatically run any time a file is added to a specific folder?-- MB(image) (image) (image)
Hey, WM. Yes, this is possible, thanks to the magic of WMI events, which allow you to write a script to monitor for something of interest (like a file being added to a folder) and then ...
(image)
Hey, Scripting Guy! How can I be notified any time a service goes down?-- RN(image) (image) (image)
Hey, RN. As usual, there are a couple different ways you can do this, but perhaps the simplest approach is to create a script that monitors WMI events. We don’t have time to do a detailed explanation of WMI events in this column, but...