Giter Site home page Giter Site logo

unkn0wnvariable / powershell-vmwareadmin Goto Github PK

View Code? Open in Web Editor NEW
12.0 2.0 4.0 80 KB

My attempts at making life with VMware that little bit easier.

License: GNU General Public License v3.0

PowerShell 100.00%
powershell powershell-script script scripts vmware vmware-vsphere vmware-esxi powershell-adminscripts powershell-scripts

powershell-vmwareadmin's Introduction

VMware PowerShell

My attempts at making life with VMware that little bit easier.

Prerequisites

These scripts all require PowerCLI to be installed.

PowerCLI version 10 is installed using the following command in PowerShell:

Install-Module -Name VMware.PowerCLI -Scope CurrentUser

If you have a previous version installed, uninstall it before installing v10. You also may need -AllowClobber to overwrite existing modules.

E.g.:

Install-Module -Name VMware.PowerCLI -Scope CurrentUser -AllowClobber

PowerCLI v10 Changes

Module vs Initialization

With the release of PowerCLI v10 we are now able to import the required modules in the normal PowerShell way, e.g. Import-Module -Name VMware.PowerCLI, this means that the old PowerCLI initialization script no longer works and I have updated my scripts accordingly. Going forward I cannot guarantee or verify that these scripts will work in older versions of PowerCLI, even if the environment initialisation script is used first, so please use v10 or higher.

In my scripts I'm actually using Import-Module -Name VMware.PowerCLI -Force to make sure the correct module is loaded.

Invalid Certificates

PowerCLI 10 changes the default behaviour for untrusted certificates from warn to fail, this means you won't be able to connect if using self-signed certificates.

This behaviour can be reverted back temporarily using:

Set-PowerCLIConfiguration -InvalidCertificateAction Warn -Scope Session -Confirm:$false

Or permanently using:

Set-PowerCLIConfiguration -InvalidCertificateAction Warn -Confirm:$false

Personally I prefer setting it to prompt, then I can make my choice on a per-server basis.

E.g.:

Set-PowerCLIConfiguration -InvalidCertificateAction Prompt -Confirm:$false

Disclaimer

All scripts are provided as is without warranty of any kind, use them at your own risk.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.