How to list All Printers in SCCM 2007 operation manager

Hi,
I would like to get all the printers list from my domain. We have SCCM 2007 I have created the reports from Reporting option.by setting up the the below script.
SELECT * FROM v_GS_PRINTER_DEVICE SELECT A.Name0, A.UserName0, B.Name0, B.DriverName0, B.Location0, B.PortName0, B.ShareName0
FROM v_GS_COMPUTER_SYSTEM A, v_GS_PRINTER_DEVICE B
WHERE
A.ResourceID = B.ResourceID
AND B.Name0 != 'Microsoft Office Document Image Writer'
AND B.Name0 != 'Adobe PDF'
AND B.Name0 != 'Microsoft XPS Document Writer'
AND B.Name0 != 'PDF-XChange 3.0'
AND B.DriverName0 != 'Microsoft Shared Fax Driver'
AND B.DriverName0 != 'pdfFactory 2'
AND B.DriverName0 != 'CutePDF Writer'
ORDER BY A.Name0
It gives me below error.
Report Name:
All_Printers
Category:
Device Management
Comment:
Parameters:
All_Printers
<form action="report.asp" method="post" name="frmReport" style="margin-margin-bottom:0px;" tabindex="-1">
An error occurred when the report was run. The details are as follows:
Invalid column name 'Name0'.
Error Number:
-2147217900
Source:
Microsoft OLE DB Provider for SQL Server
Native Error:
207
</form>
Please let me know what is wrong with this. Pls correct  or provide step by step guide to work.
Pls help.

SELECT Distinct SYS.Netbios_Name0, PRINTER.Name0, PRINTER.DeviceID0, PRINTER.DriverName0, PRINTER.PortName0
FROM v_R_System SYS
JOIN v_GS_PRINTER_DEVICE PRINTER ON SYS.ResourceID = PRINTER.ResourceID
Where SYS.Netbios_Name0 LIKE @variable
ORDER BY SYS.Netbios_Name0, PRINTER.Name0
tried this script as well no luck ??????
What error did you get?
Did you extend your sms_def.mof?
Garth Jones | My blogs: Enhansoft and
Old Blog site | Twitter:
@GarthMJ

