Hi,
Not sure what parameters you have used or variables but it seems you are missing the UPN format in the command, as Givarry has provided the links can you check that you have the -UserPrincipalName
parameter with the User Principal Name (UPN) of a global administrator.
- Replace
contoso.corp.com
in the following example with your on-premises Active Directory domain name. - Replace
administrator@contoso.onmicrosoft.com
in the following example with the UPN of a global administrator.
Specify the on-premises Active Directory domain. A new Azure AD
Kerberos Server object will be created in this Active Directory domain.
$domain = $env:USERDNSDOMAIN
Enter a UPN of an Azure Active Directory global administrator
$userPrincipalName = "administrator@contoso.onmicrosoft.com"
Enter a domain administrator username and password.
$domainCred = Get-Credential
Create the new Azure AD Kerberos Server object in Active Directory
and then publish it to Azure Active Directory.
Open an interactive sign-in prompt with given username to access the Azure AD.
Set-AzureADKerberosServer -Domain $domain -UserPrincipalName $userPrincipalName -DomainCredential $domainCred
So example will be as per the above command if all the variables are correct, also run Powershell with Administrator account.
Hope this helps.
JS
==
Please Accept the answer if the information helped you. This will help us and others in the community as well.