Microsoft Document Powershell Scripting Error?

Jon Mercer 991 Reputation points
2022-02-18T00:23:29.763+00:00

In the article at https://learn.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-sso-faq#how-can-i-roll-over-the-kerberos-decryption-key-of-the-azureadssoacc-computer-account under the section titled How can I roll over the Kerberos decryption key of the AZUREADSSO computer account? is this command.

Navigate to the $env:programfiles"\Microsoft Azure Active Directory Connect" folder. It is giving a paring error on the first quote that is after programfiles.

I already installed the AzureAD module, signed in, and all that fun stuff, using PS5 in admin mode, and this is done on the server running Azure AD Connect.

I get this. As you see if I go to the location normally it works, if I use the command listed in the document it fails. My question to them was there something wrong possibly with the coding.

175548-image.png

I put in a comment to the article mentioning this, and they sent me suggestions (see https://github.com/MicrosoftDocs/azure-docs/issues/88301) and then closed the case. They said if I have further questions to ask here (If you have further questions, I also recommend posting to Microsoft Q&A since this is more of a product question than documentation feedback. https://learn.microsoft.com/answers/topics/azure-active-directory.html?filter=unanswered), so here I am.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,789 questions
0 comments No comments
{count} votes

Accepted answer
  1. Siva-kumar-selvaraj 15,636 Reputation points
    2022-02-28T23:38:38.92+00:00

    Hello @Jon Mercer ,

    Thanks for reaching out and apologies for the inconvenience caused by above issue.

    I was receiving the same issue when I only called $env:programfiles"Microsoft Azure Active Directory Connect", but we should call it with the 'cd' cmdlet, for example, cd $env:programfiles"Microsoft Azure Active Directory Connect".

    To avoid these concerns, I'm working with the content creator to update the same in our document. I hope this was helpful.

    If you have any other questions, please let us know. Thank you for your time and patience throughout this issue.

    -----
    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


1 additional answer

Sort by: Most helpful
  1. Rich Matheisen 46,721 Reputation points
    2022-02-18T03:21:20.997+00:00

    Try it this way:

    cd ($env:programfiles + "\Microsoft Azure Active Directory Connect")
    

    But when the instructions said (in step 2) to "Navigate to the $env:programfiles"\Microsoft Azure Active Directory Connect" folder." it meant that you should make that folder your current directory. You'd already done that in the first line of code in your screenshot (using the CD cmdlet).

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.