Hello,
I'm trying to perform a search using [adsi] in powershell that will look at the CN from a CSV file and output the path(LDAP://CN=useraccount.example.com,CN=Users,OU=Location1,OU=Entry1,DC=example,DC=com ) for the users and then use the path to perform a deleteobject.
The current situation is that there are service connection points for users that have been removed in AD ,but the SCP still exists and doesn't get removed. I'm working on a process to clean the SCP's up. But the only thing I can grab is the CN for the user .
I can already assign the properties of a single ad user object to a variable using $Variable = [adsi] "LDAP://CN=useraccount.example.com,CN=Users,OU=Location1,OU=Entry1,DC=example,DC=com"
I then can call each property as an example I use $Variable.cn,$Variable.path.
I'm trying to gather the...