예제 #1
0
        public static void Main(string[] args)
        {
            if (UseAppModel == false)
            {
                GetCredentials();
            }

            string inputFilePath = GetInputFilePath();

            if (PeoplePickerRemediation.ValidateLDAPVariable())
            {
                if (ValidateDirectorySearcherUser())
                {
                    PeoplePickerRemediation.DoWork(inputFilePath);
                }

                System.Console.WriteLine("Execution has completed");
            }
        }
예제 #2
0
        private static bool ValidateDirectorySearcherUser()
        {
            bool   continueStatus = false;
            string accountID      = "";

            System.Console.WriteLine("Provide your Credentials in format: domain\\alias: ");
            accountID = System.Console.ReadLine();
            string upn = PeoplePickerRemediation.GetUserPrinicpalNameFromDirectorySeracher(accountID);

            System.Console.WriteLine(string.Format("{0} user's upn value is {1}", accountID, upn));

            System.Console.WriteLine(string.Format("Do you want to continue process InfoPath forms(y/n)?"));
            string continuedStatus = System.Console.ReadLine();

            if (!string.IsNullOrEmpty(upn) && (continuedStatus.Contains("y") || continuedStatus.Contains("Y")))
            {
                continueStatus = true;
            }
            return(continueStatus);
        }
예제 #3
0
        private static bool ValidateDirectorySearcherUser()
        {
            bool   continueStatus = false;
            string accountID      = "";

            System.Console.WriteLine("LDAP Directory Lookup Validation:");
            System.Console.WriteLine(String.Format("-AppSettings[LocalAdLdapQuery] = {0}", ConfigurationManager.AppSettings["LocalAdLdapQuery"].ToString()));
            System.Console.WriteLine("Please provide a user account to test [format = domain\\alias]: ");
            accountID = System.Console.ReadLine();
            string upn = PeoplePickerRemediation.GetUserPrinicpalNameFromDirectorySearcher(accountID);

            System.Console.WriteLine(string.Format("{0} user's UPN value is {1}", accountID, String.IsNullOrEmpty(upn) ? "Empty" : upn));
            System.Console.WriteLine("");
            System.Console.WriteLine(string.Format("Do you want to continue and process the InfoPath Form Libraries? [Y/N]?"));
            string continuedStatus = System.Console.ReadLine();

            if (!string.IsNullOrEmpty(upn) && (continuedStatus.Contains("y") || continuedStatus.Contains("Y")))
            {
                continueStatus = true;
            }
            System.Console.WriteLine("");
            System.Console.WriteLine("");
            return(continueStatus);
        }