How do I deploy and run Datashift-Printer.vbs on all clients using SMS 2003?

Posted on 2008-11-13
Last Modified: 2013-11-21
I want to collect network printer information for each client in my organisation.  I downloaded the from '' and extracted the file renaming it to 'DataShift-Printer.vbs'.  I created a package in SMS 2003 with DataShift-Printer.vbs as the source file and created a program with the command line 'cscript.exe DataShift-Printer.vbs'.

I amended the sms_def.mof on the server by adding the following:

#pragma namespace("\\\\.\\root\\cimv2\\sms")
[SMS_Report(TRUE), SMS_Group_Name("SMX Printers"),
class SMX_Printer : SMS_Class_Template
[SMS_Report(TRUE)] string Comment;
[SMS_Report(TRUE)] boolean Default;
[SMS_Report(TRUE)] string DeviceID;
[SMS_Report(TRUE)] string DriverName;
[SMS_Report(TRUE)] boolean Local;
[SMS_Report(TRUE)] string Location;
[SMS_Report(TRUE), key] string Name;
[SMS_Report(TRUE)] boolean Network;
[SMS_Report(TRUE)] string PortName;
[SMS_Report(TRUE)] uint32 PrinterState;
[SMS_Report(TRUE)] string ServerName;
[SMS_Report(TRUE)] boolean Shared;
[SMS_Report(TRUE)] string ShareName;

I advertised the program to a test client and forced a hardware inventory.  SMX Printers is now displayed in Resource Explorer for that client but it only lists local printers.

I ran the vbs locally on the client and forced another hardware inventory.  The list of SMX Printers in Resource Explorer for that client now displays local AND network printers.

Why will the script work locally but not when deployed using SMS?  Am I doing something wrong?
Question by:devlinb
    1 Comment
    LVL 22

    Accepted Solution

    Under what account are you running the script in package: administrator or the user?  If you use administrator, it uses the computers local SYSTEM account which does not have access to Active Directory.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    This is my 3rd article on SCCM in recent weeks, the 1st ( dealing with installat…
    Know what services you can and cannot, should and should not combine on your server.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now