Installation de Powershell sous linux
Par pepin le mercredi, décembre 11 2019, 09:36 - Windows - Lien permanent
Parce que des fois, il faut bien.... et puis même si je trouve powershell "ampoulé" par rapport au bash linux qui est d'une pur et kiss (keep it simple stupid), me faire un peu de pratique dessus sera bien pour mon cv. Et celui la au moins est disponible sans licence windows particulière ...
Ansible d'installation
- name: Install Xenial Security Repository apt_repository: repo: deb http://security.ubuntu.com/ubuntu xenial-security main state: present filename: xenial-security - name: Install libicu55 apt: pkg: libicu55 state: present - name: install Powershell apt: deb: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.18/powershell_6.0.0-alpha.18-1ubuntu1.16.04.1_amd64.deb
Ceci n'a pas fonctionné sur une ubuntu 19.04, mais très bien sur une 18.04, donc dans un petit container lxc, c'est tout mimi et cloisonné, c'est très bien !
Premiers tests de fonctionnement
PS /root> Get-Module -ListAvailable * Directory: /opt/microsoft/powershell/6.0.0-alpha.18/Modules ModuleType Version Name ExportedCommands ---------- ------- ---- ---------------- Manifest 1.1.0.0 Microsoft.PowerShell.Archive {Compress-Archive, Expand-Archive} Manifest 3.0.0.0 Microsoft.PowerShell.Host {Start-Transcript, Stop-Transcript} Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Content, Clear-Content, Clear-ItemProperty, Join-Path...} Manifest 3.0.0.0 Microsoft.PowerShell.Security {Get-Credential, Get-ExecutionPolicy, Set-ExecutionPolicy, ConvertFrom-SecureString...} Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Format-List, Format-Custom, Format-Table, Format-Wide...} Script 0.0 PSDesiredStateConfiguration {ThrowError, Get-PSMetaConfigDocumentInstVersionInfo, New-DscChecksum, ValidateNodeResourceSource...} Script 1.2 PSReadLine {Get-PSReadlineKeyHandler, Set-PSReadlineKeyHandler, Remove-PSReadlineKeyHandler, Get-PSReadlineOption...} Script 1.1.2.0 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...} Script 3.3.9 Pester {Describe, Context, It, Should...} Script 1.1.2.0 PowerShellGet {Install-Module, Find-Module, Save-Module, Update-Module...} PS /root> Get-Module PackageManagement PS /root> Find-Package vmware* Name Version Source Summary ---- ------- ------ ------- VMware.VimAutomation.Core 11.5.0.14899560 PSGallery This Windows PowerShell module contains Windows PowerShell cmdlets for managing vSphere. VMware.VimAutomation.Sdk 11.5.0.14898111 PSGallery This Windows PowerShell module contains PowerCLI Sdk. VMware.VimAutomation.Common 11.5.0.14898112 PSGallery This Windows PowerShell module contains functionality required by multiple PowerCLI modules. VMware.VimAutomation.Cis.Core 11.5.0.14898113 PSGallery This Windows PowerShell module contains PowerCLI Cloud Infrastructure Suite cmdlets. VMware.VimAutomation.Vds 11.2.0.12483615 PSGallery This Windows PowerShell module contains PowerCLI VDS cmdlets. VMware.Vim 6.7.0.14898114 PSGallery This Windows PowerShell module contains PowerCLI Vim. VMware.VimAutomation.License 11.3.0.13990093 PSGallery This Windows PowerShell module contains PowerCLI cmdlets for managing VMware product licenses. VMware.VimAutomation.Srm 11.5.0.14899557 PSGallery This Windows PowerShell module contains PowerCLI SRM cmdlets. VMware.VimAutomation.vROps 10.0.0.7893921 PSGallery This Windows PowerShell module contains PowerCLI vROps cmdlets. VMware.VimAutomation.Cloud 11.0.0.10379994 PSGallery This Windows PowerShell module contains PowerCLI Cloud cmdlets. VMware.ImageBuilder 6.7.0.11233116 PSGallery This Windows PowerShell module contains PowerCLI ImageBuilder cmdlets. VMware.PowerCLI 11.5.0.14912921 PSGallery This Windows PowerShell module contains VMware.PowerCLI VMware.VimAutomation.Horizo... 7.10.0.14653756 PSGallery This Windows PowerShell module contains Connect/Disconnect cmdlets for View API service. VMware.VimAutomation.Nsxt 11.5.0.14900141 PSGallery This Windows PowerShell module contains PowerCLI NSXT cmdlets. VMware.VimAutomation.Storage 11.5.0.14901686 PSGallery This Windows PowerShell module contains PowerCLI storage management cmdlets. VMware.DeployAutomation 6.7.0.11233116 PSGallery This Windows PowerShell module contains PowerCLI Auto Deploy cmdlets. VMware.VumAutomation 6.5.1.7862888 PSGallery This Windows PowerShell module contains PowerCLI VUM cmdlets. VMware.VimAutomation.Vmc 11.5.0.14912923 PSGallery This Windows PowerShell module contains PowerCLI VMC cmdlets. VMware.VimAutomation.Storag... 1.3.0.0 PSGallery This Windows PowerShell module contains utility scripts for storage. VMware.VimAutomation.Security 11.0.0.10380515 PSGallery This Windows PowerShell module contains PowerCLI security management cmdlets. VMware.VimAutomation.Hcx 11.5.0.14900247 PSGallery This Windows PowerShell module contains PowerCLI HCX cmdlets. VMware.VimAutomation.HA 6.5.4.7567193 PSGallery This Windows PowerShell module contains PowerCLI HA cmdlets. VMware.VimAutomation.PCloud 10.0.0.7893924 PSGallery This Windows PowerShell module contains PowerCLI vCloud Air cmdlets. VMware.VMC 1.2.0 PSGallery PowerShell Module for Managing VMware Cloud on AWS VMware.vSphereDSC 2.0.0.0 PSGallery PowerShell Module containing DSC Resources for vSphere. VMware.VimAutomation.Custom 0.0.3 PSGallery This module extends the functionality of PowerCLI VMware-vCD-Module 1.4.0 PSGallery This a POwerShell Module based on VMware PowerCLI vCloud Director Module to extend its function VMware-NSXvCD-Module 1.2.0 PSGallery The VMware-NSXvCD-Module leverages the vCloud Director API for NSX to Report Edge Gateway and Distribued Firewall Details VMwareBaselineCheck 0.1.1 PSGallery VMware Baseline check. VMwareFever 1.0.0 PSGallery PowerShell Module with custom functions and cmdlets for VMware vSphere. VMWareAutomate 3.1.2.1 PSGallery Functions to Automate Bulk VMWare Tasks VMware.vCAV.Community 3.5 PSGallery
Tout à l'air en place ! Il reste à tester ca maintenant