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…
Year: 2008
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…
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…
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?…
Hey, Scripting Guy! How Can I Enable or Disable My Network Adapter?
Hey, Scripting Guy! At my office I access the corporate network by using a wired ethernet connection. However, when I come home, I have a wireless connection. Since our security guys do not allow us to have multiple network connections active at the same time, I am constantly enabling the wireless connection when I…
Hey, Scripting Guy! Australian Dispatch #2: A Metric Ton of Scripting
After nearly 20 hours in airports and planes, the giant Boeing 747 aircraft touched down on the runway at Sydney International airport-my scripting eyes were glued to the insides of my eye lids. It is rather evil the way they give you a test to see if you are qualified to enter the country…not Australia,…
Hey, Scripting Guy! Australian Dispatch #1: How Does a Scripting Guy Pack for a Trip?
Three o’clock in the morning is early for anyone, even a scripting guy. Yet there was this persistent annoying ringing sound that kept trying to interrupt my short-lived sleep. At last I was able to put a name to the intrusion. Alarm clock. It is time to get up. Today I begin the process of…
Hey, Scripting Guy! How Can I Write to Excel Without Using Excel?
Hey, Scripting Guy! I need to be able to write information to an Excel file. I do not want to install Microsoft Office Excel on my server, but the spreadsheet format is a nice way to store information. I can then give it to my pointy-headed boss, and he can create pivot tables, charts, or…
Hey, Scripting Guy! How Can I Read from Excel Without Using Excel?
Hey, Scripting Guy! I have an Microsoft Office Excel spreadsheet with server names in it, and I would like to be able to use this in a Windows PowerShell script. The thing is, I do not have Microsoft Office or Excel installed on the server. How can I use this spread sheet without installing Office…
Hey, Scripting Guy! How Do I Find Information About the Network Adapter Cards on My Computer?
Hey, Scripting Guy! When I use WMI to query for network cards on my laptop, it comes back with 32 network cards. 32! I am not lying. My laptop does not even have 32 slots, so how does it have 32 network cards in it? How can I find information about the “real” network cards…