Scripting Blog

A place to learn about PowerShell and share stories of automation

How Can I Add or Subtract Two Hexadecimal Numbers?

Hey, Scripting Guy! How can I add or subtract two hexadecimal numbers?-- PS Hey, PS. You know, according to the old saying there are two things you should never watch being made: laws and sausages. We’d like to add a third item to that list: Hey, Scripting Guy! columns. We knew you’d say that. But remember, you’re seeing the finished ...

How Can I Generate Random Numbers Using a Script?

Hey, Scripting Guy! Our auditors have suggested that we randomly pick projects to examine and ensure that each project was completed and signed off per company policy. Because these projects are numbered sequentially I thought maybe we could write a script that would randomly select the project numbers for us to audit. Can you help us with ...

How Can I Exit a For Each Loop?

Hey, Scripting Guy! Is there any way to exit a loop in a script?-- MW Hey, MW. You know, when we started writing this column we intended it to be a simple little thing that answered those basic questions so many beginning scripters have: • How can I determine the current date in a script? (Use VBScript’s Date function.) • How ...

Feedback usabilla icon