How Can I Configure an Active Directory Account So the Password Never Expires?

Hey, Scripting Guy! How can I configure an Active Directory user account so that the account password never expires?— BB Hey, BB. Before we start we have a question for you: wouldn’t you agree that Catch-22 is one of the four greatest novels ever written? We ask that because, in his English class, the Scripting… Read more

How Can I Use Information in an Excel Spreadsheet to Rename a Set of Folders?

Hey, Scripting Guy! How can I rename a bunch of folders using a script? The old folder names are in the first column of an Excel spreadsheet and the new folder names are in the second column of an Excel spreadsheet.— SF Hey, SF. Oh, and welcome to Hey, Scripting Guy!, your daily source for… Read more

How Can I Delete Duplicate Items From an Array?

Hey, Scripting Guy! How can I delete duplicate items from an array?— WR Hey, WR. You know, if Microsoft has a weakness – and we’re not saying that it does, we’re just saying if it does – it’s this: we never make mistakes. (What’s that? What about Windows ME? That’s a weird name; couldn’t possibly… Read more

How Can I Center-Align a Picture in a Word Document?

Hey, Scripting Guy! How can I center-align a picture in a Word document?— CD Hey, CD. In light of the controversy surrounding World Series game 2 (was Detroit Tigers pitcher Kenny Rogers throwing “goopballs” or wasn’t he?) the Scripting Guys felt it was important to note that no illegal substances were used in the writing… Read more

How Can I Repeatedly Prompt a User to Enter a File Name?

Hey, Scripting Guy! I have approximately 100 Excel files (all with names like 9365.xls) in a folder. I’d like to prompt a user for a file name, open the file, retrieve information from a specified cell, then close the file (ideally Excel would never appear on screen). I’d then like to prompt the user to… Read more

How Can I Connect to the Junk Mail Folder in Outlook?

Hey, Scripting Guy! Over the past year or so you’ve answered several questions in which you use a script to connect to the Inbox in Microsoft Outlook. But how can I connect to the Junk Mail folder in Outlook?— ME Hey, ME. Let’s see, what time is it? OK good: we have enough time to… Read more

How Can I Use Windows PowerShell to Delete All the .TMP Files on a Drive?

Hey, Scripting Guy! How can I use Windows PowerShell to locate and delete all the .tmp files on a drive?— OR Hey, OR. You know, there’s an old saying: Give a man a fish and he’ll eat for a day; teach that man to fish and he’ll eat for the rest of his life. Well,… Read more

How Can I Print a Microsoft Access Report?

  Hey, Scripting Guy! How can I print a Microsoft Access report?— RW Hey, RW. You know the cool thing about being a Scripting Guy – aside from the opportunity to pal around with Paris and Nicole – is the fact that people think we know what we’re doing. Someone asks a question like, “How… Read more

How Can I Tell Whether a Number is Even or Odd?

Hey, Scripting Guy! How can I tell whether a number is even or odd?— JO Hey, JO. You know, just this morning the Scripting Guy who writes this column was driving in to work when he heard an advertisement for a store that sells HD TVs. “We don’t confuse you by stocking all the different… Read more

How Can I Split a String Only on Specific Instances of a Character?

Hey, Scripting Guy! I have a series of string values that I need to convert to an array, splitting the value on the ampersand (&). However, if the ampersand is followed by amp (in other words, if the string is &amp) I don’t want to split the string at that point. How do I do… Read more