VMware Horizon Community
DaveARino
Contributor
Contributor
Jump to solution

Horizon 7 Powershell connect/disconnect NIC

I am new to the Horizon world, so please forgive if this is a 101 question.  I have downloaded all of the powershell modules/apis.  I can 'get' a ton of info about the HVMachines.  What I need to do is to disconnect the NIC on a specific HVMachine, then reconnect it later.

I can't really find a cmdlt that hints at anything like that, so it may not be a thing.  But if it is a thing, can someone point me in the right direction?

I'm hoping that if I can connect to the right "thing", I can maybe use the standard powercli to manage the hvmachine, or something.

Thank you for your time

Dave

Reply
0 Kudos
1 Solution

Accepted Solutions
DaveARino
Contributor
Contributor
Jump to solution

OK, for everyone's edification, the VIServer you need to connect to is the "Standalone Horizon Composer Server"  Then the standard powercli commands mostly work.

Thanks for the input folks.!

View solution in original post

Reply
0 Kudos
8 Replies
diegodco31
Leadership
Leadership
Jump to solution

Hi

please see whether https:VMware vSphere PowerCLI Cmdlets Reference helps.

Diego Oliveira
LinkedIn: http://www.linkedin.com/in/dcodiego
Reply
0 Kudos
DaveARino
Contributor
Contributor
Jump to solution

Hi Diego,

Thank you for your reply, but this seems to need Horizon specific commandlets. I've tried connecting to the connection servers, and I can get info on the machines, but I can't find much on modifying.

Reply
0 Kudos
RoderikdeBlock
Enthusiast
Enthusiast
Jump to solution

Hi,

To change the NIC settings of the VM you have to connect to your vcenter server using PowerLI "Connect-VIServer".

After that it possible to change the NIC configuration of a VM by using something like this:

Get-VM <YOURVM> | Get-NetworkAdpater | Set-NetworkAdpater -connected:$false startconnected:$false

Roderik de Block


Blog: https://roderikdeblock.com
Reply
0 Kudos
DaveARino
Contributor
Contributor
Jump to solution

Ho Roderik, in the Horizon environment, which server is the 'VI' server?  It's not the HV server, it won't connect using VIserver command?  The connection server?  Some other server I don't know about?

I'm telling you, I know very little about Horizon, but it does not seem to use the standard powercli cmdlets for much

Reply
0 Kudos
RoderikdeBlock
Enthusiast
Enthusiast
Jump to solution

VIServer is the vCenter server.

Roderik de Block


Blog: https://roderikdeblock.com
Reply
0 Kudos
DaveARino
Contributor
Contributor
Jump to solution

When I connect-VIServer to the Vcenter, and run the  get-vm command, all that is listed is the appvol, and connection servers.  not the desktops I need to manage.

Reply
0 Kudos
RoderikdeBlock
Enthusiast
Enthusiast
Jump to solution

Maybe there is another vcenter where the VDI's are running? You can see this in Horizon View Admin (in which vcenter the desktops are provisioned)

Roderik de Block


Blog: https://roderikdeblock.com
DaveARino
Contributor
Contributor
Jump to solution

OK, for everyone's edification, the VIServer you need to connect to is the "Standalone Horizon Composer Server"  Then the standard powercli commands mostly work.

Thanks for the input folks.!

Reply
0 Kudos