Home » Archive by Category

Articles in the Scripts Category

How to script any Windows application
Monday, 10 Jan, 2011 – 12:36 | No Comment

Many larger applications having scripting capabilities built in to allow you to automate repetitive tasks but what do you do if you need to script a repetitive task for an application that doesn’t have a …

Get-IADCurrentForest–Powershell Script
Monday, 22 Nov, 2010 – 13:46 | No Comment

===================================================================== Title       : Get-IADCurrentForest Description : Retrieve current forest information like Domains, Sites, ForestMode, RootDomain, and Forest masters. Output      : System.DirectoryServices.ActiveDirectory.Forest …

GetADCurrentDomain Powershell Script
Monday, 22 Nov, 2010 – 13:43 | No Comment

Script Title   :  GetADCurrentDomain
Description :    Retrieve current domain information
like Domain Controllers, DomainMode, Domain Masters, and Forest Root.
Output      : System.DirectoryServices.ActiveDirectory.Domain
Usage       :
1. Retrieve domain FSMO roles holders
GetADCurrentDomain | Select-Object *owner
2. Retrieve domain controllers for the current domain
GetADCurrentDomain …

GetADComputer -Powershell Script
Monday, 22 Nov, 2010 – 13:34 | No Comment

Script to retrieve all computer objects in a domain or container
Usage       :
1. Get all domain enabled computers which name starts with WRK
GetADComputer -Name WRK* -Enabled
2. Get all disabled computers from the Computers …

Ping Rage of IP – Perl Script
Friday, 12 Nov, 2010 – 8:42 | No Comment

Used to ping a given range of IP addresses. This tool used with /report
can help to determine the validity of an excluded range in a DHCP scope.
Used to ping a given range of IP addresses. …

Audit Share Perl Script
Friday, 12 Nov, 2010 – 7:41 | No Comment

Used to audit usage of a network share on a remote server.
Usage: $script /[m]achine <hostname> /[s]hare <share name> /[d]uration <number of hours>
/[i]nterval <number of minutes> /[l]og <file name> /single /domain <domain name>
/[v]erbose
/machine    Hostname of …

Using the ASP.NET Membership Provider and Authentication Service from Windows Phone 7
Thursday, 7 Oct, 2010 – 13:27 | No Comment

Those of you who have been building ASP.NET applications for a while now are no doubt familiar with the provider model, which includes provider abstractions for membership (authentication), roles (authorization), profiles (user data), and session state. These providers make it incredibly easy to provide a secure framework for your application. In fact, with an ASP.NET application template right out of the box, you can have a fully functioning authenticated, secure website in minutes.

Export Data From MS Access Database, Automatic, No Mouse Clicks!
Saturday, 25 Sep, 2010 – 14:18 | No Comment

MS Windows products and the MS Access Database in particular are some of the most annoying and horrible applications that stalk the Earth. The documentation is fractured, not whole system oriented and mouse centrically lame, there seems to be no way to do anything without being there in person and “clicking” away on the damn mouse. Gah. Well, after reading lots of docs and thrashing around for a while I figured out the Secret Commands ™ and Arcane Mumbojumbo ™ to do it.

Scripts to Extract Rows and Columns from Many Excel Files
Saturday, 25 Sep, 2010 – 14:15 | No Comment

I had to aggregate rows and columns from about 100 MS Excel spreadsheet files from different sheets in the spreadsheets, they were reports filed by a hundred different offices, all the same format. Each extract was in a tab delimited format to throw into another spreadsheet. The first script combines all the rows in many Excel files into one file. The second script combines all the columns in many Excel files into one file. Why is this a common problem? Well MSExcel is a cheap and common report and analysis tool, everyone knows Excel and therefore everyone uses it. It is a common solution to have a bunch of people fill out a spread sheet, it is common to need to combine the spreadsheets into one file to analyze them.

How to View your SSRS Reports Using PowerShell and ReportViewer
Saturday, 11 Sep, 2010 – 17:24 | No Comment

To view your SQL Server (or SSRS) reports using PowerShell, you can either use

plain browser + URL string combo
Report Viewer
Web Services

The script below shows the first two options.
If you are going to go with Report …