WSH Scripting
Using WSH with WMI enables you to query lots of information of a system. Here are some examples of code that I regularly use. Determine UpTime of a computer strComputer = InputBox("Enter...
View ArticleBatch-scripting
Batch-scripting is not as powerful as WSH-scripting or PowerShell. But with some tools you can perform some simple but useful actions. One tool I often use is robocopy. Asking for values in a...
View ArticleScript software deployment in PowerShell
This is an example in PowerShell of how you can schedule the installation a software package by Altiris DS. Instead of using the API, the command-line tool axsched is being called to schedule the...
View ArticleESXi 3.5 and Server 2003 dualboot
After some testing I managed to create a dualboot setup with ESXi 3.5 and Windows Server 2003. Install ESXi to harddisk 1 Install Windows Server 2003 to harddisk 2. Delete the existing partition on...
View ArticleOutlook VBA – remove reminders
I synchronize my Windows Mobile Device with my corporate-exchange account. This way my calendar stays nicely up to date and gives me reminders for the tasks I have to do. However I find it rather a...
View ArticlePS – Disable Unidentified network for VM nics
This script adds the *NdisDeviceType registry value with value 1 to the keys of the VMWare network cards. Afterwards it disables and enables the networkcards to let the changes take effect. $nics = gci...
View ArticleCentOS – Launching VMWare Workstation VMs at boot
I was searching for a solution to launch and suspend VMWare Workstation VMs on a CentOS 5-machine during boot/shutdown. A script script for launching VirtualBox VMS during boot inspired me to create...
View ArticleDomain Join using Powershell
Example of how to join a computer (Windows 8) to a domain using PowerShell. $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList @('ALTIRIS\srv_altiris',...
View ArticleBatch script to detect CD/DVD-rom drive
Batch script to detect CD/DVD-rom drive REM Check if we have a CDROM drive Setlocal EnableDelayedExpansion echo list vol > diskpart.txt diskpart /s diskpart.txt > dp_volumes.txt set hascdrom=0...
View ArticleDetermine SQL Version and Edition using Powershell and WMI
This small Powershell script prompts for a computername and tries to determine the installed version and edition of SQL using WMI. $comp = Read-Host "Enter Computername:" Get-WmiObject -ComputerName...
View Article
More Pages to Explore .....