locked
How to remove an Azure Account from Powershell and Login with a new account RRS feed

  • Question

  • I am using the command Remove-Azureaccount to remove a current existing account attached to a particular subscription and I would like to login with a new account to see some other subscription.

    Both the subscriptions are in Resource Manager Mode.

    What is the current command to remove an account or delete a subscription  in Resource Manager Mode, "Remove-Azureaccount" is not working and throwing me error

    Remove-AzureAccount : User name is not valid.
    Parameter name: accountId
    At line:1 char:1
    + Remove-AzureAccount -Name "infy_107797@outlook.com"
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : CloseError: (:) [Remove-AzureAccount], ArgumentException
        + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.Profile.RemoveAzureAccountCommand
     


    Pallab Chakraborty

    Monday, February 19, 2018 12:27 PM

Answers

  • See help for CmdLet.  AccountID is required.

    Use Get-AzureAccount to validate the account.


    \_(ツ)_/

    Monday, February 19, 2018 12:39 PM

All replies

  • See help for CmdLet.  AccountID is required.

    Use Get-AzureAccount to validate the account.


    \_(ツ)_/

    Monday, February 19, 2018 12:39 PM
  • Did any body found answer for this yet?
    Thursday, August 9, 2018 10:09 PM