New-VM and assigning groups of ports

Howdy,

In my view, that there is a syntax problem.  Need some review and help please.

Written by a NEW - VM deployment script.  The script is what prompts the end user for details custom that is needed to create the virtual machine. How to change a Script Cust in custom Script Manager to deploy the virtual model computer.  Everything goes perfectly well except assign it to the Port Group.

According to this link: New-VM - vSphere PowerCLI cmdlets reference the parameter is - NetworkName.  In PowerGUI, I get an error.

Here's the script:

# Connect to vCenter Server

SE connect-VIServer $vcserver

Get-OSCustomizationSpec TestScript1 | Get-OSCustomizationNicMapping | `

Game-OSCustomizationNicMapping - UseStaticIP - $IP IpAddress IpMode '

-$SM DefaultGateway - $GW - Dns 1.2.3.4,1.2.3.5 subnet mask

New-VM-name $Name - model TemplateNameHere - VMHost $VMHOST '

-Store data $Datastore - networkname "VLAN # ' OSCustomizationSpec - TestScript1 '

-Confirm: $false - RunAsync

Setting - NetworkName with channel hardcoded group name or with a variable gives the same result.

Here is the error I get in PowerGUI:

New-VM: all parameters can be resolved by using the specified named parameters.

C:\Scripts\Massive deploy Project\testdeploy1.ps1:23 char: 5

+ New-VM-name $Name - model TemplateNameHere - VMHost $VMHOST '

+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo: InvalidArgument: (:)) [new-VM], ParameterBindingException)

+ FullyQualifiedErrorId: AmbiguousParameterSet, VMware.VimAutomation.ViCore.Cmdlets.C

ommands. NewVM

Thank you

BostonTechGuy

You are the key parameters of different parametersets mixture.

In this case, you use the model parameterset, and in this case, you cannot use the NetworkName parameter.

Set the NetworkName later once the virtual machine is created with the cmdlet Set-NIC

Tags: VMware

Similar Questions

  • 'New Contact' and "New Contact Group" endangered acted Windows Messaging

    I have two identities on my computer, one for personal use (Administrator) and the one I use for my home business. When I click on Contacts for my second identity email Windows, 'New Contact' and 'New group contact' do not appear. They appeared, then began to disappear and reappear from time to time, and now they don't come at all. Because I need to frequently use Group emails, it's maddening. Can anyone help please?

    KD

    Missing the Windows Contacts toolbar buttons
    http://www.vista4beginners.com/missing-buttons-from-Windows-contacts-toolbar

    Vista - "New Contact" and "Contact Group on new" button missing
    http://www.Vistax64.com/tutorials/186477-new-contact-new-contact-group-button-missing.html

    Bruce Hagen ~ MS - MVP [Mail]

  • IWindows Mail buttons to create a new Contact and create a new Contact Group

    I lost my toolbar buttons to create a new Contact and to create a new Contact Group...

    I found EM.

    Missing the Windows Contacts toolbar buttons
    http://www.vista4beginners.com/missing-buttons-from-Windows-contacts-toolbar

    Vista - "New Contact" and "Contact Group on new" button missing
    http://www.Vistax64.com/tutorials/186477-new-contact-new-contact-group-button-missing.html

    Bruce Hagen MS - MVP [Mail]

  • Number of groups of ports and VLANs by vSwitch

    Hi all

    I'm looking for any insight or best practices in what concerns the number of VLANs that are ongoing to shared resources on a vSwitch.  Our ESX servers, there are 6 physical network adapters associated with (using the property intellectual hash).  These cards are the uplinks to the vSwitch which provides the virtual machine networks.   We use VLAN Tagging (VST) and created groups of ports for each Vlan ID.  Until now, we have about 7 groups of ports for 7 different VLAN.     I know the max is 512, but are there aspects to add several groups / VLAN port that I'm missing?  (We use vSphere 4.1)

    Thank you...

    Groups of ports by vCenter limit is 5000, but you do not sound as it reaches.

    Really, for the number, you have (7) you are a pretty small network as much as standard implementations are going, and you'll be fine.

    I don't think it is interesting to look at if you really expect to be using all six ports - it is rare for aggregation in order to get increases in actual performance beyond two, and often 'more' is not better.

    LACP changes things a bit, but it does not apply to many environments.

  • How can I add and synchronize groups and AD users after a successful installation?

    Hello

    Maybe I don't see the wood from the trees.

    I have successfully installed a working environment of the Horizon.

    Now, I would like to add a few new users and AD groups, so that they would be synchronized with Horizon Workspace.

    If I am logged on as admin-account on the portal of the workspace, and I can see the tab "users and groups".

    There, I also see synchronized users during the installation, I added.

    But how can I add and synchronize the users in my ad?

    Kind regards

    André

    AD synchronization is done automatically on the schedule that you specified during the Setup installation ad part. You can change it and thus force a manual synchronization. But it is done on the connector and not the ordinary administration portal. You access your connector by using https:// Connector_URL:8443

  • Import of groups of ports in vDS using powershell and

    I have a VCenter 5.5 with a 5.5 vDS. I'm trying to import several groups of ports in the vDS using powershell. The script is below. I'm under problems in trying to put the "Teaming and Failover" option to 'Route based on a physical load' by default 'Route based on originating virtual port' for the Group of individual ports, I know that I can do from the client, but I would like if possible do it with a script. Someone point me in the right direction? Port groups to import very well with all the correct settings, that I put, but I can't seem to find how to set the load balancing policy.

    to connect-viserver 'myvcenter '.

    $vds = Get VDSwitch -name "my Switch VD"

    Import-Csv c:\temp\vdsportgroup.csv | % {New-VDPortgroup -VDSwitch $vds -Name $_. Name -VlanId $_. {VlanId -NumPorts $_.ports}







    Edit: Scratch that I wrote earlier, it was with the older VDS cmdlets. This should work:

    Get-VDPortgroup MyVdPg | Get-VDUplinkTeamingPolicy | Game-VDUplinkTeamingPolicy - LoadBalancingPolicy LoadBalanceLoadBased

    You can simply direct the Group of newly created port directly object to cmdlets like this:

    Import-Csv c:\temp\vdsportgroup.csv | % {New-VDPortgroup - VDSwitch $vds - name $_.} Name - VlanId $_. VlanId - NumPorts $_.ports | Get-VDUplinkTeamingPolicy | Game-VDUplinkTeamingPolicy - LoadBalancingPolicy LoadBalanceLoadBased}

  • groups and iSCSI connections to ports

    Hello

    We have a 5.1 esx server connected to an iSCSI-based storage device.

    the server is connected using two of the vmkernal iscsi ports.  each network card has a different ip address on the private iscsi vlan.  the configuration is according to the practices of bast vm using only one network by vmkernal port card.

    We have a migration of storage to another storage but I still have to intall it.  I would like to know if its possible to create two groups of ports additional vmkernal using the same NIC already connected to the iscsi storage.  new port groups on one vlan separate and different netwok so go looking, it seems right that I share two NICs for two networks different iscsi.

    as mentioned above, that I have not installed the hardware yet, but to test it a bit it looks like I can add groups of ports by using the network card and I was able to bind to the vmhbaxx with the adapter of storage with the path of staus as not used.  so I hope that when I connect the new buffer I would be if all goes well able to connect once I place a discovery?

    any comments welcome.

    Thank you

    I don't see why you shouldn't be able to do what you describe. It's a little unusual, but it should work to create adapters to VMK several on the same vSwitch and make the same active/unused configuration you already made, but put other id VLAN and IP address on the new adapters. Of course the two logical VMK adapters share the same network link, but you are fully aware of.

    As long as it is not indicated in some manual or KB article as a solution not supported, you should be fine.

  • Group of port and the naming convention for vLAN

    What is the naming convention better for groups of ports on vSwitches?  This naming convention should match how we name them VLAN on the physical switches and how important is that?

    Hi VMinator,

    To answer your question, he has not agreed to 'standard' for names of portgroup.  That's all what you're comfortable with the support and what works for you and your organization.  A bit like server names; Some companies are going hardcore with the naming conventions and others their name after the characters in science fiction or world of warcraft bosses

    Forensic science more you pack in a naming of the control standard more you have (i.e. for scripts, health check, etc. see below).  Also, if the name itself answers questions on his own and allows you to save a phone call that is priceless.  For example - the guys says unix... "Uh which network to choose for my new virtual machine.  My IP is blah blah blah. "Well, with right portgroup name, this question would have answered itself... and maybe even recorded some interruptions of service in other cases by the simple fact of being clear and effective in the communication of how this virtual device should work: purely expressed through an appropriate naming convention.

    Here's another one.  My last concert, we had thousands of virtual machines that had to move data centers and when they landed, they needed to change the IPs and start using 3 vNIC (instead of 1) on each virtual machine.  Each vNIC with a different subnet mask.  All support should be conducted by a team of outsourced with minimum experience of VMware.  The only way to support something like this and be effective is PowerCLI.  With just invited the naming convention only, you can perform various tasks such as query the virtual computer and check its settings of portgroup compared to its actual IP information in the operating system, initiate a ping from .NET to the virtual machine, if there is any questions Act automatically.  Some actions that will have to be performed include, for example, change the portgroup or mask on a set of clients;  Or questioning guests and glean information network (CDP, vSwitch, portgroup of information etc.) and compare observed network vs network expected enumerated in the PG naming convention. etc etc.  The list of actions that you can take are limited only by your creativity.  The naming standards give you effective power both in manual and automatic efforts.

    Still, notice of one man, but every site I care and feeding generally ends with a PG standard similar to what I first described above in my previous post.  Don't forget my example naming convention is Basic.  There are many other attributes that you can add (i.e. in vCloud deployments, in addition to the info network, you can choose to identify various features specific to vCloud org-networks, etc.).

    TBH just most of the companies have appointed VM-network exchanges (ok not bad) or some random shortname which doesn't help troubleshooting.  They are fairly easy to fix and also change over time, if necessary.  You can easily drag and drop a set of virtual machines (although I don't personally do this way) in the new port group (via the page of networking to CTRL + SHIFT + N) or PowerCLI it (Yes!  way to go).  Of course, always the ping tests before and after the change.  There are a lot of scripts out there (or ask master lucd post in PowerCLI VMTN forums).  If this is net-news, then you are ahead of the game and will have a standard to follow, whatever it is.

    Best of luck and have fun!

  • Adding Port, Tags and IP groups varies - impact on the VMS?

    We need migration of virtual machines to a different environment due to necessary maintenance SAN.  A colleague in another Department has offered to temporarily move VMs to its environment.  Looking at its systems, we need to add a new group of port, add our range of IP addresses to the NICs and tag his current group of port, because it is without label.  I think that this should not affect its virtual machines that are running in production, but am not 100% sure, so I ask confirmation.  We appreciate his willingness to help and don't want to do anything that would affect its systems.  Thanks in advance for your replies.

    Ann8 wrote:

    If you are sure that we can create the necessary tagged group without problem and do not have to worry about its original port of marking group

    This will depend on a bit of the physical switch, but you can almost certain make the port physical switch carry VLANs marked (called a "trunk" on Cisco devices) and use one untagged VLAN per port, which will be his old trade, known as the vlan "native" of Cisco.

  • my phone has port and new battery and still will not hold a charge

    my phone has port and new battery and still will not hold a charge

    What do you mean 'there port and new battery? If someone other than Apple has opened and replaced the things, it is now unbearable.

  • How to create and assign a VLAN to specific ports

    In our ISA550W, create the VLANS for different subnets and assigning them to specific ports are a piece of cake and self explanitory.

    However on a SG300-10MP, I am totally lost lol. I just want to make ports 7 & 8 set to a sous-reseau.10 instead of un.6 as the rest of the switch. I need these ports to be totally independent from the rest and not to communicate with others at all.

    How can I do this?

    Thank you!

    Hi Alex,

    Under management of VLANS, go into settings of the interface.  Change the interfaces that you use to access the ports by choosing the way you want by clicking on change.

    Once they are access ports back to Port for page VLAN and assign the port desired as one not marked in this interface.

    This should be everything you need, let me know if you have any other questions.

    -Good Trent

    * Please note the useful messages! **

  • AnyConnect tunnel-group automatic assignment without selecting any group-tunnel-group-list alias and user-group strategy.

    Objective is that the anyconnect user must select group-alias, so that when a user enters his username and password he must go to his political group and tunnel-group specific. as I removed this command in webvpn 'no tunnel-group-list don't enable '. This I can not connect (user does not authenticate).

    1 - my question is why his past does not?

    Solution:

    If I keep only a single tunnel-group by default and make several group policies and assign to each user with his specific group policy that it works. in user attribute means I have only question following the commands it works, but if I put "group-lock value test-tunnel" that it did not identify.

    Please explain why.

    WebVPN

    allow outside

    limit the cache-fs 50

    SVC disk0:/anyconnect-win-3.0.10055-k9.pkg 1 image

    enable SVC

    internal strategy of group test-gp

    attributes of the strategy of group test-gp

    VPN-tunnel-Protocol svc webvpn

    the address value test-pool pools

    username, password test test

    username test attributes

    VPN-tunnel-Protocol svc

    group-lock value test-tunnel

    Strategy Group-VPN-test-gp

    tunnel-group test-tunnel type remote access

    attributes global-tunnel-group test-tunnel

    Group Policy - by default-test-gp

    tunnel-group test-tunnel webvpn-attributes

    allow group-url https://192.168.168.2/test

    Yes, you have the right solution. You only need to create 1 group of tunnel and multiple group policy. Under the attribute of the user, you re then group policy of vpn that you want the user assigned too.

    You can also authenticate users against AD and configure ldap attribute map to map the user to a specific group policy automatically.

    Here is an example of configuration if you happen to have the AD and will authenticate against AD:

    http://www.Cisco.com/en/us/products/ps6120/products_configuration_example09186a00808d1a7c.shtml

    Hope that helps.

  • I have a user who no longer works for the company.  Someone took his place, the same computer.  She used the same account as the former user.  I would like to delete the old user and assign the new.  It will lose something if I do this?  I shouldn't

    I have a user who no longer works for the company.  Someone took his place, the same computer.  She used the same account as the former user.  I would like to delete the old user and assign the new.  It will lose something if I do this?  I wouldn't reinstall anything, right?

    Hi Greg,.

    You won't lose any application on the computer.

    You can remove a user from the license and assign it to another user according to the help below document:

    Using creative cloud | Manage your creative cloud to the membership of the teams

    Kind regards

    Sheena

  • vCenter log files entries for the new virtual machine or distributed groups of ports

    All,

    I can't find the entries for the new virtual machine or distributed groups of ports in the vpxd.log file.

    Any suggestions?

    Thank you

    This kind of info are in the DB vCenter.

    Not in the logfile (used for debugging purposes).

  • Difference between groups of ports and VLANS

    Hi guys

    I read ESX Admin guide 2 times till now, but I still don't know what exactly is the difference between groups of ports and VLANS? I understand, but if someone asks me this question I will not be able to respond with confidence.

    Network also label: my understanding is that it's just label No technical significance in configuration?

    Thanks in advance

    One VLAN is one of the many settings that you can configure for a group of ports, you also have the tabs security, Traffic Shaping and consolidation of NETWORK cards.

    Port group name, you associate you a VM port group must be placed systematically on other hosts if you want to migrate or virtual failover from one host to another.

    Scott.

    -

Maybe you are looking for

  • A white horizontal line may appear in the header bar

    Hi allI use firefox 25.0.1 and OS is Windows 8.1. Since one day I am facing a problem that a white line appears in the header bar, attach the screenshot. Sometimes it appears and will disappear automatically, Please tell me if anything I can do to so

  • Satellite A110-178: is it possible to update a graphics card?

    Hey people I have a satellite A110-178 and I was wondering if I could install a better video in card.Can someone tell me if this is possible. Greetz

  • My W510 Iconia Tablet won't boot to the top.

    I had my W510 Iconia for barely a year.  I use it for business travel because it is light and compact.  I am a very "basic" user - email, internet browsing, that's all. One day, I went to start my Tablet and it never reached the homepage - the "twirl

  • Problems installing ZTE made map of internet data MTS on Vista

    Hi all I had problems installing a basic manufactured ZTE map of MTS internet data on my 32 bit Edition operating system, Windows Vista family. It's a HP Pavilion Desktop PC. When I install the data card a pop-up box comes up saying SETUP.exe. Then I

  • ANALYSIS QUESTION - OFFICEJET PRO 8600 - ALL-IN-ONE

    I HAVE A HP OFFICEJET PRO 8600 PREMIUM E ALL IN ONE-N911N PRINTER.  I haveHAS RECENTLY HAD SOME PROBLEMS WITH THE SOFTWARE/DRIVERS DESKTOP, WHERE THESOFTWARE DOES NOT OPEN ON MY DESTOP.  I CONTACTED HP TECHNICAL SUPPORT. THEYTOOK CONTROL OF MY DESKTO