Giter VIP home page Giter VIP logo

vnugglets / vnuggletspsmod_vdnetworking Goto Github PK

View Code? Open in Web Editor NEW
7.0 3.0 4.0 59 KB

vNugglets PowerShell module for managing advanced vSphere virtual distributed networking, like traffic filtering and marking

License: MIT License

PowerShell 100.00%
powershell traffic-filtering vnugglets-powershell powercli vds vdportgroup dscp qos traffic-marking traffic-tagging virtualdistributedswitch virtualdistributedportgroup virtualdistributedswitchuplink vmware-virtual-networking

vnuggletspsmod_vdnetworking's Introduction

vNugglets.VDNetworking PowerShell Module for VMware vSphere Virtual Distributed Networking Management

PSGallery Version PSGallery Downloads

Contents:

This PowerShell module provides functionality to automate the management of VMware vSphere virtual distributed networking items for which VMware PowerCLI does not already provide support. For example, for the reporting on-, creation of-, and removal of traffic filtering and marking rules at the vDPortgroup level. Another capability: managing the VDUplink of which a VMHost VMNIC is a part.

Some of the functionality provided by the cmdlets in this module:

  • Get VDPortgroup traffic policy
  • Get traffic policy rules
  • Get traffic policy rule qualifiers
  • Create traffic policy rule qualifiers, for use in creation of new policy rules
  • Create new traffic rules for the ruleset for the given vDPortgroup
  • Remove given traffic rule(s) from a vDPortgroup
  • Set the VDSwitch Uplink for a VMHost physical NIC ("VMNIC") on the VDSwitch of which the VMNIC is already a part

QuickStart

Chomping at the bit to get going with using this module? Of course you are! Go like this:

  • This module available in the PowerShell Gallery! To install it on your machine or to save it for inspection, first, use one of these:
    • Install the module (maybe after you've inspected it first with the command after this):

      Find-Module vNugglets.VDNetworking | Install-Module

    • Or, save the module first for further inspection/distribution (always a good idea):

      Find-Module vNugglets.VDNetworking | Save-Module -Path c:\temp\someFolder

Examples

Examples are in two places:

  • periodically updated in the docs/ folder for the project at docs/examples.md, which is also accessible via the project's GitHub Pages examples page
  • always up to date in the Get-Help examples for each cmdlet by checking out the help for each cmdlet (see Getting Help section below)

Getting Help

The cmdlets in this module all have proper help, so you can learn and discover just as you would and do with any other legitimate PowerShell module:

  • Get-Command -Module <moduleName>
  • Get-Help -Full <cmdlet-name>

ChangeLog

The ChangeLog for this module is, of course, a log of the major changes through the module's history. Enjoy the story.

Other

If you are not interested in- or able to use the PowerShell Gallery, you can get the module in this way:

  • clone the GitHub project to some local folder with Git via:
    PS C:\> git clone https://github.com/vNugglets/vNuggletsPSMod_vDNetworking.git C:\temp\MyVNuggsVDRepoCopy
  • put the actual PowerShell module directory in some place that you like to keep your modules, say, like this, which copies the module to your personal Modules directory:
    PS C:\> Copy-Item -Recurse -Path C:\temp\MyVNuggsVDRepoCopy\vNugglets.VDNetworking\ -Destination ~\Documents\WindowsPowerShell\Modules\vNugglets.VDNetworking
  • import the PowerShell module into the current PowerShell session:
    PS C:\> Import-Module -Name vNugglets.VDNetworking
  • or, if the vNugglets.VDNetworking module folder is not in your Env:\PSModulePath, specify the whole path to the module folder when importing, like:
    PS C:\> Import-Module -Name \\myserver.dom.com\PSModules\vNugglets.VDNetworking

vnuggletspsmod_vdnetworking's People

Contributors

mtboren avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vnuggletspsmod_vdnetworking's Issues

new-object - cannot find type VNVDTrafficFilterPolicyConfig - verify assembly containing this type is loaded

When I am using this module in my script and calling the script from the commandline I am getting the following error.

New-Object : Cannot find type [VNVDTrafficFilterPolicyConfig]: verify that the assembly containing this type is loaded.
At C:\Program Files\WindowsPowerShell\Modules\vNugglets.VDNetworking\1.1.0\GetItems.ps1:22 char:4
+             New-Object -Type VNVDTrafficFilterPolicyConfig -Property  ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidType: (:) [New-Object], PSArgumentException
    + FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewObjectCommand

This only happens when I am calling the script from the windows console or powershell but does not occur when I am running the script from within powershell ISE.

I have found that the offending line is

Get-VDSwitch -name $VDSwitchName | Get-VDPortGroup -name $VDPortGroup | Get-VNVDTrafficFilterPolicyConfig

Why is this happening and how could I solve this ?

For testing I am running this small test script, after installing vNugglets.VDNetworking.

import-module vNugglets.VDNetworking
Connect-VIServer -Server $serverip -Protocol https -User $username -Password $pass
get-vdswitch -name $vswitch | get-vdportgroup -name $vport | get-vnvdtrafficfilterpolicyconfig

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.