0
I am trying to find a way to disable RDP access in a bulk without having to click on AD and cancel their RDP access.
Afonso Alves
Posted 2019-09-16T18:09:28.640
Reputation: 1
Question was closed 2019-09-17T00:57:43.987
That powershell didn't work for me. However I found another powershell scripting that worked:
$LDAPUrl = "LDAP://" + (Get-AdUser -Identity "aal**").DistinguishedName $DenyRemotePermission = [ADSI] $LDAPUrl $DenyRemotePermission.psbase.invokeSet("allowLogon",1) $DenyRemotePermission.setinfo() – Afonso Alves – 2019-09-16T20:01:06.803
$LDAPUrl = "LDAP://" + (Get-AdUser -Identity "aa").DistinguishedName $DenyRemotePermission = [ADSI] $LDAPUrl $DenyRemotePermission.psbase.invokeSet("allowLogon",1) $DenyRemotePermission.setinfo() – Afonso Alves – 2019-09-16T20:01:57.167
$LDAPUrl = "LDAP://" + (Get-AdUser -Identity "aa").DistinguishedName $DenyRemotePermission = [ADSI] $LDAPUrl $DenyRemotePermission.psbase.invokeSet("allowLogon",1) $DenyRemotePermission.setinfo()
Better post an answer on the the above link. – harrymc – 2019-09-16T20:02:49.367
Asked: 2019-09-16T18:09:28.640
Viewed: 26 times
Active: 2019-09-16T18:23:22.723
That powershell didn't work for me. However I found another powershell scripting that worked:
$LDAPUrl = "LDAP://" + (Get-AdUser -Identity "aal**").DistinguishedName $DenyRemotePermission = [ADSI] $LDAPUrl $DenyRemotePermission.psbase.invokeSet("allowLogon",1) $DenyRemotePermission.setinfo() – Afonso Alves – 2019-09-16T20:01:06.803
$LDAPUrl = "LDAP://" + (Get-AdUser -Identity "aa").DistinguishedName $DenyRemotePermission = [ADSI] $LDAPUrl $DenyRemotePermission.psbase.invokeSet("allowLogon",1) $DenyRemotePermission.setinfo()
– Afonso Alves – 2019-09-16T20:01:57.167Better post an answer on the the above link. – harrymc – 2019-09-16T20:02:49.367