Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

OLDCMP usage

Posted on 2008-09-29
5
Medium Priority
?
1,973 Views
Last Modified: 2008-10-06
I want to use OLDCMP to target a particular OU for some mainteanance tasks.
The only issue I have is that the OU in question has a space in the name and the search qualifier doesn't work.
Any hints on syntax to get this working ? Renaming the OU is not something we can do at this time.

Here is what I am running to start with:

oldcmp -report -b ou=namewith aspace in it, dc=dcname,dc=com -age 0

This works fine on other OU's without spaces. In the file this command generates it shows the following:

Search Base: namewith


0
Comment
Question by:Conchial
[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
  • 3
  • 2
5 Comments
 
LVL 19

Expert Comment

by:aissim
ID: 22607181
Should just need to put quotes around the path:

oldcmp -report -b "ou=namewith aspace in it,dc=dcname,dc=com" -age 0
0
 

Author Comment

by:Conchial
ID: 22627815
That does appear to work.
However , i need to modify what I asked.
The OU i want to taget is underneath another OU and oldcmp  is returning an error.


The actual line I am running is :

oldcmp -report -b "ou=level1ou, ou=namewith aspaceinit, dc=**, dc=***,dc=***,dc=com" -age 0

That returns

Processed at DCNAME.***.**.**.com
Default Naming Context: DC=***,DC=**,DC=***,DC=***

ldap_get_next_page_s: [DCNAME.***.**.**.com] Error 0x20 (32) - No Such Object

When i this command:

dsquery computer "ou=level1ou, ou=namewith aspaceinit, dc=**, dc=***,dc=***,dc=com"

That returns
dsquery failed:Directory object not found.

I'm sure it's a syntax issue but cannot figure it out



0
 

Author Comment

by:Conchial
ID: 22627909
dsquery computer "cn=level1ou, cn=namewith aspaceinit, dc=**, dc=***,dc=***,dc=com"

also fails with a Directory Object not found error.
0
 
LVL 19

Accepted Solution

by:
aissim earned 1500 total points
ID: 22628684
Yeah, looks like something's wrong with the path. Using dsquery I would start at the top-level domain and work backwards; that should tell us where it breaks...

dsquery computer dc=**,dc=***,dc=***,dc=com


Also - you say it doesn't work with CN either - I would find out for certain whether they're containers or OU's.
0
 

Author Comment

by:Conchial
ID: 22652260
Finally nailed it, thanks.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

So you have two Windows Servers and you have a directory/folder/files on one that you'd like to mirror to the other?  You don't really want to deal with DFS or a 3rd party solution like Doubletake. You can use Robocopy from the Windows Server 200…
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

636 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