Hi there !
I wan to implement a custom command that will remove a user from all disitribution groups :
Import-Module Adaxes
Get-AdmGroup -Filter { mail -like "*" } | Where { (Get-AdmGroupMember $_.SamAccountName -AdaxesService eumsqres10.eu.loi.net | foreach {$_.SamAccountName -eq "%sAMAccountName%" }) -eq $True } | foreach { Remove-AdmGroupMember $_.SamAccountName -Members "%mailNickname%"}
But it gives me an error : Cannot invoke this function because the current host does not implement it.
I can't see what i'm doing wrong...
Thanks
Stephen