Home » Scripting »

VBScript: Find iTunes product codes automatically (or any other product, by using product name)

Script for getting product code from product name. Very usable for deployment of software via configuration manager or similar systems.

Category: Configuration Manager, Scripting, VBScript  |  8 Comments

WMI/ConfigMgr Scripting: CreateEmbeddedObjectInstance (.NET) or SpawnInstance (VBScript) in PowerShell

  During the development of the script I posted yesterday, I noticed that a lot of people had problem discovering how to create WMI objects in PowerShell. I found different suggestions, but they all had problems. When I have to create WMI object instances I use this this method, which I used in my old […]

Category: Configuration Manager, Powershell, Scripting  |  Comment

PowerShell: ConfigMgr 2007 – Create Maintenance Window

How do create service windows in configuration manager by using PowerShell.

Category: Configuration Manager, Powershell, Scripting  |  6 Comments

PowerShell: How to create an empty array!

Note about array in powershell. How to create empty arrays and a little trick for adding to arrays.

Category: Powershell, Scripting  |  7 Comments

System Center Orchestrator 2012 Beta: Using Run .Net Script Activity – PowerShell: Inputting and Returning Data

This article describes how to use the Run .Net Activity to run PowerShell Scripts. I have created an example runbook which does the following: Start once every minute. Read a text file containing a list of sites/servers. Parse the list to PowerShell script. PowerShell script tried to ping each address and get the response time. […]

Category: Orchestrator / Opalis, Powershell, Scripting, System Center Orchestrator 2012, System Center Orchestrator 2012 Beta  |  1 Comment

VBScript: Receiving new advertisement info from ConfigMgr 2007 via WMI Events.

Run code when a new advertisement is created.
This post contains a vbscript using async operations to catch the new advertisement, when it is created.

Category: Configuration Manager, Scripting, VBScript  |  11 Comments

PowerShell: Creating new users from CSV with password and enabled accounts or How to Pipe into multiple cmdlets

How to create users from a CSV file, set their password and enable them in one command.
This method shows you how to pipe the same output into multiple cmdlets by using the ForEach-Object Cmdlet.

Category: Powershell, Scripting  |  12 Comments

Adding users to Configuration Manager 2007 with specific Class Permissions via VBScript

The Configuration Manager 2007 SDK, has a lot of missing examples and parts that are not well documented. One of them is the part about User permissions and how to add them. During the development of the install script for our HTA solution, I had to create a HTA user, with special permissions for the […]

Category: Configuration Manager, Scripting, VBScript  |  Comment

VBScript: Cleanup all computer objects for local PC

When we are deploying OS via ConfigMgr, we usually do a cleanup of all old objects before creating the new object. This helps prevent errors and mistakes, and is pretty easy to do. We are able to use both SMBOIS GUID and Mac addresses for the cleanup. usually I recommend using mac addresses, since I […]

Category: Configuration Manager, OS Deployment, Scripting, VBScript  |  2 Comments

Exchange and Activesync: Limiting the mailbox to sync with only one device

Just came back from a customer which needed to limit the number of mobile device to one per mailbox. For this implementation the customer used all kind of smart phones, so the challange was also to find the unique Device ID from the Smartphone and add it to a Active Directory Attribute called: msExchMobileAllowedDeviceIDs. I […]

Category: Exchange, Powershell  |  Comment