Quantcast
Channel: VMware Communities: Message List - VMware View
Viewing all 19267 articles
Browse latest View live

Looking for a script to remove VMs (Not delete)

$
0
0

As the subject says - I'm looking for a script to remove vms from Horizon View Mgmt.

After much research I've hit a brick wall as the PowerCLI does nto have this cmdlet so I need an alternate way of doing this

 

Thanks in advance!


Re: Script to look and add free vms in pool

$
0
0

So when I suggested to remove individual users from pool entitlement this is why. This means there is a user assigned to a pool. The script tries to do get-ADgroupmember on a user and returns that error.

I added some logic to it so that it handles that situation better. I'll repost the entire script so take the pieces that you need.

 

#This script will autamtically increaese the Maximum amount of Machines in a Linked CLone Pool based on the number of entitled users. It increases the total by a user specificied setting.

#Jose Rodriguez (jrodsguitar)

#https://get-cj.com

 

#Change these settings to match your environment ###########################################################

$viewserver="NAME_OF_SERVER" 

#$poolDisplayName = 'DISPLAY_NAME_OF_POOL'

 

#Buffer number of machines to increase pool by. Change this based on your estimated needs.

#The script will increase the max number of machines by (Total Amount of entitled users - The difference of Total Machines in pool) + $machineBuffer

#So if the total amount of machines is 3 and the total number of entitled users is 5. We need 2 machines right? So the script will add 2 machines + $machineBuffer.

 

$machineBuffer=1

 

#If totla machines to add is greater or equal to 50 don't do it. This is a precautionary measure in case someone adds too many users to the entitled AD group.

$threshold=2

############################################################################################################

 

if($cred-eq$null){

$cred=Get-Credential

}

 

if($connect-eq$null){

$connect=Connect-HVServer-server$viewserver

}

 

$session=New-PSSession-Computername$viewserver

#Define a scriptblock to run - $computer is set to the first argument, $variable to the second 

$scriptBlock=

 

#Initialize variables and load modules for horizon on remote connection server.

 

Set-Variableproduct_name"VMware View PowerCLI"-scopePrivate

Set-Variableview_snapin_name"VMware.View.Broker"-scopePrivate

Set-Variablepowercli_snapin_name"VMware.VimAutomation.Core"-scopePrivate

Set-Variablepowercli_product_name"VI Toolkit / VSphere PowerCLI"-scopePrivate

 

# Load View Snapin

$ViewSnapinLoaded=Get-PSSnapin|Where { $_.Name -eq$view_snapin_name }

