You are here

VBS Script: Migrate granularly users from one printer server to another

The below script is an example of how you can migrate users from one printer server to another based on the printer model or name.

Sometimes doing a big bang migratiion from an old print server to a new one is not the best idea so this script allows you to provide a list of printer models to migrate rather than doing them all at once. When I use this script I call it from a logn script and add a model or two a day until the migration is complete.

VBS Script to list the network printers a user is connected to

The below little VBS script is an example of how to pull back a list of network printers a users is connected to.

This script is only pulling back the server and share names but you could retrieve other properties in the same way

http://msdn.microsoft.com/en-us/library/aa394363%28v=vs.85%29.aspx

VBS Script to report the properties of all files in a folder and its sub folders

I recently had a need to list the  properties of all files in a folder and its sub folders to find files that had not been used in a long time, or files where the owner had left. In my case I needed to run a report on approx 250,000 files which this script managed.

The script will get the following properties;

VBS Script to export properties of all groups in IBM Lotus Domino using LDAP

The attached script will extract the common name and email address of every group stored within a domino directory to a csv file.

You will need to change dominoserver within the select statement to the name of your server, you may also need to fill in the User ID and Password fields if you servers does not allow anonymous access.

You domino server will also need to accessible via LDAP

VBS Script to get the location of the current script

Here is just a quick example of how to get the location of the currently running script.

 

 

currentScriptPath = Replace(WScript.ScriptFullName, WScript.ScriptName, "")

strLogFile = currentScriptPath & "log.txt"

wscript.echo strLogFile

VBS Script to perform an action after a computer either starts or stops pinging

The below script can be used to monitor when a computer either starts or stops pinging and then run an action.

 

Usage:

Call the function WaitForPing(SuccessOrFailure, "Name or IP", TIMEOUT_PING_SUCCESS)

Set SuccessOrFailure to TRUE to wait for the computer to start pinging

Set SuccessOrFailure to FALSE to wait for the computer to stop pinging

VBS Script to export the file properties of all files in a folder and its sub folders

The below scripts allows you to select a folder and generate a CSV report detailing the below file properties of all of the file in that folder and the folders sub folders.

 

  • Path
  • Name
  • Size
  • File Type
  • Date Created
  • Date Last Access
  • Date Last Modified

How to use:

1) Download the attached script or copy and save the below as something like report_file_properties.vbs

2) Run the script

VBS Script to delete all file over a certain age in a folder and its sub folders

The below script will delete all file in a folder over a certain ago and repeat the task for the folders sub folders

Change the varibles startFolder and OlderThanDate as needed.

 

VBS Script to Install a Font

The below script will install a Font, you will need to change the string "path_to_font\font_file_name.ttf" to the location and file name of the font

  

VBS Script to disable Adobe Shockwave Auto Apdate

The below script will disable the auto update feature of Adobe Shockwave, I have tested this script on version 11.5 but it should also work on other versions.

 

Pages