active-directory

How to clone a UserPrincipal object in VB.NET

泪湿孤枕 提交于 2020-08-10 18:54:53
问题 I'm trying to create a new User in Active Directory from a VB.NET application. Most fields will be identical to an already existing "template" user, except things like Name, SurName, Email, SamAccountName, etc. So I want to copy or clone this template User, assign the few fields with a new/different value and then save this new user in Active Directory. I'd like to avoid having to manually assign who-knows how many properties from my template to the new User and maybe forget something along

Active directory - exception has been thrown by the target of an invocation

冷暖自知 提交于 2020-08-07 06:13:04
问题 I have a web application in a separate server than Active Directory and I want to change a user password. The code is the next: string newPassword = Membership.GeneratePassword(int.Parse(WebConfigurationManager.AppSettings["passLenght"]), int.Parse(WebConfigurationManager.AppSettings["passNonAlpha"])); DirectoryEntry de = new DirectoryEntry(WebConfigurationManager.ConnectionStrings["ADConnString"].ConnectionString, WebConfigurationManager.AppSettings["ADAdmin"], WebConfigurationManager

How to validate server SSL certificate for LDAP+SSL connection

自作多情 提交于 2020-08-02 05:04:05
问题 Our application works with Active Directory users and groups. We are using LDAP on port 389 for Active Directory operations. Now, one of our clients want us add an option for using LDAP + SSL for Active Directory communication. They told us that they have a local CA installed on their domain and using self signed certificate for LDAPS. They also told us that they will provide the certificate, no mutual-trust needed and we should use Windows certificate store. I have developed a test

Windows Authentication and local DB user authentication

人盡茶涼 提交于 2020-07-10 10:32:29
问题 I am using windows authentication impersonation in my MVC application.when i open the application the browser display a prompt for the credentials and validate the domain users. But now i also want to create user in my application and also want to authenticate that users which is stored in my database. Is it possible to authenticate Application DB users as well with windows authentication for domain users. i did much R & D on this but didn't found any solution yet. I will appreciate your

Export all Azure AD Groups and their members (Powershell)

可紊 提交于 2020-07-10 09:25:06
问题 I have seen many threads on exporting groups and getting members, but strangely not both. Basically I need a .csv file or similar with every AD group and it's corresponding members. I believe it needs to be done from Azure as we have multiple domains and Office 365/incloud groups (Azure AD has all of these listed). So I don't think there is another way to export our groups to a single csv file. 回答1: This PowerShell should return you what you are looking for in csv format (one line for each

Export all Azure AD Groups and their members (Powershell)

我们两清 提交于 2020-07-10 09:24:08
问题 I have seen many threads on exporting groups and getting members, but strangely not both. Basically I need a .csv file or similar with every AD group and it's corresponding members. I believe it needs to be done from Azure as we have multiple domains and Office 365/incloud groups (Azure AD has all of these listed). So I don't think there is another way to export our groups to a single csv file. 回答1: This PowerShell should return you what you are looking for in csv format (one line for each

Getting error parsing error when trying to run PowerShell script for Active Directory

杀马特。学长 韩版系。学妹 提交于 2020-07-10 03:16:14
问题 I am writing a script that will update user attributes in Active Directory from a CSV file. I am down to only one error now and it is to do with the syntax. Not sure what the correct syntax is; I have provided the error that I receive when I run the script. Here is the script to update AD users from CSV file. #Updates AD user attributes from CSV file $credential = Get-Credential #Load data from file.csv $ADUsers = Import-csv file_location # Server $server = "127.0.0.1" # Count variable for

Getting error parsing error when trying to run PowerShell script for Active Directory

|▌冷眼眸甩不掉的悲伤 提交于 2020-07-10 03:16:03
问题 I am writing a script that will update user attributes in Active Directory from a CSV file. I am down to only one error now and it is to do with the syntax. Not sure what the correct syntax is; I have provided the error that I receive when I run the script. Here is the script to update AD users from CSV file. #Updates AD user attributes from CSV file $credential = Get-Credential #Load data from file.csv $ADUsers = Import-csv file_location # Server $server = "127.0.0.1" # Count variable for

Add DOMAIN\Domain Admins group as Full Access to the orphaned Home Directory?

二次信任 提交于 2020-07-08 00:36:09
问题 The below script was created by the great https://stackoverflow.com/users/9898643/theo to list all orphaned HomeDirectory: $ServerHomeDirShare = "\\FileServer\HomeDir$" $filter = "(Enabled -eq 'true')" # get all user accounts from AD; only SamAccountName required $users = Get-ADUser -Filter $filter | Select-Object -ExpandProperty SamAccountName Get-ChildItem -Path $ServerHomeDirShare -Directory | Where-Object { $users -notcontains ($_.Name -replace '^(\w+\.\w+).*', '$1') } | Select-Object

Add DOMAIN\Domain Admins group as Full Access to the orphaned Home Directory?

妖精的绣舞 提交于 2020-07-08 00:35:15
问题 The below script was created by the great https://stackoverflow.com/users/9898643/theo to list all orphaned HomeDirectory: $ServerHomeDirShare = "\\FileServer\HomeDir$" $filter = "(Enabled -eq 'true')" # get all user accounts from AD; only SamAccountName required $users = Get-ADUser -Filter $filter | Select-Object -ExpandProperty SamAccountName Get-ChildItem -Path $ServerHomeDirShare -Directory | Where-Object { $users -notcontains ($_.Name -replace '^(\w+\.\w+).*', '$1') } | Select-Object