VBScript: how to manage SSL certificates
Yesterday at work I needed to write a script to check if an SSL certificate was present in the user’s store and – if not – to automatically import it…
Yesterday at work I needed to write a script to check if an SSL certificate was present in the user’s store and – if not – to automatically import it…
Today I needed to change – using a script – a type A entry in my DNS. Using WMI, you can get MicrosoftDNS_AType class that represents an A record saved in a Microsoft DNS server. The class has a Modify method you can use to change TTL value and IP address of that record. First, you have to get…
Today I needed to track the number of active sessions of a given virtual desktop pool in my VMWare View infrastructure. VMWare offers some cmdlets to Powershell integration; you can find them on the server where the Connection Server is installed: You can include those cmdlets in your scripts with the command: add-PSSnapin "VMware.View.Broker"add-PSSnapin "VMware.View.Broker" To get remote sessions, use Get-RemoteSession cmdlet,…
Working with a Windows cluster, I needed a way to run scheduled tasks only on the cluster node that is owner of a given cluster group. In Windows 2003 it was possible to configure Task Scheduler as a cluster resource; I wasn’t able to find a way to do the same in Windows 2008. I created a simple PowerShell script that checks…
Today I was asked for a script to count the number of active ICA sessions on a XenApp server: the needing was to check if all the servers in our Citrix farm were online and balanced.
I wrote the following snippet when a friend asked me some help: he needed to execute a command several times, getting its parameters from a CSV (comma-separated values) file. the parameters.csv file contains the following informations: IP address username password Here’s the script: $file = Get-Content "C:\parameters.csv" foreach($row in $file) { $parameters = $row.Split(","); $ipaddress = $parameters[0]; $username…