Scripting Blog

A place to learn about PowerShell and share stories of automation

Hey, Scripting Guy! How Can I Copy Specified Sections of an .RTF File to a New Word Document?

Hey, Scripting Guy! I have large files output by a reservoir simulator, files I use to predict oil, water and gas movements in hydrocarbon reservoirs. These files are finite-difference numerical simulators, and work by timestep (i.e. a time interval, usually about 90 days); when they have finished calculating, they chuck out a bunch of data ...

Hey, Scripting Guy! How Can I Prevent Office Excel From Turning My Imported Numbers Into Dates?

Hey, Scripting Guy! I have a CSV file, and every time I open that file in Office Excel my numbers get converted to dates. How can I import numbers as numbers?-- JR Hey, JR. You know, just yesterday the Scripting Guy who writes this column learned about Yelo, an interesting little company based in New York City. So what does Yelo do? Well, ...

Hey, Scripting Guy! How Can I Copy Files Based on Multiple Criteria?

Hey, Scripting Guy! How can I match multiple criteria in a file name? I need to copy all the files in a folder that are less than 24 hours old, and that have file names beginning with the letters FS, CG, or GPS. How can I do that?-- EM Hey, EM. You know, today is an exciting day at Microsoft; it’s the day when we get our Spam ...

Hey, Scripting Guy! How Can I Add a Hyperlink to a Microsoft Office Outlook Signature?

Hey, Scripting Guy! I’m trying to use a script to create a Microsoft Office Outlook signature, but I can’t figure out how to add a live hyperlink to that signature. Can you help?-- BK Hey, BK. You know, it’s interesting that you mention signatures. During his last two trips to TechEd Orlando, the Scripting Guy who writes ...

Hey, Scripting Guy! How Can I Change a Registry Value Named (Default)?

Hey, Scripting Guy! I am trying to change a registry value that has the name (Default). I can change any registry value that has a “real” name, but I can’t figure out how to change one with the name (Default). If I export the value the name shows up as @, but that doesn’t work in my script, either. How do I change a registry value ...

Feedback usabilla icon