So, you're trying to create a Sharepoint site with powershell, and you're getting this error.
It's because you forgot to specify the authentication provider.
$ap is just a variable, and it's probably empty.
You need to do this first:
$ap = New-SPAuthenticationProvider
or
$ap = New-SPAuthenticationProvider -UseWindowsIntegratedAuthentication
even its is declared as above we are getting an issue $WindowsAuthProvider = New-SPAuthenticationProvider -UseWindowsIntegratedAuthentication
ReplyDelete