Active Directory
A set of directory-based technologies included in Windows Server.
6,820 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
Is it possible to create powershell script of exporting users that have unlimited membership excluding groups like Domain users etc?
Right now I am using this script for temporary group assignment but since I started using this just recently I need export rest of users that have assigned groups for unlimited time
$variable = New-TimeSpan -Days 455
$users = "username" #More than 1 user "xxx","yyy"
$groups = "group_name"
Add-ADGroupMember -Identity $groups -Members $users -MemberTimeToLive $variable
Thanks in advance
Daniel