Hello ,
I need to set default domain of WCF SERVICE for basic authentication via PowerShell scripts. I need this to automate the deployment process.
IIS->DefaultWebsite->WCFService->Authentication-Basic->Edit->Set Default Name
Hi Anagbh,
I think you may already know that there is no built-in way to do that in PowerShell. As you know, we use the following way to enable basic authentication for our site.
Set-WebConfigurationProperty -filter "/system.webServer/security/authentication/BasicAuthentication" -name enabled -value $enableBasicAuthentication -PSPath $appPath
https://docs.microsoft.com/en-us/powershell/module/webadministration/set-webconfigurationproperty?view=win10-ps
https://stackoverflow.com/questions/24535200/enable-authentication-for-iis-app-in-powershell
The link shows how to set up the default domain and Realm. https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc772009(v=ws.10) Best Regards Abraham
Thanks Abraham
Let me try this options