PoshCode Archive  Check-in [1e6d342fb3]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:This function is an attempt to duplicate the Quest Get-QADUser cmdlet without using any third party snap-ins. If you want to run it against a Global Catalog you simply need to replace LDAP: with GC: and you will want to comment out the lines that pull the password last set and last logon timestamp unless you happen to be replicating those to your GC.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:1e6d342fb3f8dd64acdb657cd96eacc91047c30e4a9c15ccb83ae7c535c483b4
User & Date: Jonathan Walz 2018-06-10 14:23:21
Context
2018-06-10
14:23
Ported TabExpansion from V2CTP2 to v1.0 and extended. check-in: c5e0eca22f user: foobar tags: trunk
14:23
This function is an attempt to duplicate the Quest Get-QADUser cmdlet without using any third party snap-ins. If you want to run it against a Global Catalog you simply need to replace LDAP: with GC: and you will want to comment out the lines that pull the password last set and last logon timestamp unless you happen to be replicating those to your GC. check-in: 1e6d342fb3 user: Jonathan Walz tags: trunk
14:23
This is a modification of the Get-ADMapObject (http://poshcode.org/706). This script uses the Show-NodeXLMap script (http://poshcode.org/733) to display the hierarchical relationship between Active Directory objects of the selected classes. Running this script with the -ShowADClass switch lists out the different classes or types of AD objects available. check-in: 2ac169d16c user: Steven Murawski http tags: trunk
Changes

Changes to Get-User.ps1.

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# title: Get-User
# description: This function is an attempt to duplicate the Quest Get-QADUser cmdlet without using any third party snap-ins. If you want to run it against a Global Catalog you simply need to replace LDAP: with GC: and you will want to comment out the lines that pull the password last set and last logon timestamp unless you happen to be replicating those to your GC.
# version: 0.1
# type: function
# author: Jonathan Walz
# license: CC0
# function: Get-User
# x-poshcode-id: 628
# x-archived: 2015-05-08T00:04:29
# x-published: 2009-10-06T01:53:00
#
#
function Get-User($user)
{
	# this function should be passed the CN of the user to be returned
	$dom = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain() 
	$root = [ADSI] "LDAP://$($dom.Name)"







|
|
<







3
4
5
6
7
8
9
10
11

12
13
14
15
16
17
18
# title: Get-User
# description: This function is an attempt to duplicate the Quest Get-QADUser cmdlet without using any third party snap-ins. If you want to run it against a Global Catalog you simply need to replace LDAP: with GC: and you will want to comment out the lines that pull the password last set and last logon timestamp unless you happen to be replicating those to your GC.
# version: 0.1
# type: function
# author: Jonathan Walz
# license: CC0
# function: Get-User
# x-poshcode-id: 735
# x-archived: 2009-04-29T17:57:59

#
#
function Get-User($user)
{
	# this function should be passed the CN of the user to be returned
	$dom = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain() 
	$root = [ADSI] "LDAP://$($dom.Name)"