Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6536219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:27:58+00:00 2026-05-25T10:27:58+00:00

how I should proceed to get all active PSOs on a specific domain. I

  • 0

how I should proceed to get all active PSOs on a specific domain.

I know that this domain contains the following PSOs:

CN=PSO-Standard
CN=PSO-Sensitive

But I must create a report to display them so I must load them in dynamic way.

I guess there is a kind of filter to get the PSO container and then loop through its recordset.

e.g.

.filter = "(CN=Password Settings Container)"

.attributes = "msDS-PasswordSettingsContainer"

thx in advance.

using classic asp with vbscript

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:27:58+00:00Added an answer on May 25, 2026 at 10:27 am

    The filter you are looking for is : “(objectClass=msDS-PasswordSettings)”

    Here is a sample Vbscript to test :

    '==========================================================================
    '
    ' NAME: SearchPSO.vbs
    '
    ' AUTHOR: JPB , Silogix
    ' DATE  : 29/06/2011
    '
    ' COMMENT: 
    '
    '==========================================================================
    Option Explicit
    Dim machine
    Dim oRootDSE ' Root Directory Service Specific Entry
    Dim DomainContainer ' The Roor of the Domain
    Dim conn ' ADODB connexion
    Dim ldapBase ' Base DN of the search
    Dim ldapFilter ' Search filter
    Dim ldapAttributes ' Attributs to get
    Dim ldapScope ' Search scope
    Dim ldapStr ' String to execute
    Dim rs ' Search result
    Dim f '
    Dim oADSI ' ADSI access
    
    
    ' ADODB cooking
    machine = "WM2008R2ENT"
    Set oRootDSE = GetObject("LDAP://"&machine&"/"&"RootDSE")
    DomainContainer = oRootDSE.Get("defaultNamingContext")
    
    Set conn = CreateObject("ADODB.Connection")
    conn.Provider = "ADSDSOObject"
    conn.Properties("User ID") = "jpb"
    conn.Properties("Password") = "test.2011"
    conn.Properties("Encrypt Password") = True
    
    conn.Open "ADs Provider"
    
    ' Building the request to exécute
    ldapBase = "<LDAP://" & machine &"/"& DomainContainer & ">" 
    ldapFilter = "(objectClass=msDS-PasswordSettings)"
    ldapAttributes = "cn,msDS-LockoutDuration,msDS-MaximumPasswordAge"
    ldapScope = "subtree"
    ldapStr = ldapBase&";"&ldapFilter&";"&ldapAttributes&";"&ldapScope
    
    ' Search request execution
    Set rs = conn.Execute(ldapStr)
    
    ' Restitution du résultat
    While Not rs.EOF
      'For each f in rs.Fields
      '  WScript.Echo f.Name & ":" & f.Value
      'Next
      WScript.Echo rs.Fields("cn").Value
      rs.MoveNext
    Wend
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Why does Convert.ToBoolean(1) throw a System.FormatException ? How should I proceed with this conversion?
First of all, this is the first time that I use Hibernate so my
All we get when publishing our ASP.Net MVC 3 app is this: You may
Hello to all in this lovely community, I am trying to get the contents
I was wondering how should I proceed to debug while working with frameworks. Like
Should you set all the objects to null ( Nothing in VB.NET) once you
Hello to all that read I am self learning C++ from a text book.
I'm writing a software that can help me calibrate and stack images - this
The question says it all: how to get a remotely hosted image into a
Given the following code public interface Foo<T> { T get(); } @Remote public interface

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.