if(!$ViewSnapinLoaded){

write-host"Loading $product_name"

 

# Install or Re-register View Cmdlets

$installpath= (get-itemproperty"HKLM:\Software\VMware, Inc.\VMware VDM").ServerInstallPath

 

$NetFrameworkDirectory= $([System.Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory())

set-aliasinstallUtil (Join-Path$NetFrameworkDirectory"InstallUtil.exe")

 

$null= (installUtil ($installpath  +"\bin\PowershellServiceCmdlets.dll"))

 

add-PSSnapin$view_snapin_name

} else {

write-host"$product_name snapin already loaded."

}

 

# Load VI Toolkit/PowerCLI if available

$VimAutomationInstalled=Get-PSSnapin-Registered|Where { $_.Name -eq$powercli_snapin_name }

if($VimAutomationInstalled){

$VimAutomationLoaded=Get-PSSnapin|Where { $_.Name -eq$powercli_snapin_name }

if(!$VimAutomationLoaded){

write-host"Loading $powercli_product_name"

add-PSSnapin$powercli_snapin_name

} else {

write-host"$powercli_product_name already loaded"

}

}

 

Remove-Variableproduct_name-scopePrivate

Remove-Variableview_snapin_name-scopePrivate

Remove-Variablepowercli_snapin_name-scopePrivate

Remove-Variablepowercli_product_name-scopePrivate

 

Add-PSSnapinvmware.view.broker 

 

 

#Run script to intialize remote session

Invoke-Command-Session$session-ScriptBlock$scriptBlock

 

#Import remote session and prefix commands with 'VDI'

$importsession=Import-PSSession-Session$session-PrefixVDI-ModuleVMware*

 

$pools=get-vdipool

 

foreach($poolin$pools){

#Gather Pool data

#$pool = (Get-VDIPool -DisplayName $poolDisplayName)

$PoolEntitlments=Get-VDIPoolEntitlement-Pool_id $pool.pool_id

$maxmachines=$pool.maximumCount

 

$userGroupCheck=$null

$poolUsers=$null

$poolGroups=$null

$entitledusers=$null

 

#Counts the number of users in the AD group that is entitled to the pool

$userGroupCheck=  ($PoolEntitlments|foreach {Get-ADObject$_})

$poolUsers= @($userGroupCheck|   where {$_.objectclass -eq'user'}).Count

$poolGroups=  @($userGroupCheck|   where {$_.objectclass -eq'group'}).Count

 

$entitledusers=$poolUsers+$poolGroups

 

#If entitled users is greater than the amount of entitles users than increase the max machines in the pool by $newMaxIncrease

if($entitledusers-ge$maxmachines ){

 

$newMaxMachines= ($entitledusers-$maxmachines) +$machineBuffer

$total=$newMaxMachines+$maxmachines

 

If($total-le$threshold){

 

Update-VDIAutomaticLinkedClonePool-MaximumCount$newMaxMachines-MinimumCount$newMaxMachines-Pool_id$pool.pool_id

#Update-VDIAutomaticPool -MaximumCount $newMaxMachines -MinimumCount $newMaxMachines -Pool_id $pool.pool_id

 

Write-Output"Increasing Max machines $($pool.pool_id) from $maxmachines to $total machines"

}

 

else{

 

Write-output"$threshold is too big. Aborting the process"

 

}

 

}

 

 

}

 

Get-PSSession|Remove-PSSession

 

Re: Looking for a script to remove VMs (Not delete)

$
0
0

Please explain what you want to do. You don’t want to delete a Vm from Horizon but you want to remove it. Does that mean you still want to keep the VM but remove it from being managed by Horizon?

VMWare Horizon View Install - No reboot - MDT

$
0
0

Hi All,

 

We currently use VMware Horizon View Client on all our laptops to allow users to connect to our VDI environment. Our laptops are running Windows 10.

 

As part of our Image deployment using Microsoft Deployment Toolkit Horizon Client is installed.

 

During the Horizon Client install Horizon client forces the machine to reboot causing a dirty deployment message once the machine has started back up again.

 

I have seen several different topics on this subject but none of the solutions we have tried work. Here is what i have tried;

 

1. Installing Horizon View Client with the /norestart switch.

2. Creating a script to install all the dependencies ( Visual C++) before Horizon client, also with the /norestart switch.

3. Add all the dependencies into MDT as applications and list them under Horizon Client as required. All still have the /norestart switch.

 

If I run any scripts manually the machine does not reboot but for some reason it still reboots when the script is ran via MDT. None of the applications in MDT have the (restart required) ticked.

 

I also kept refreshing the Programs and Features during installation. All of the Visual C++ install fine, Horizon View client also shows up in the programs list but the machine is then force rebooted. After restarting Horizon View is no longer in the programs list and only re-appears after MDT resumes the install.

 

I'm at a total loss as to why it keeps doing this when all applications and dependencies have the norestart switch.

 

Would really appreciate any help on the issue and if anybody has managed to deploy via MDT.

 

Thanks

Re: Looking for a script to remove VMs (Not delete)

$
0
0

That's exactly what I need.

 

Horizon View Management Console is just managing the desktops IN vCenter. I want to remove the desktop from the Horizon View pool in the management console but not delete it from vCenter.

 

Reason - Users have a full clone and when they leave the company we want to be able to retain the desktop for 45 days in vCenter (powered off) but not have it listed in the Horizon View Pool any longer. We currently have it automated to mark custom attributes in the VM and power it off and moved to a specific folder in vCenter, we just need to be able to remove it from Horizon with an automated process/script to complete the task. (We do not have vRO/vRA).

 

Thanks for the reply!

Auto Reconnect on Horizon View 4.7

$
0
0

I have install Horizon view 4.7 on a windows 10 desktop. It connected with server without any problems. However, it disconnects after 15 mins. of inactivity. The previous version had an auto reconnect option. Does this feature exist under this version.

 

Regards

Re: VMWare Horizon View Install - No reboot - MDT

$
0
0

As a test, if you don't install the Horizon client with MDT does it still reboot? I'm thinking something other than the Horizon client is forcing the reboot, maybe one of  the tasks in MDT?

Re: Auto Reconnect on Horizon View 4.7

$
0
0

With View Client 4.7 version we have "AutoConnect to this Server" option.

autoconnect.PNG


Re: VMWare Horizon View Install - No reboot - MDT

$
0
0

This works for us using SCCM (Either during imaging of the machine or a software upgrade). We first install the dependencies (Visual C++) and then install the Horizon Client.

Re: VMWare Horizon View Install - No reboot - MDT

$
0
0

Have you tried it this way?

 

VMware-Horizon-Client.exe /S /V"/qn REBOOT=Reallysuppress"

Re: Looking for a script to remove VMs (Not delete)

$
0
0

I think one way to do this is to:

 

  1. Clone existing VM to new VM
  2. Remove / Delete original VM from Horizon
  3. Remove Horizon Agent from new cloned VM.

 

Since you  are already using automation, you could probably incorporate some of the code from my remove-HVMachine function to accomplish step 2.

 

So ironically you will end up deleting VM. At least the original

 

https://get-cj.com/2018/04/07/delete-vmware-horizon-machine-using-powercli-horizon-api/

 

It's very straight forward to use:

 

remove-HVMachine-cred$cred-viewserver$viewserver-machine$machine

Re: VMWare Horizon View Install - No reboot - MDT

$
0
0

Which version of Horizon Client are you using. With Horizon Client 4.5 VMware switched from "REBOOT=Reallysuppress" to "/norestart".

 

This is working for us.

C:\Windows\Temp\VMware-Horizon-Client-4.7.0-7395453.exe /silent /norestart /log "C:\Windows\Temp\VMware-Horizon-Client-4.7.0-7395453.log ADDLOCAL=TSSO INSTALL_SFB=0 INSTALL_HTML5MMR=0 REMOVE=Scanner,FolderRedirection,SerialPort AUTO_UPDATE_ENABLED=0

Re: Script to look and add free vms in pool

$
0
0

This script works perfectly fine. Thank for summarizing the various comments and redrafting the script. Appreciate your help.

Re: VMWare Horizon View Install - No reboot - MDT

$
0
0

Hi All,

 

Just to give you an update on this, it looks like I've managed to resolve the issue.

 

Somewhere between testing the scripts locally and then adding into MDT the source files for c++ got mixed up.

 

Turns out I actually added 14.24123 instead of 14.24212 so VMware wasn't picking up the correct C++ as already installed then installing over the top and causing the machine to reboot.

 

Thanks for all the suggestions.

Zero Client for Blast Extreme and Nvidia vGPU

$
0
0

We currently have HP T310 PCOIP clients and need some more.

 

We are not too happy with how PCOIP works with AutoCAD so are looking at moving over to Blast Extreme as it seems to be better and as VMware are phasing support for PCOIP out, i guess its a move in the right direction.


Can anyone recommend some good Zero Clients for Blast Extreme that work well with Nvidia cards (M60) for AutoCAD/Revit use?


VMware View Message Bus

$
0
0

How do I increase the default ssl certificate duration from the default 180 days?

 

In my vdm logs I see

<pool-2-thread-1> [MessageBusCertificateGeneration] MQ Router SSL keysize: 2048

<pool-2-thread-1> [MessageBusCertificateGeneration] MQ Router validty period: 180 DAYS

<pool-2-thread-1> [MessageBusCertificateGeneration] Router SSL Check interval: 3600s

Re: Zero Client for Blast Extreme and Nvidia vGPU

view 6.0 许可证在哪里找?

$
0
0

horizon view 6.0 找不到试用版的许可证 ,怎么处理

Re: Zero Client for Blast Extreme and Nvidia vGPU

$
0
0

That's a thin client not a zero client.

Re: view 6.0 许可证在哪里找?

Viewing all 19267 articles
Browse latest View live




Latest Images