I want to get Microsoft 365 activation account information with a PowerShell command

津川 修一 1 Reputation point

Immediately after installing Microsoft 365, specify the email address on the activation screen,
I want to use the PowerShell command to get the email address information that I entered when setting up this authentication.

You can check it by launching Excel etc. on the target computer and displaying the account screen.
Please let me know if there is a way to investigate with the PowerShell command.
Thank you.

When I tried ospp.vbs with / dstatus specified,
I was able to get the Product ID and SKU ID information,
I couldn't get the above email address information.
(ERROR CODE: 0x4004FC04 was displayed on the way)

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,409 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Ian Xue (Shanghai Wicresoft Co., Ltd.) 31,171 Reputation points Microsoft Vendor


    How about querying the registry value?

    Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Office\16.0\Common\Identity\Identities\*" -Name "EmailAddress"  

    Best Regards,
    Ian Xue


    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. 津川 修一 1 Reputation point

    Mr. Ian Xue
    The problem has been solved.
    Thank you very much.

    0 comments No comments