I have Forms Based Authentication Setup in my SharePoint environment, using the OOTB "aspnetdb" and SQL Membership Provider and SQL Role Providers. Now I have a requirement to populate the DB with Forms users and roles using PowerShell. I know how to achieve this using C#. Let's say we use a Windows / Web / Console application in C# to achieve it, all those types of applications will have a config file, where we will make the required entries for the membership and role providers. The C# code System.Web.Security.Membership.Providers relies on the existence of this configuration to work. But in PS, since we won't have a configuration like that, I am wondering how to get it to work. Reading from an external XML file won't work in this case, because, the internal implementation relies only on the existence of the configuration file of the application. I checked this through ILSpy. Any help will be appreciated.
I found the answer in MSDN forum, where I had posted the same question. Sara Fan from MSFT answered. Thank you very much Sara. You can find the answer from the below link.