Set-user username -IncludeInDirectory $False ?

12 views
Skip to first unread message

mla...@warren-wilson.edu

unread,
Oct 12, 2018, 3:34:11 PM10/12/18
to gshell-discuss
I want to hide an object (in this case a user) from the directory. It seems that it would be ideal to be able to set IncludeInDirectory to False.

I've looked at the UserObject that get-user returns, and it's not a member in there that I can see.

How can I hide an object from the directory?

Much appreciated for this wonderful resource!

Mars

mla...@warren-wilson.edu

unread,
Oct 12, 2018, 3:38:13 PM10/12/18
to gshell-discuss

I found it.

It's in the user object after all. Must have looked at it a hundred times!

IncludeInGlobalAddressList : True

Anyway... Here's how you change it:

$U = (Get-GAUser $UserName).UserObject
$U.IncludeInGlobalAddressList = $False
Set-Gauser -UserKey $UserName -UserBody $U

Reply all
Reply to author
Forward
0 new messages