[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1103
  • Last Modified:

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

I want to collect network printer information for each client in my organisation.  I downloaded the DataShift-Printer.zip from 'http://www.smsexpert.com/MOF/Scripts.aspx' 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?
1 Solution
Adam LeinssCommented:
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.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now