none
Can I run Powershell from CLI in Linux? RRS feed

  • Question

  • Hello,

    I'm preparing for the Azure Foundations exam and seem to have conflicting info on this question (Can I run Powershell from CLI in Linux?)

    I know CLI is available in Linux and I've read the Powershell core version is also available in Linux, however the below question has been answered as a NO. Why?

    An Azure administrator plans to run a PowerShell script that creates Azure resources.
    You need to recommend which computer configuration to use to run the script.
    Solution: Run the script from a computer that runs Linux and has the Azure CLI tools installed.
    Does this meet the goal?

    • A. Yes
    • B. No

    Thanks for the help!!

    Angeles

    Friday, December 6, 2019 11:53 AM

Answers

  • To run PS on Linux machine, PS core 6.x and higher version has to be installed in it. 

    So, Run the script from a computer that runs Linux and has the Azure CLI tools installed
    --> Wrong answer

    Run the script from a computer that runs Linux and has the PowerShell core 6.x and higher version installed
    --> Correct answer


    If the response helped, do "Mark as answer" and upvote it
    - Vaibhav

    • Marked as answer by amf_one Friday, December 6, 2019 12:24 PM
    Friday, December 6, 2019 12:21 PM

All replies

  • To run PS on Linux machine, PS core 6.x and higher version has to be installed in it. 

    So, Run the script from a computer that runs Linux and has the Azure CLI tools installed
    --> Wrong answer

    Run the script from a computer that runs Linux and has the PowerShell core 6.x and higher version installed
    --> Correct answer


    If the response helped, do "Mark as answer" and upvote it
    - Vaibhav

    • Marked as answer by amf_one Friday, December 6, 2019 12:24 PM
    Friday, December 6, 2019 12:21 PM
  • Ahhh... got it :) It's about answering ONLY what they ask, right? Got it, thank you very much :)
    • Edited by amf_one Friday, December 6, 2019 12:24 PM
    Friday, December 6, 2019 12:24 PM
  • Ahhh... got it :) It's about answering ONLY what they ask, right? Got it, thank you very much :)
    Yes, they are just checking if we know the prerequisite to run Azure PS cmdlets. 
    All the best for AZ-900 certification exam!

    If the response helped, do "Mark as answer" and upvote it
    - Vaibhav

    Friday, December 6, 2019 12:32 PM