Share via


Can I run Powershell from CLI in Linux?

Question

Friday, December 6, 2019 11:53 AM | 1 vote

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

All replies (4)

Friday, December 6, 2019 12:21 PM âś…Answered | 2 votes

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

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 :)


Friday, December 6, 2019 12:32 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, January 24, 2020 10:49 AM

Thanks

Thanks Shiven:) If Answer is Helpful, Please Vote