Exemple #1
0
        public override void ExecuteCmdlet()
        {
            if (Uri != null && Uri.Port <= 0)
            {
                WriteWarning(string.Format(Resources.NoPortSpecified, Uri));
            }

            var toUse = Uri ?? new Uri(string.Format("https://{0}:{1}", DatabaseHost, Port));

            ConfirmAction(
                string.Format(Resources.NewDataLakeCatalogCredential, CredentialName, DatabaseName),
                CredentialName, () =>
                DataLakeAnalyticsClient.CreateCredential(Account,
                                                         DatabaseName,
                                                         CredentialName,
                                                         Credential.UserName,
                                                         Credential.GetNetworkCredential().Password,
                                                         toUse.AbsoluteUri));
        }