none
Is it possible to write and execute Azure AZ script and Azure RM script in same file RRS feed

  • Question

  • Hi ,

    Is it possible to write and execute  Azure AZ script and Azure RM script in same file  ?

    I wrote few script in power shell , it s mixture of AZ and RM module . is it possible to combine and run it together  from one power shell file ?

    Regards,

    Shibin KM 

    Monday, October 7, 2019 12:27 PM

Answers

  • Not sure if it is possible, but it is not recommended to use them together. 

    Per documentation, we should uninstall Azure RM before installing AZ module.

    It is better if the script is converted to use latest module. 

    Also please see below 

    {

    The Az module has a compatibility mode to help you use existing scripts while you update to the new syntax.
    Enable-AzureRmAlias cmdlet enables a compatibility mode through aliases, to allow you to use existing scripts with minimal modification while working towards a full migration to Az

    }

    from the document:
    Migrate existing scripts to Az


    Regards,
    Vaibhav

    Monday, October 7, 2019 3:25 PM

All replies

  • Not sure if it is possible, but it is not recommended to use them together. 

    Per documentation, we should uninstall Azure RM before installing AZ module.

    It is better if the script is converted to use latest module. 

    Also please see below 

    {

    The Az module has a compatibility mode to help you use existing scripts while you update to the new syntax.
    Enable-AzureRmAlias cmdlet enables a compatibility mode through aliases, to allow you to use existing scripts with minimal modification while working towards a full migration to Az

    }

    from the document:
    Migrate existing scripts to Az


    Regards,
    Vaibhav

    Monday, October 7, 2019 3:25 PM
  • hi,

    i have combination of both the script , and i dont have time to covert RM script to AZ 

    Regrads,

    Shibin KM 

    Wednesday, October 9, 2019 4:08 PM