It’s a weird thing to say, but we can install PowerShell on Mac after the announcement from Microsoft that PowerShell will be available for both Macintosh and Linux. It’s pretty easy to accomplish but having a great scripting language like PowerShell available for Mac is really cool and deserves a blog post. I mean, now I don’t even need to fire up my Windows virtual machine just to run PowerShell!
August 22, 2016
To get started, download the OSX .pkg file from the github page: https://github.com/PowerShell/PowerShell/releases/
Once the file is downloaded you’ll need to find the download and right click and choose open. This will start the installation process.
I gave this a go back in 2016 when Microsoft announced PowerShell was available for Linux and Mac, but it was just a bit of a ballache so I kind of gave up. The other day I thought I’d try this.
Click Next on the Introduction Page.
Select the Destination Disk and click Next.
Select the installation location and click Install. https://randomever.weebly.com/blog/buy-photoshop-for-mac.
Enter in the administrative credentials to install the software and click Install Software.
Powershell For Mac Update
When the installation is finished click Close.
Once the install is complete, open a Terminal Window and run “powershell”. Once you do this, you’ll be able to execute PowerShell commands. Lol for mac china. The example below I ran “get-host” to find the PowerShell version that was installed. I will note that the Install-Module commands don’t work quite yet so adding things like PowerCLI and AzureRM modules won’t be super easy to accomplish yet. This will probably change soon. After all, this is a very early release.
Powershell On Linux![]()
Because my main workstation is a MacBook pro, I use a Windows 8.1 virtual machine for most of my PowerShell coding work or I connect via RDP to my management server. But sometimes I want to quickly edit a script to send it to a coworker or friend. It is possible to edit a PowerShell script in any text editor that is available. But for PowerShell coding it handy if your editor is PowerShell language aware.
So, while looking for PowerShell ISE for MacOSX I came across Sublime. First you need to install Sublime on your Mac. To enable the PowerShell highlighting you need to download this zip file.
The content of this zip file needs to be placed in the following location:
UsersUsernameLibraryApplication SupportSublime Text 3Packages
When you close Sublime and open it again the PowerShell syntax is available. When you click on the right side bottom of the Sublime window you can select PowerShell from the list.
When you open a PowerShell script, you see that Sublime is now PowerShell aware.
Was once an enthusiastic PepperByte employee but is now working at Ivanti. His blogs are still valuable to us and we hope to you too.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |