Home » Libreta Azure – Powershell en MacOS

Libreta Azure – Powershell en MacOS

Se trata de una versión de Powershell para MacOS que está en Beta como proyecto en GitHub y se puede descargar desde aquí.

Para este caso la versión es v6.0.0-beta.8, y se puede realizar vía HomeBrew ( … gestor de paquetes de MacOS ). Si no tienes HomeBrew instalado, se podría instalar ejecutando en el terminal lo siguiente:

/usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

Pedirá confirmación de la instalación, proporcionando toda la información de la instalación:

userx$ /usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

==> This script will install:

/usr/local/bin/brew

/usr/local/share/doc/homebrew

/usr/local/share/man/man1/brew.1

/usr/local/share/zsh/site-functions/_brew

/usr/local/etc/bash_completion.d/brew

/usr/local/Homebrew

==> The following existing directories will be made group writable:

/usr/local/bin

/usr/local/etc

/usr/local/include

/usr/local/lib

/usr/local/share

/usr/local/lib/pkgconfig

/usr/local/share/man

/usr/local/share/man/man1

/usr/local/share/man/man3

/usr/local/share/man/man5

/usr/local/share/man/man7

==> The following existing directories will have their owner set to userx:

/usr/local/bin

/usr/local/etc

/usr/local/include

/usr/local/lib

/usr/local/share

/usr/local/lib/pkgconfig

/usr/local/share/man

/usr/local/share/man/man1

/usr/local/share/man/man3

/usr/local/share/man/man5

/usr/local/share/man/man7

==> The following existing directories will have their group set to admin:

/usr/local/bin

/usr/local/etc

/usr/local/include

/usr/local/lib

/usr/local/lib/pkgconfig

/usr/local/share/man/man3

/usr/local/share/man/man5

/usr/local/share/man/man7

==> The following new directories will be created:

/usr/local/Cellar

/usr/local/Homebrew

/usr/local/Frameworks

/usr/local/opt

/usr/local/sbin

/usr/local/share/zsh

/usr/local/share/zsh/site-functions

/usr/local/var

Press RETURN to continue or any other key to abort

Una vez instalado HomeBrew, a continuación se instala HomeBrew Cask desde el terminal, que se trata de una extensión que proporciona más paquetes:

brew tap caskroom/cask

Y por último instalamos Powershell:

brew cask install powershell

Que proporcionará una salida el comando con información interesante:

==> Creating Caskroom at /usr/local/Caskroom

==> We’ll set permissions properly so we won’t need sudo in the future

Password:

==> Caveats

A OpenSSL-backed libcurl is required for custom handling of certificates.

This is rarely needed, but you can install it with

  brew install curl –with-openssl

See https://github.com/PowerShell/PowerShell/issues/2211

==> Satisfying dependencies

==> Installing Formula dependencies: openssl

==> Installing openssl

==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2l.high_sierra.bottle.tar.gz

==> Downloading from https://akamai.bintray.com/cc/cc92b67189d6df7315c083da142599faa9848563011e7f5314a0dc36cf03be4c?__gda__=exp=1508686149~hmac=293

######################################################################## 100,0%

==> Pouring openssl-1.0.2l.high_sierra.bottle.tar.gz

==> Caveats

A CA file has been bootstrapped using certificates from the SystemRoots

keychain. To add additional certificates (e.g. the certificates added in

the System keychain), place .pem files in

  /usr/local/etc/openssl/certs

and run

  /usr/local/opt/openssl/bin/c_rehash

This formula is keg-only, which means it was not symlinked into /usr/local,

because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.

If you need to have this software first in your PATH run:

  echo ‘export PATH=”/usr/local/opt/openssl/bin:$PATH”‘ >> ~/.bash_profile

For compilers to find this software you may need to set:

    LDFLAGS:  -L/usr/local/opt/openssl/lib

    CPPFLAGS: -I/usr/local/opt/openssl/include

==> Summary

🍺  /usr/local/Cellar/openssl/1.0.2l: 1,709 files, 12.3MB

==> Downloading https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-beta.8/powershell-6.0.0-beta.8-osx.10.12-x64.pkg

######################################################################## 100,0%

==> Verifying checksum for Cask powershell

==> Installing Cask powershell

==> Running installer for powershell; your password may be necessary.

==> Package installers may write to any location; options such as –appdir are ignored.

==> installer: Package name is powershell-6.0.0-beta.8-osx.10.12-x64

==> installer: Installing at base path /

==> installer: The install was successful.

🍺  powershell was successfully installed!

 

Y a disfrutar:

userx$ powershell

PowerShell v6.0.0-beta.8

Copyright (C) Microsoft Corporation. All rights reserved.

PS /Users/userx>

Fuentes: 

https://github.com/PowerShell/PowerShell/blob/master/docs/installation/linux.md#macos-1012

No Responses to “Libreta Azure – Powershell en MacOS”

  1. Poder trabajar con PowerShell en Windows, Linux y MacOS supone una gran ventaja para cualquier administrador de entornos al poder realizar las tareas de manera similar sin tener en cuenta el entorno en el que esta trabajando. PowerShell Core esta construido sobre .NET Core mientras que PowerShell tradicional lo esta sobre .NET Framework.

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *