Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

List computers mapped to a print queue

Posted on 2011-09-08
3
Medium Priority
?
286 Views
Last Modified: 2012-05-12
I need some help with writing a VB Script that can query the Active Directory to find out what computers are mapped to a specific print share. I know how to query the Active Directory to find what print share is mapped to a computer, or how to map a new print share to a computer in Active Directory, but I can't figure out or find any instruction on how to reverse the query.
For example: What computer, or computers, are mapped to \\servername\printshare01?

Things to consider:
- I am using Active Directory to map the print shares to the computers.
- When users login to the Domain, the login script will map the print share to the computer based on the information saved in Active Directory.

Any help will be much appreciated.

Gilberto
0
Comment
Question by:giloliveira
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 25

Expert Comment

by:Ron Malmstead
ID: 36510773
""When users login to the Domain, the login script will map the print share to the computer based on the information saved in Active Directory.""

Can you post the script?

I think the most logical way to do this would be to use the same code that maps the printer, to produce of a list of computers it is mapping for.
0
 

Accepted Solution

by:
giloliveira earned 0 total points
ID: 36538168
I was able to create a script with a different logic. This scrip checks for all the computer accounts in a specif OU, and query every account for the what print share account is mapped to. If the result matches with the print share I am looking for, it will log the computer account to a log file. At the end, I have a list of all computers mapped to the specif print share I am looking for.
0
 

Author Closing Comment

by:giloliveira
ID: 36558786
No other solution was presented to my question.
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Uncontrolled local administrators groups within any organization pose a huge security risk. Because these groups are locally managed it becomes difficult to audit and maintain them.
After seeing many questions for JRNL_WRAP_ERROR for replication failure, I thought it would be useful to write this article.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

721 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