Scripting Blog

A place to learn about PowerShell and share stories of automation

How Can I Delete Data from a Spreadsheet Yet Keep All the Formatting?

Hey, Scripting Guy! How can I delete data from a spreadsheet yet keep all the formatting?-- TB Hey, TB. From your email it sounds like you have a script that periodically replaces data in a spreadsheet with new, up-to-date values. The spreadsheet has been preformatted, and what you’d like to do is delete all the old values - thus making ...

How Can I Determine Which Domain Controller Authenticated a User?

Hey, Scripting Guy! In my logon script how can I determine the name of the domain controller that authenticated the user?-- CK Hey, CK. You know, one of the unwritten rules for being a Scripting Guy is that you should never do anything hard more than once a week. (Why is this an unwritten rule? Mainly because we were all too lazy to write ...

How Can I Associate a Network Connection with an IP Address?

Hey, Scripting Guy! How can I determine the local area connection that’s associated with a particular IP address?-- SH Hey, SH. Believe it or not, this is a fairly complicated procedure, and for two reasons. To begin with, we have to use two separate WMI classes - Win32_NetworkAdapter and Win32_NetworkAdapterConfiguration - in order to ...

How Can I Change the Size of the Temporary Internet Files Folder?

Hey, Scripting Guy! How can I change the amount of disk space set aside for Internet Explorer’s temporary files folder?-- AD Hey, AD. The first draft of this column we were able to bang out in no time; after all, it consisted entirely of this: Beats us. But after discussing how valuable an answer like that would be to our customers, and ...

How Can I Determine the Number of Items Generated by the Split Function?

Hey, Scripting Guy! I know I can use the Split function to split a line into individual items. But how can I tell how many “splits” I ended up with; that is, how many individual items did I generate from a single line?-- SA Hey, SA. For those of you who are relative newcomers to scripting (or those of you who’ve never used the Split ...

Feedback usabilla icon