VMware Cloud Community
alfiek
Contributor
Contributor
Jump to solution

cannot bind parameter 'NetworkAdapter"

I want to disconnect the network adapters on 500 vm's - I created a new "Action" using the "Set-NetworkAdapter" command.

I have the following checked

Conncted

NetworkAdapter

NetworkName

StartConnected

WakeOnLan

Every time I try to run this I get the following error

cannot bind parameter 'NetworkAdapter" Cannot convert value "(Network Adapter 1)" to type "VMware.VimAutomation

I have tried entering the following

Network Adapter 1

"Network Adapter 1"

(Network Adapter 1)

Nothing works - what am I missing?

Thank you

Reply
0 Kudos
1 Solution

Accepted Solutions
scott_herold
Enthusiast
Enthusiast
Jump to solution

I've responded to your original question on the PowerGUI/VESI Virtualization/PowerShell forum.

Scott

View solution in original post

Reply
0 Kudos
3 Replies
LucD
Leadership
Leadership
Jump to solution

Did you do a Get-NetworkAdapter before ?

Normally you "pipe" the output from Get-NetworkAdapter to the Set-NetworkAdapter cmdlet.

Something like this:

get-vm <VM-name> | get-networkadapter | set-networkadapter <parameters>


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

Reply
0 Kudos
scott_herold
Enthusiast
Enthusiast
Jump to solution

I've responded to your original question on the PowerGUI/VESI Virtualization/PowerShell forum.

Scott

Reply
0 Kudos
alfiek
Contributor
Contributor
Jump to solution

That was it Scott - thanks for your help!

Reply
0 Kudos