VMware Cloud Community
mimo974
Contributor
Contributor

PowerCli command for vmnic

Hello everyone,

I cant find on website the command to make down and up a vmnic by PowerCli. I know how to start but not the last parameter. for example i want make down vmnic1.

$esxcli.network.nic.down but after which parameter i need to use ?

Methods :

Hastable CreateArgs()

boolean Invoke(Hastable args)

string Help()

Thank you for help.

0 Kudos
2 Replies
scott28tt
VMware Employee
VMware Employee

Moderator: Thread moved to the PowerCLI area.


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
0 Kudos
LucD
Leadership
Leadership

If you use the V2 switch, you have to use the Invoke() method with the arguments in a hash table.

$esxcli.network.nic.down.Invoke(@{nicname='vmnic0'})

See PowerCLI 6.3 R1: Get-ESXCLI Why the V2? for more details.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos