Code Monkey home page Code Monkey logo

vmware.vimautomation.custom's Introduction

VMware.VimAutomation.Custom

GitHub PowerShell Gallery

Extends the functionality of VMware PowerCLI

Get-VMHostSSHServiceStatus Retrieves the status of the SSH service of VMHosts provided, or VMHosts in the cluster provided

Start-VMHostSSHService Starts the SSH service of VMHosts provided, or VMHosts in the cluster provided

Stop-VMHostSSHService Stops the SSH service of VMHosts provided, or VMHosts in the cluster provided

Get-VMHostUptime (included, but not developed by me) Calculates the uptime of VMHosts provided, or VMHosts in the cluster provided

Get-VMHostDatastores Retrieves the datastore usage of VMHosts provided

New-VMHostNetworkingCsvTemplate Creates a set of host networking CSV import templates to be used with Import-VMHostNetworkingFromCsv

Export-VMHostNetworkingToCsv Exports host networking of VMHosts provided

Import-VMHostNetworkingFromCsv Imports host networking for VMHosts provided utilizing the output from Export-VMHostNetworking

Enable-VMHostIscsiAdapter Enables and configures the software iSCSI adapter

Test-VMHostNetworking Pings addresses from each provided VMkernel port of VMHosts provided

Get-VMHostCpuRatio Calculates the virtual to physical CPU ratio of VMHosts provided

Get-VMHostNetworkCdpInfo Displays the CDP info for each vmnic of VMHosts provided

Get-VMHostNetworkLldpInfo Displays the LLDP info for each vmnic of VMHosts provided

Get-VMCpuReadyPercent Calculates the CPU ready percent average of virtual machines provided


Installation

PowerShell Gallery Install
PS> Install-Module -Name VMware.VimAutomation.Custom

PowerShell Gallery Inspect
PS> Save-Module -Name VMware.VimAutomation.Custom -Path <path> -RequiredVersion 0.0.1

Manual Install
Download, unzip and copy the VMware.VimAutomation.Custom subfolder to $home\Documents\WindowsPowerShell\Modules\

vmware.vimautomation.custom's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

vmware.vimautomation.custom's Issues

VDS Updates

OK, so I got this working. Turns out this was my fault. I needed to update the symlink to my Posh profile due to some previous changes to the module. That being said, this needs some work.

  1. "Nic" names are being exported incorrectly: "Uplink,1,Uplink,2,Uplink,3,Uplink,4" in the virtual port groups spreadsheet. This is due to the difference in naming convention from standard switches (vmnic0, etc.). It should be: "'Uplink 1', 'Uplink 2', 'Uplink 3', 'Uplink 4'".
  2. The "Nic" column of the virtual switches spreadsheet is blank.
  3. Get-VDSwitch should be used instead of Get-VirtualSwitch.
  4. One final note, please maintain the order that the properties are added to objects. This affects the order they appear in the spreadsheet.

Originally posted by @Dapacruz in #6 (comment)

ISCSI Setup has issues on PowerCLI10 and Powershell Core 6

When running the import-vmhostnetworkingfromcsv cmdlet on PowerCLI10 and Powershell Core 6 (MacOS) - The following output is seen. It looks like some rework needs to be done surrounding New-IscsiHBATarget.

Binding vmk2 to the software iSCSI adapter.
Response status code does not indicate success: 500 (Internal Server Error).
At /usr/local/share/powershell/Modules/VMware.VimAutomation.Custom/0.0.2/Functions/Public/Enable-VMHostIscsiAdapter.ps1:99 char:25
+ ...             $esxcli.iscsi.networkportal.add.Invoke($esxcli_args) | Ou ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : OperationStopped: (:) [], ViError
+ FullyQualifiedErrorId : VMware.VimAutomation.Sdk.Types.V1.ErrorHandling.VimException.ViError

Binding vmk3 to the software iSCSI adapter.
Response status code does not indicate success: 500 (Internal Server Error).
At /usr/local/share/powershell/Modules/VMware.VimAutomation.Custom/0.0.2/Functions/Public/Enable-VMHostIscsiAdapter.ps1:99 char:25
+ ...             $esxcli.iscsi.networkportal.add.Invoke($esxcli_args) | Ou ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : OperationStopped: (:) [], ViError
+ FullyQualifiedErrorId : VMware.VimAutomation.Sdk.Types.V1.ErrorHandling.VimException.ViError

iSCSI target 10.200.2.10 does not exist, creating.
New-IScsiHbaTarget : Cannot process argument transformation on parameter 'IScsiHba'. This parameter no longer accepts an array. As an alternative you may pass multiple values by pipeline (if supported by the parameter).
At /usr/local/share/powershell/Modules/VMware.VimAutomation.Custom/0.0.2/Functions/Public/Enable-VMHostIscsiAdapter.ps1:114 char:54
+ ...                       New-IScsiHbaTarget -IScsiHba $iscsi_hba -Addres ...
+                                                        ~~~~~~~~~~
+ CategoryInfo          : InvalidData: (:) [New-IScsiHbaTarget], ParameterBindingArgumentTransformationException
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,VMware.VimAutomation.ViCore.Cmdlets.Commands.Host.Storage.NewIScsiHbaTarget

Modularize functions

Having each function in its own file improves the git workflow and readability.

Expect a pull request later today or tomorrow.

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.