Temporary group membership

Hi, can someone suggest me how to set temporary group membership in ARS Version 6.9, I have tried with below mentioned command but the time is set to starting of temporary group membership but I am looking for end time and also I want to set reason as well to add some text like ticket number to it, could you please let me know.


Add-qadgroupmember -identity "groupname" -member 'accountname' -control @{'scheduledoperation-settime'=(set-date to-date "09/08/2020")}}

  • Hi 

    I tried the below code in my lab, and worked as I'd expect:

    $GroupName = "GroupName"
    $Member = "Temp"
    $StartTime = (Get-Date -Year 2020 -Month 09 -Day 09 -Hour 16 -Minute 00 -Second 00).ToUniversalTime()
    $EndTime = (Get-Date -Year 2020 -Month 10 -Day 09 -Hour 09 -Minute 00 -Second 00).ToUniversalTime()
    # Add Member - Temporal add
    Add-qadgroupmember -identity $GroupName -member $Member -control @{'scheduledoperation-settime'=$StartTime} -Proxy
    # Remove Member - Temporal remove
    Remove-QADGroupMember -identity $GroupName -member $Member -control @{'scheduledoperation-settime'=$EndTime} -Proxy