I have previously written a script to query ad user information from the ad domain. However, the results cannot be obtained from the workgroup. The following script can query domain account information from workgroup.
Note: before running the
In PowerShell (PS) script or. NET Active Directory programming often requires checking for the presence of an ad object, but neither the PS ad module nor the current version of the framework has yet provided a direct method. Based on the experience
This article will share with you the operations on the ad account. This time, we will develop a simple tool to check for expired users.
First, create a new user entity class. The attribute is the user information we want to obtain.
Public class
When first joining the domain, the client makes general DNS and LDAP queries and gets a list of all the domain controllers In the domain, and it goes down the list, trying LDAP binds, and the first successful DC so it binds to-that is the F Irst DC
Create
Some time ago to write a program, but not perfect, can not determine whether there is the user, now complement the lookup function.Code deficiencies, hope feel free!The complete code is as follows:
' Program Purpose: Create Exchange 2000
First, Samba and NFS, FTP
Before you know about the Samba service, you need to know about the CIFS protocol (Common Internet File System), which was the first of a Microsoft deal. The CIFS protocol is the first to implement file sharing and print
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.