Scripting Blog

A place to learn about PowerShell and share stories of automation

Hey, Scripting Guy! How Can I Read a CSV File?

Hey, Scripting Guy! I am new to scripting, but I have been tasked with creating a script anyway. What I need to do is to read in a CSV file and then perform an operation on each line in the file. I do not know what the correct cmdlet is or what action I need to use. Can you point me in the right direction?- DF Hi DF, Point you in the right ...

Hey, Scripting Guy! How Can I Read Microsoft Excel Metadata?

Hey, Scripting Guy! I have a VBScript script that reads Microsoft Office Excel metadata. I would like to update the script to Windows PowerShell, but can I do this? I tried using New-Object to create the Excel.Application object but somehow it does not seem to work. What gives? I thought Windows PowerShell could do everything VBScript can do...

Hey, Scripting Guy! Australian Dispatch #3: Self-Contained Underwater Breathing Apparatus

Cold. My nose is cold. My left eye opens slowly to investigate. Everything is dark. Cold and dark. "So why am I awake," I wonder seemingly to myself. No answers are forthcoming. So my right eye slowly opens to bring a modicum of assistance to the ongoing investigation. Still no answers present themselves. Where am I? What country am I in? "...

Hey, Scripting Guy! How Can I Reuse Functions?

  Hey, Scripting Guy! I have a bunch of functions I wrote in PowerShell that I would like to use in other scripts. I am getting tired of cutting and pasting these things into various scripts over and over again. Surely there has got to be an easier way to do this! Have any ideas?- JB Hi JB, Of course, I have an idea…and don’t call ...

Feedback usabilla icon