VBScript – Passing Named Arguments

I am always forgetting this so I have posted it so I can refer back to this when needed.  Sometimes via a command line you want to be able to pass command line parameters to a vbscript. e.g.

cscript.exe myscript.vbs /Parameter:value

The vbscript to handle this is as follow:

Option Explicit
Dim colNamedArguments

Set colNamedArguments = Wscript.Arguments.Named
If colNamedArguments.Exists("Parameter") Then
    Wscript.echo "Parameter Exists!"
    Wscript.echo "Parameter = " & _
         colNamedArguments.Item("Parameter")
End If

For more information see the following microsoft article :  http://technet.microsoft.com/en-us/library/ee156618.aspx

 

Windows XP (x64) & Lenovo S30 Workstation SATA & SAS Drivers Via RIS

I have the challenge of trying to get Windows XP (x64) work on some of the most recent hardware.  SATA and the newer SAS Drivers are quite a challenge on these devices, as was proving the case when I was trying to get them to work on the Lenovo S30.  During Remote Installation Services (RIS) kept reporting “corrupted driver messages” when trying to put the two sets of drivers Continue reading

SCCM OSD ‘No Boot Action for Device (x) found

I was receiving the above message ‘No Boot Action for Device(32123) found.’  on the PXE service point server, in smspxe.log.

The number (32123) is the resource ID of the computer object found at that SCCM site.  The device was in a collection which had an advertisement pointing to a OSD Task sequence with a valid boot image.  I realised that the message is a little misleading.  I deal with a number of boot images and this particular boot image specified in this advertised Operating System Task Sequence was not on the SMSPXE$ share (i.e. not on the distribution point). 

So things to look out for :

  • Make sure that the OSD task sequence boot images are on the distribution point
  • That the task sequence you are using have a valid boot image, easy to decommision a boot image without updating your OSD task sequence 

Installing an Solid State Hard Drive without re-installing on Windows 7 Using Image For Windows

I was very lucky to receive a Solid State Drive (SSD), a splendid present from a group of friends to mark a milestone Birthday.  It was an OCZ Agility III 240GB drive, which I wanted to install inside my main machine as the system drive, however I was not so keen at the prospect of having re-install my Windows 7 Operating System. Continue reading

OpenVPN server.key file not in RSA format for pfSense v1.2.3a

Quote

Recently I was trying to set up an OpenVPN server on pfSense using an Ubuntu 11.10.  Following the guides http://doc.pfsense.org/index.php/VPN_Capability_OpenVPN I found I ran into a problem when generating the “server.key” file using the easy-rsa toolset that comes with OpenVPN.  It was producing a server.key file with the following headers and footers :

-----BEGIN PRIVATE KEY-----
-----END PRIVATE KEY-----

pfSense v.1.2.3a OpenVPN server.key setup was expecting it to read as follows :

-----BEGIN RSA PRIVATE KEY-----
-----END RSA PRIVATE KEY-----

This —-BEGIN PRIVATE KEY—- results in a error message in pfSense when it tries to use save the settings, and before you maybe tempted to try, you cannot simply rename the header and footer by adding “RSA” as this results in invalid key errors when the vpn is initiated, these are found in the pfSense error logs.

It seems it is something to do with the version of OpenSSL I was running on the rig.  On my older 10.04 Ubuntu installation I had OpenSSL 0.98a on my newer 11.10 rig I have OpenSSL 1.0.0e 6 Sep 2011.  Creating the server.key on 0.98a by default created the RSA PRIVATE KEY, creating the server.key on 1.0.0e did not create a RSA Private Key, but an encrypted PRIVATE KEY.

Running the following :

openssl rsa -in server.key -out decryptedserver.key

generated the RSA decrypted server.key file that can simply be cut and pasted into the pfSense v1.2.3a OpenVPN server configuration page.  Solved!