Similar Messages

  • How to list all properties in the default Toolkit

    I would like to know what kinds of properties are stored in the default Toolkit (Toolkit.getDefaultToolkit()). I don't know how to list all of them. Toolkit class has a method getProperty(String key, String defaultValue), but without knowing a list of valid keys, this method is useless.
    Any idea would be appreciated.

    Here is a little utility that I wrote to display all the UIDefaults that are returned from UIManager.getDefaults(). Perhaps this is what you are looking for?
    import javax.swing.*;
    import java.util.*;
    public class DefaultsTable extends JTable {
        public static void main(String args[]) {
            JTable t = new DefaultsTable();
        public DefaultsTable() {
            super();
            setModel(new MyTableModel());
            JFrame jf = new JFrame("UI Defaults");
            jf.addWindowListener(new WindowCloser());
            jf.getContentPane().add(new JScrollPane(this));
            jf.pack();
            jf.show();
        class MyTableModel extends javax.swing.table.AbstractTableModel {
            UIDefaults uid;
            Vector keys;
            public MyTableModel() {
                uid = UIManager.getDefaults();
                keys = new Vector();
                for (Enumeration e=uid.keys() ; e.hasMoreElements(); ) {
                    Object o = e.nextElement();
                    if (o instanceof String) {
                        keys.add(o);
                Collections.sort(keys);
            public int getRowCount() {
                return keys.size();
            public int getColumnCount() {
                return 2;
            public String getColumnName(int column) {
                if (column == 0) {
                    return "KEY";
                } else {
                    return "VALUE";
            public Object getValueAt(int row, int column) {
                Object key = keys.get(row);
                if (column == 0) {
                    return key;
                } else {
                    return uid.get(key);
        class WindowCloser extends java.awt.event.WindowAdapter {
            public void windowClosing(java.awt.event.WindowEvent we) {
                System.exit(0);
    }

  • How to list all the rows from the table VBAK

    Friends ,
    How to list all the rows from the table VBAK.select query and the output list is appreciated.

    Hi,
    IF you want to select all the rows for VBAK-
    Write-
    Data:itab type table of VBAK,
           wa like line of itab.
    SELECT * FROM VBAK into table itab.
    Itab is the internal table with type VBAK.
    Loop at itab into wa.
    Write: wa-field1,
    endloop.

  • How to list all files in a given directory?

    How to list all the files in a given directory?

    A possible recursive algorithm for printing all the files in a directory and its subdirectories is:
    Print the name of the directory
    for each file in the directory:
    if the file is a directory:
    Print its contents recursively
    else
    Print the name of the file.
    Directory "games"
    blackbox
    Directory "CardGames"
    cribbage
    euchre
    tetris
    The Solution
    This program lists the contents of a directory specified by
    the user. The contents of subdirectories are also listed,
    up to any level of nesting. Indentation is used to show
    the level of nesting.
    The user is asked to type in a directory name.
    If the name entered by the user is not a directory, a
    message is printed and the program ends.
    import java.io.*;
    public class RecursiveDirectoryList {
    public static void main(String[] args) {
    String directoryName; // Directory name entered by the user.
    File directory; // File object referring to the directory.
    TextIO.put("Enter a directory name: ");
    directoryName = TextIO.getln().trim();
    directory = new File(directoryName);
    if (directory.isDirectory() == false) {
    // Program needs a directory name. Print an error message.
    if (directory.exists() == false)
    TextIO.putln("There is no such directory!");
    else
    TextIO.putln("That file is not a directory.");
    else {
    // List the contents of directory, with no indentation
    // at the top level.
    listContents( directory, "" );
    } // end main()
    static void listContents(File dir, String indent) {
    // A recursive subroutine that lists the contents of
    // the directory dir, including the contents of its
    // subdirectories to any level of nesting. It is assumed
    // that dir is in fact a directory. The indent parameter
    // is a string of blanks that is prepended to each item in
    // the listing. It grows in length with each increase in
    // the level of directory nesting.
    String[] files; // List of names of files in the directory.
    TextIO.putln(indent + "Directory \"" + dir.getName() + "\":");
    indent += " "; // Increase the indentation for listing the contents.
    files = dir.list();
    for (int i = 0; i < files.length; i++) {
    // If the file is a directory, list its contents
    // recursively. Otherwise, just print its name.
    File f = new File(dir, files);
    if (f.isDirectory())
    listContents(f, indent);
    else
    TextIO.putln(indent + files[i]);
    } // end listContents()
    } // end class RecursiveDirectoryList
    Cheers,
    Kosh!

  • Urgent: How to list all alias for a server throw DNS query?

    Hi
    Is there anyone know how to list all alias for a server by asking the network DNS. Is that possible?
    It doesn't work with InetAddress it return a single result.
    Best regard

    InetAddress will not get you the aliases, but you can certainly find all the different IP addresses for a specific host name using the getAllByName() method.
    You won't be able to get the aliases since those IP addresses (assuming there are more than 1) will all be cached as mapping to the name you passed to the getAllByName() method and you can't clear the map cache until the JVM exits.
    So your best hope is to get a list of IP's and either exit your app and restart with a new mode, or save them to a file for another app to read.

  • Sunone Messaging Server 6.1--How to list all mail user's last login time

    hi,i want to know how to list all the mail user's last login time.
    There are more than 100000 mailbox accounts on our mail server,
    i want to know which account is not used for more than 2 or 3 years.
    thanks.

    http://wikis.sun.com/display/CommSuite/imsconnutil
    Somchai.

  • How manually remove a DP in SCCM 2007 ?

    Hello,
    we had a disaster and our old SCCM 2007 site server is dead.
    We already have a SCCM 2012 site server up and running and a old SCCM 2007 distribution point still up.
    we need to convert the old DP to a 2012 DP.
    How can i manually remove the DP from SCCM 2007 without an access to the console, site server, bd, etc...?
    On the DP, Can I just remove all the share and permission?
    thanks

    If you don't use the 2007 environment any more you can delete the old shares and folders.

  • How to list all available tables for user "karl"

    How can I list all available tables (=table names) for user "karl"?
    Nice to have would be if (after each table name in another column of each row) the number of data rows in this table can be listed similar to:
    TABLE NUM ROWS
    TESTA 12
    TESTB 3455
    ANOTHERTAB 234
    How can I do this?

    from Laurent Schneider
    http://laurentschneider.com/wordpress/2007/04/how-do-i-store-the-counts-of-all-tables.html
    SQL> select
      2    table_name,
      3    to_number(
      4      extractvalue(
      5        xmltype(
      6 dbms_xmlgen.getxml('select count(*) c from '||table_name))
      7        ,'/ROWSET/ROW/C')) count
      8  from user_tables;
    TABLE_NAME                      COUNT
    DEPT                                4
    EMP                                14
    BONUS                               0
    SALGRADE                            5

  • How to list all active local ports where a server/services is listening?

    How can I list all local ports where a local server or services is listening?
    The listing should contain the path and program name of the listening server/service.
    So I need something like:
    port=22 /lib/svc/method/sshd
    port=25 /bin/emailprgm
    port=1049 /ust/local/bin/myserver
    How can I do this?

    lsof (compile, sunfreeware.com, blaswave)
    it wont show full path i think (man lsof for more) however it gives pids/ports/exe name, so you could take that and script it or do something with the output.

  • How to list all the fonts in an FLA?

    Hello all,
    I want to find a way to list all the fonts in my FLA files. I want to see that the developers get the fonts they need before the problems crop up - wild idea, I know. Using the edit/font mapping option seems to only show fonts which are missing or have been re-mapped. How do I get the FLA to give me the name of every font it's holding?

    Not the answer you want, but the closest you're going to find:
    Open the Movie Explorer (Window/Movie Explorer). Select the "A" button at the top of the panel and deselect all others. This gives you a list of all text in the FLA, with the font listed at the end of each line.

  • How to convert all old (pre-Office 2007) documents in portal to new (Office Open XML, Office 2007+) formats?

    Good day.
    We have create a single SharePoint 2013 farm and manually copied in it all documents from old SharePoint 2007 server portal.
    The question is how to automate covertation from old document format to new office in all librarys?
    "Word Automation Services" able to convert only Word's documents, not Excel.
    The single method what I think, is to use bulk convert utility ofc.exe from Microsoft Office Migration Planning Manager with powershell's ability to get all items from all librarys from site collection.
    Can someone has faced with it and has a ready work example?

    Hi,
    According to your description, my understanding is that you want to convert all office file to the latest 2007 format.
    We found this tool called MS Office Migration Planning Manager:
    http://www.microsoft.com/downloads/details.aspx?FamilyID=13580cd7-a8bc-40ef-8281-dd2c325a5a81&DisplayLang=en#filelist
    After extracting it, going to the Tools folder and modified the ofc.ini file to specify which folder to scan and convert etc.
    Then running  the ofc.exe and except some files didn't convert successfully, others is ok.
    https://technet.microsoft.com/en-us/library/cc179019(v=office.14).aspx
    Besides, Here is a similar post, you can use as a reference:
    https://social.technet.microsoft.com/Forums/office/en-US/8c571ca4-8ef6-496e-950a-6a608d44a070/how-to-convert-all-office-file-to-the-latest-2007-format?forum=ITCG
    Best Regards,
    Lisa Chen
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to list all filename in excuteable jar file?

    Hi there,
    i've been googling around for hours, but found no good answer :(
    i want listing all file name in my excuteable jar file
    Firstly, i use
    File f = new File("/sounds");
    String[] filenames = f.list();
    and use these filenames to load some resouces from url
    //ex
    URL url = getClass().getResource("/sounds/"+filenames);
    No problem occurs when i run it normally
    but when I put it in excuteable jar file, NullPointerException appears
    i think it's because : "File f = new File("/sounds");" doesn't work in jar file (somehow, i don't know why too)
    is there any alternative way to listing all filename in this situation?
    thanks in advance

    There are jar handling classes in the standard library under java.util.jar. I think JarFile is the one you want.
    Hower it's not good practice to list jar contents in order to read resources. It's better to have some kind of resource file in the jar which lists your sounds or whatever. A simple text file with one file name per line suffices.

  • How to list all files and directories in another directory

    I need to be able to list all the directories and files in a directory. I need to write a servlet that allows me to create an html page that has a list of files in that directory and also list all the directories. That list of files will be put into an applet tag as a parameter for an applet that I have already written. I am assuming that reading directories/files recursively on a web server will be the same as reading directories/files on a local system, but I don't know how to do that either.

    Hi,
    Here is a method to rotate through a directory and put all the files into a Vector (files).
          * Iterates throught the files in the root file / directory that is passed
          * as a parameter. The files are loaded into a <code>Vector</code> for
          * processing later.
          * @param file the root directory or the file
          *         that you wish to have inspected.
         public void loadFiles(File file) {
              if (file.isDirectory()) {
                   File[] entry= file.listFiles();
                   for (int i= 0; i < entry.length; i++) {
                        if (entry.isFile()) {
                             //Add the file to the list
                             files.add(entry[i]);
                        } else {
                             if (entry[i].isDirectory()) {
                                  //Iterate over the entries again
                                  loadFiles(entry[i]);
              } else {
                   if (file.isFile()) {
                        //Add the file
                        files.add(file);
    See ya
    Michael

  • How to list all the episodes in a podcast?

    Hi!
    iTunes 7.5.0.20 on Windows XP.
    When subscribing to a podcast, I like to download all the old episodes. Easy enough to do most times (either use GET ALL option or individual GET per episode), but for some of the feeds I subscribe to iTunes doesn't list all the episodes available. Example: if the podcast has 100 episodes, iTunes will only list the last 80 or so. When I look at the same feed using another tool (Google Reader in my case), I see all 100 episodes there.
    What's happening here? How can I get ALL the episodes associated with a feed?
    I searched this forum (almost 300 answered questions) but if the information is there I missed it...
    Thanks!
    Fernando

    Sometimes the episodes are available from the producer directly. Go to the podcast website to check. Sometimes they are listed in an archive area. Sometimes this is a limitation on the producer because of the hosting they use. For popular podcasts it is done to reduce bandwidth. In all but two cases in the past I have been able to get the old episodes from producer. In one of the two cases they admitted the really old files were lost, in the other they said the old files were of such bad quality compared to new ones that they no longer wanted to distribute them.

  • How to list all USB AUDIO DEVICES using PowerShell on Windows 7

    Hi all, 
    I'm starting today on the powershell programming world, and my first task is list all USB Headsets plugged on my computer, I wanna get the name of this devices like is shown on Windows Volume Control.
    My headset is a ZOX  DH-60, every time that I change the USB port, the name changes, like Headset ZOX DH-60, then Headset 2 ZOX DH-60, how could I get this name using powershell ? 
    Thanks,
    Best Regards
    Leonardo Lima

    Hi, 
    Nope... see my command and return
    Get-WmiObject Win32_PnPEntity | ? {$_.Service -eq 'usbaudio'} | Select * | Format-List
    __GENUS : 2
    __CLASS : Win32_PnPEntity
    __SUPERCLASS : CIM_LogicalDevice
    __DYNASTY : CIM_ManagedSystemElement
    __RELPATH : Win32_PnPEntity.DeviceID="USB\\VID_0D8C&PID_000E&MI_00\\8&149B33FB&0&0000"
    __PROPERTY_COUNT : 24
    __DERIVATION : {CIM_LogicalDevice, CIM_LogicalElement, CIM_ManagedSystemElement}
    __SERVER : HOBBIT
    __NAMESPACE : root\cimv2
    __PATH : \\HOBBIT\root\cimv2:Win32_PnPEntity.DeviceID="USB\\VID_0D8C&PID_000E&MI_00\\8&149B33FB&0&0000"
    Availability :
    Caption : Generic USB Audio Device
    ClassGuid : {4d36e96c-e325-11ce-bfc1-08002be10318}
    CompatibleID : {USB\Class_01&SubClass_01&Prot_00, USB\Class_01&SubClass_01, USB\Class_01}
    ConfigManagerErrorCode : 0
    ConfigManagerUserConfig : False
    CreationClassName : Win32_PnPEntity
    Description : Dispositivo de áudio USB
    DeviceID : USB\VID_0D8C&PID_000E&MI_00\8&149B33FB&0&0000
    ErrorCleared :
    ErrorDescription :
    HardwareID : {USB\VID_0D8C&PID_000E&REV_0100&MI_00, USB\VID_0D8C&PID_000E&MI_00}
    InstallDate :
    LastErrorCode :
    Manufacturer : (Áudio USB genérico)
    Name : Generic USB Audio Device
    PNPDeviceID : USB\VID_0D8C&PID_000E&MI_00\8&149B33FB&0&0000
    PowerManagementCapabilities :
    PowerManagementSupported :
    Service : usbaudio
    Status : OK
    StatusInfo :
    SystemCreationClassName : Win32_ComputerSystem
    SystemName : HOBBIT
    Scope : System.Management.ManagementScope
    Path : \\HOBBIT\root\cimv2:Win32_PnPEntity.DeviceID="USB\\VID_0D8C&PID_000E&MI_00\\8&149B33FB&0&0000"
    Options : System.Management.ObjectGetOptions
    ClassPath : \\HOBBIT\root\cimv2:Win32_PnPEntity
    Properties : {Availability, Caption, ClassGuid, CompatibleID...}
    SystemProperties : {__GENUS, __CLASS, __SUPERCLASS, __DYNASTY...}
    Qualifiers : {dynamic, Locale, provider, UUID}
    Site :
    Container :
    __GENUS : 2
    __CLASS : Win32_PnPEntity
    __SUPERCLASS : CIM_LogicalDevice
    __DYNASTY : CIM_ManagedSystemElement
    __RELPATH : Win32_PnPEntity.DeviceID="USB\\VID_074D&PID_3556&MI_00\\8&285F78A6&0&0000"
    __PROPERTY_COUNT : 24
    __DERIVATION : {CIM_LogicalDevice, CIM_LogicalElement, CIM_ManagedSystemElement}
    __SERVER : HOBBIT
    __NAMESPACE : root\cimv2
    __PATH : \\HOBBIT\root\cimv2:Win32_PnPEntity.DeviceID="USB\\VID_074D&PID_3556&MI_00\\8&285F78A6&0&0000"
    Availability :
    Caption : ZOX DH-60
    ClassGuid : {4d36e96c-e325-11ce-bfc1-08002be10318}
    CompatibleID : {USB\Class_01&SubClass_01&Prot_00, USB\Class_01&SubClass_01, USB\Class_01}
    ConfigManagerErrorCode : 0
    ConfigManagerUserConfig : False
    CreationClassName : Win32_PnPEntity
    Description : Dispositivo de áudio USB
    DeviceID : USB\VID_074D&PID_3556&MI_00\8&285F78A6&0&0000
    ErrorCleared :
    ErrorDescription :
    HardwareID : {USB\VID_074D&PID_3556&REV_0006&MI_00, USB\VID_074D&PID_3556&MI_00}
    InstallDate :
    LastErrorCode :
    Manufacturer : (Áudio USB genérico)
    Name : ZOX DH-60
    PNPDeviceID : USB\VID_074D&PID_3556&MI_00\8&285F78A6&0&0000
    PowerManagementCapabilities :
    PowerManagementSupported :
    Service : usbaudio
    Status : OK
    StatusInfo :
    SystemCreationClassName : Win32_ComputerSystem
    SystemName : HOBBIT
    Scope : System.Management.ManagementScope
    Path : \\HOBBIT\root\cimv2:Win32_PnPEntity.DeviceID="USB\\VID_074D&PID_3556&MI_00\\8&285F78A6&0&0000"
    Options : System.Management.ObjectGetOptions
    ClassPath : \\HOBBIT\root\cimv2:Win32_PnPEntity
    Properties : {Availability, Caption, ClassGuid, CompatibleID...}
    SystemProperties : {__GENUS, __CLASS, __SUPERCLASS, __DYNASTY...}
    Qualifiers : {dynamic, Locale, provider, UUID}
    Site :
    Container :
    __GENUS : 2
    __CLASS : Win32_PnPEntity
    __SUPERCLASS : CIM_LogicalDevice
    __DYNASTY : CIM_ManagedSystemElement
    __RELPATH : Win32_PnPEntity.DeviceID="USB\\VID_074D&PID_3556&MI_00\\8&3B19294B&0&0000"
    __PROPERTY_COUNT : 24
    __DERIVATION : {CIM_LogicalDevice, CIM_LogicalElement, CIM_ManagedSystemElement}
    __SERVER : HOBBIT
    __NAMESPACE : root\cimv2
    __PATH : \\HOBBIT\root\cimv2:Win32_PnPEntity.DeviceID="USB\\VID_074D&PID_3556&MI_00\\8&3B19294B&0&0000"
    Availability :
    Caption : ZOX DH-60
    ClassGuid : {4d36e96c-e325-11ce-bfc1-08002be10318}
    CompatibleID : {USB\Class_01&SubClass_01&Prot_00, USB\Class_01&SubClass_01, USB\Class_01}
    ConfigManagerErrorCode : 0
    ConfigManagerUserConfig : False
    CreationClassName : Win32_PnPEntity
    Description : Dispositivo de áudio USB
    DeviceID : USB\VID_074D&PID_3556&MI_00\8&3B19294B&0&0000
    ErrorCleared :
    ErrorDescription :
    HardwareID : {USB\VID_074D&PID_3556&REV_0006&MI_00, USB\VID_074D&PID_3556&MI_00}
    InstallDate :
    LastErrorCode :
    Manufacturer : (Áudio USB genérico)
    Name : ZOX DH-60
    PNPDeviceID : USB\VID_074D&PID_3556&MI_00\8&3B19294B&0&0000
    PowerManagementCapabilities :
    PowerManagementSupported :
    Service : usbaudio
    Status : OK
    StatusInfo :
    SystemCreationClassName : Win32_ComputerSystem
    SystemName : HOBBIT
    Scope : System.Management.ManagementScope
    Path : \\HOBBIT\root\cimv2:Win32_PnPEntity.DeviceID="USB\\VID_074D&PID_3556&MI_00\\8&3B19294B&0&0000"
    Options : System.Management.ObjectGetOptions
    ClassPath : \\HOBBIT\root\cimv2:Win32_PnPEntity
    Properties : {Availability, Caption, ClassGuid, CompatibleID...}
    SystemProperties : {__GENUS, __CLASS, __SUPERCLASS, __DYNASTY...}
    Qualifiers : {dynamic, Locale, provider, UUID}
    Site :
    Container :

Maybe you are looking for

  • App Store: Account only valid in US iTunes Store (in US!)

    Odd problem. All my apps from the app store are crashing at startup. I didn't do anything other than connect to a new wi-fi hotspot. I tried shutting down the booting up again. No luck. Then I tried to delete an app and re-install to see if that help

  • Help with js slideshow

    Hey guys, Im putting in a slideshow to my site. Its js, nothing fancy. The code is be posted below. Im working on a pretty big site for my employer so before adding it to that one, i tried it on another older site and everything worked great. Then I

  • Re:Search help

    I created a search help for a field(Type of work), which is displayed in the selection screen of the program RIQMEL20 and which is a field in the table QMEL, the search help icon is displayed in the selection screen but it shows there is no values fo

  • Where did free on iTunes go?

    where did free on iTunes go?

  • Driver for Panasonic KX-P1124

    Hi Folks, I'm a little embarrassed in that I have been using Apple computers since the IIe was new and can't seem to resolve what should be a simple problem. I have a Panasonic KX-P1124i printer that I have been using for many years on a Power Mac 61