Assigning static mac address via powershell

Hey,
in our company i have to change the mac addresses of all vms from dynamic to static.
so i wrote a little script, but the macadress wont swtich to static..
here is what i did, maybe you can help me (im new to powershell)
$vmname = "gpotest"
foreach($vm in $vmname)
$macaddress = get-vm -name $vm | get-VMNetworkAdapter | fl MacAddress
$macaddress = $macaddress | Out-String
$macaddress = $macaddress.Substring(17)
$macaddress = $macaddress.Insert(0,'"')
$macaddress = $macaddress.insert(13,'"')
get-vm -name $vm | get-VMNetworkAdapter | set-VMNetworkAdapter -StaticMacAddress $macaddress
thanks in advance

Please check the link below. I believe it answers most of your questions.
http://www.cisco.com/en/US/products/ps6441/products_configuration_guide_chapter09186a008071c342.html#wp1074511
regards,
Leo

Similar Messages

  • How do I assign static ip address on time capsule

    I want to assign static ip addresses to certain devices in my home but not sure how to do it through the iMac and Air Port/time capsule

    Not sure as I don't own an Apple router but on mosdt modern routers there is a way to set, that is SET, a constant IP for devices by their MAC address, that is Mac, Media Access Control address not Mac computer.
    I would think Apple has included that feature in their Airport routers.

  • Hyper-V Static MAC Address Best Practice

    Hi guys,
    Looking for some advice please..
    We have several VM's running within a 6 node cluster that run an application which keeps losing it's license whenever the LAN MAC changes i.e. when the VM moves to a new node.
    The obvious solution is to set these VM's with a STATIC MAC address however I have a few questions.
    1. Is there a 'private' range I can use to ensure that we never see any conflicts?
    2. What's the best way to implement this change? simply power off each machine and manually edit the settings or can I use SCVMM?
    3. Will the VM's lose there current network card settings? static ip etc?
    4. Will VM's set with a static MAC still fail over to other nodes?
    Many thanks for your help
    Robbie

    For an answer you're much better off posting in the Hyper-V forum here:
    https://social.technet.microsoft.com/Forums/en-US/winserverhyperv/threads
    This forum is for Virtual Server 2005, no similarities to Hyper-V.

  • How to assign static ip address to the server having solaris 10. i.e. nge0

    hi,
    how to assign static ip address to the server having solaris 10. i.e. nge0 i.e. 192.168.3.125 ipshold be persistantt across reboots. what steps do i need to follow to put all information including gateway,netmask etc..Also i want to integrate one init script ..can i integrate it using /etc/init.d/<service name> like linux. and do chkconfig on it?i am not getting complex procedure of SPF and FMRI etc..can u help me?

    Create a file in your /etc directory called hostname.nge0. Add the hostname of your system to this file. In your /etc/hosts file, assign the static IP address you want to the same hostname. You can then disable and enable the network-physical service to configure the network interface:
    svcadm disable network-physical
    svcadm enable network-physical

  • Static MAC address without configuration

    Hello,
    i am a german guy, so please excuse my bad english.
    I have a question about static MAC addresses on a WS-C3750G-48TS Switch.
    I have no static adresses configured on my switch, but see some when execute the "show mac address-table static" command. And i mean not the 0000.0c07.ac01 addresse for HSRP, Spanning-tree or something else, which are forwarded to the CPU, i mean entries like this:
    Switch#show MAC address-table interface g2/0/47
              Mac Address Table
    Vlan    Mac Address       Type        Ports
       3    1212.1212.1212    STATIC      Gi2/0/47
       3    1414.1414.1414    STATIC      Gi2/0/47
    Total Mac Addresses for this criterion: 2
    This entries not configured or dynamicly learned.
    I suspected functions like gratitious-arp, but this is only for IP<->MAC translation. Then i have searched functions like gratitious-mac or mac-notification. I have searched for a function with tells the switchport: "Hey, that is my MAC address. There is no need to learn this address dynamicly", but with no luck.
    Does anybody can tell me, why these MAC addresses are shown static, and not dynamicly?
    Thanks for help.
    Thomas

    Hi Thomas,
    Are there any port-security related configurations in interface Gi2/0/47? Could you post the running-configuration of this interface in concern, output of show mac-address-table interface Gi2/0/47 and also could you let me know what is connected to this interface?
    Thanks,
    Arun

  • Assigning static port address

    Hello All,
    We are having a standalone BOE server. I have a doubt about assigning static port addresses to servers. We had a standard deployment of BusinessObjects 4.0 SP2. Our admin has assigned static request port address to APS, CMS, FRS, Crystal report servers and Dashboard server instead of using "Auto assign".
    Does it necessary to assign static port address to these servers and does it necessary to open these ports on firewall?
    What are the advantages of assigning static port address instead of using "Auto assign"?
    As per my understanding, request port of APS, FRS and other servers are used to communicate those with CMS. And CMS and all other servers are hosted on the same server. Then why do we need to open those ports on firewall in a server.
    Appreciate your help and suggestions.
    Thanks and Regards,
    Aashutosh

    Hi,
    if you dont have a Firewall in between your Client PCs and the BOE Server you dont need to assign static ports. You only need this if a Firewall is controlling the communication between these two parts.
    Most of the Services communicate only with the CMS - thats correct.
    But if you use the BI LaunchPad only for vieweing and creating Reports like WebI you need to open the Port 8080 for the Application Server.
    If you are using Front- End Clients for viewing and or editing Reports you need to open the CMS Port 6400 and assign a static Port to the IFRS and OFRS and open these ports too.
    Regards
    -Seb.

  • Cannot assign same MAC address to multiple ephones

    Hello,
    When i try to add a telephone IP to CME i got this message
    MAC address is already assigned with ephone 28.
    Cannot assign same MAC address to multiple ephones
    i delete the ephone 28 with this command
    #ephone 28
    #no mac-adress
    #exit
    no ephone 28
    and i try to add my phone i have always the same error message.
    and when i tap #show runing config i cant find no ephone with 28
    could you help me please.
    Thank you

    Assign a dummy mac address to ephone 28.

  • Static mac-address

    Hi
    static mac-address x.x.x.x vlan xx interface f0/0 interface f0/1
    if this packet come to switch, switch will send out two interface or load-share on each interface
    Thanks

    Hi,
    For interface-id, specify the interface to which the received packet is forwarded. Valid interfaces include physical ports and port channels. For interface-id, specify the interface to which the received packet is forwarded. Valid interfaces include physical ports or port channels. For static multicast addresses, you can enter multiple interface IDs. For static unicast addresses, you can enter only one interface at a time, but you can enter the command multiple times with the same MAC address and VLAN ID.
    Regards,
    Pravin

  • How to Assign Static IP address to iPad?

    I have been having a problem with the wifi connection on my iPad. After much research online, I have narrowed it down to an ip address lease renewal bug. The iPad drops connection when the ip address lease expires. The suggested fix is to assign a static ip address for the iPad based on its MAC address.
    How can I do this?

    I can't answer directly, but the following may help (for HH3B)
    Login to HomeHub
    Goto http://192.168.1.254/html/settings/a_ip_address.html
    Set the lease time to 21 days
    Apply
    Goto http://192.168.1.254/html/settings/a_devices.html
    Click on your iPad
    Choose 'always use this IP address'
    Apply

  • SG200-8 Static mac address problem

    Hi!
    My second problem with sg200-08 (firmware: SG200-08x_FW_1.0.6.2.stk) is when I try to add specific MAC address as secure:
    MAC Address Tables - Static Addresses - Add; insert vlan id, port, mac address and select "Secure":
    I get error message: "Error: Failed to Add 'Static Address' entry.
    Again, thanks for reply!
    Best regards,
    Boris Bahes.

    Moritz Lipfert wrote:I have the same problem using the current firmware 1.0.6.2. But even an upgrade by TFTP followed by a factory reset does not help. A downgrade to firmware 1.0.5.1 also does not fix this issue.Are there any other suggestions?
    Strange as it may sound, try playing with compatibility mode in Internet Explorer. I have found that these switches interface respond well only in IE.

  • Dynamic Vlan assignment by Mac address SF300-48P

    We are trying to configure a Cisco SF300-48P so that when we plug in a specific manufactures device the port is set to a specific VLAN.
    We have configured mac address groups and assigned the groups to the required VLANs but when we plug the devices in the auto assignment does not appear to be occurring ie. the specified vlan does not come up.
    Anybody any ideas?
    Thanks

    i would really like to know how to do this as well
    ive downloaded and installed packetfence but it doesnt have this type of switch on the list, only catalyst series
    did you ever get it figured out Andrew?

  • Assign applications to MakeModel via Powershell

    I am attempting to script adding Multiple make an models via PowerShell.  I need to know if I can add a LTI application to the makemodel ID via PowerShell assuming I have the application's GUID.

    Looks like that does no work either:
    PS C:\Users\Administrator\Documents> New-MDTMakeModel -make 'VMware, Inc. 001' -model 'VMware Virtual Platform' -settings @{Application001="5da3d622-c936-4ccc-836e-f5833da0d416"}
    Exception calling "ExecuteScalar" with "0" argument(s): "Invalid column name 'A
    pplication001'."
    At C:\Users\Administrator\Downloads\mdtdb\MDTDB.psm1:1177 char:43
    +         $null = $settingsCmd.ExecuteScalar <<<< ()
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : DotNetMethodException
    Added settings for the specified make model
    The Make and Model get added but the applications are not assigned.  I had copied the guid directly from the workbench.  What is interesting is that when something successfully is imported the list of all available options appear, however Application
    is not one of them.

  • HP LaserJet P1505n Printer frequently loses assigned static IP address and goes offiline

    We have replaced printer several times, assigned printer static ip to eliminate network related issues. Ran, Scan Doctor;
    - reinstalled printer drivers
    - power cyled printer
    - check for network connectivity
    - Printer works perfectly ( for a brief period of time.)
    What's mind boggling, ( if I may) is that IPv4 service was turned off when printer went offline. Logical right? Turned it back and it works for a while and goes offline again. Boggie man stops by that printer to turn-off network connections repeatedly. This is frustrating and makes my department look bad. May be we should try a different brand of printer. Any suggestions will be greatly appreciated.

    Hi gr---8 ,
    Sorry to hear you are still having issues setting up the printer on the wired network.
    We will need to find out if it is the Ethernet port on the printer, or the network causing this issue.
    Do you have Mac filtering on the router?
    Disconnect the Ethernet cable from the printer.
    Restore the printer back to factory settings.
    Print a hardware test page to test the printer's hardware. Make sure the SSID and IP address is cleared from your router's setttings. Printing a Configuration Page in Windows.
    Connect the Ethernet cable directly to the computer.
    Print the configuration page again to see if you get a IP address to test the Ethernet port on the printer.
    What is the IP address?
    Run the add printer wizard to install the printer.
    Test the printer.
    Were you able to see the printer, add the printer and print?
    What operating system are you using? How to Find the Windows Edition and Version on Your Computer.
    Please provide in detail the results.
    Have a nice day!
    Thank You.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Gemini02
    I work on behalf of HP

  • Populating Outlook 2013 auto-complete addresses via PowerShell

    Hello,
    I would like to use PowerShell to add auto-complete e-mail addressees to Microsoft Office Outlook
    2013. My understanding is that since Outlook 2010 was released, the NK2 file has been retired in favor of integrating the auto-complete addresses with the PST file (see link below). With that in mind, how can I manipulate the PST file to accommodate
    the auto-completion? Is there any documentation on the PST file structure that would allow me to inject this information into an existing PST? If a user has multiple PST files, how do you know which one contains the auto-complete entries — are they aggregated?
    http://social.technet.microsoft.com/Forums/office/en-US/f1edb3db-e28c-404b-8817-a3c001555b2d/missing-nk2-file
    Cheers,
    Trevor Sullivan
    If this post was helpful, please click the little "Vote as Helpful" button :)
    Trevor Sullivan
    Trevor Sullivan's Tech Room
    Twitter Profile

    "The NK2 file has been retired in favor of integrating the auto-complete addresses with the PST file"
    - I think this discription is not exactly.
    In fact, Outlook 2010/2013 reads the autocomplete stream
    from a message in the Associated Contents table of the Inbox of the mail account’s delivery store. (In another word, it is stored in mailbox site but is not on local). This
    hidden message has a message class and subject of IPM.Configuration.Autocomplete. The autocomplete stream is stored on this message in the PR_ROAMING_BINARYSTREAM property (PidTagRoamingBinary
    Canonical Property).
    Go back to your quesion, the autocomplete data, whatever belongs which mail account’s delivery store, is temporarily cached in an autocomplete .dat file located in %USERPROFILE%\AppData\Local\Microsoft\Outlook\RoamCache.
    More Reference:
    http://msdn.microsoft.com/en-us/library/office/ff625288.aspx
    An useful tool - NK2Edit to
    http://www.nirsoft.net/utils/outlook_nk2_edit.html
    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    Cheers,
    Tony Chen
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please contact
    [email protected]

  • 802.1x sticky mac address

    Hi,
    We have a problem with 802.1x configuration via IP Phone.
    PC (win7 with certificate)-------IP Phone (7911, 9.2.1s firmware)-----switch (2960, lab base 12.2(58)SE2)
    Configuration on the port on the switch:
    interface FastEthernet0/3
    switchport access vlan 699
    switchport mode access
    switchport voice vlan 746
    switchport port-security maximum 2
    switchport port-security
    switchport port-security mac-address sticky
    switchport port-security mac-address sticky 0019.dbdd.42d4
    switchport port-security mac-address sticky 001f.ca35.43c4 vlan voice
    srr-queue bandwidth share 10 10 60 20
    priority-queue out
    authentication event fail retry 0 action authorize vlan 357
    authentication event server dead action authorize vlan 82
    authentication event no-response action authorize vlan 357
    authentication event server alive action reinitialize
    authentication port-control auto
    authentication timer restart 0
    mls qos trust device cisco-phone
    mls qos trust cos
    macro description cisco-phone
    dot1x pae authenticator
    dot1x timeout tx-period 5
    auto qos voip cisco-phone
    spanning-tree portfast
    spanning-tree bpdufilter enable
    spanning-tree bpduguard enable
    service-policy input AutoQoS-Police-CiscoPhone
    After shutting down the PC, port are moving in the d0t1x unauthorized state, but it is also removing sticky MAC address from the port configuration! Without sticky keyword, with adding static mac address via portsecurity on the port, everything is working fine, but I can not understand why dot1x port state are also removing sticky mac address ?
    Most interesting part is that this is not happening if PC is directly connected to the switch, not via IP Phone.
    Any idea?
    Thank You in advance

    Hi Ted,
    802.1X supports the port-based autehnticaion only but you can use it along with port-security to limit the MAC-addresses on the ports.
    http://www.cisco.com/univercd/cc/td/doc/product/lan/cat3750/12119ea1/3750scg/sw8021x.htm
    HTH,
    -amit singh

Maybe you are looking for