XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Home
    2. JonathanPitre
    J
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 1
    • Groups 0

    JonathanPitre

    @JonathanPitre

    0
    Reputation
    3
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    JonathanPitre Unfollow Follow

    Latest posts made by JonathanPitre

    • RE: [Windows Guest Tools] Cleaner Tool

      Here's a copy of a script I was using to clean XenTools from XenServer 6.0 I believe. Please include all the reg keys and files mentioned. Thanks!

      $appName = 'Citrix Tools for Virtual Machines'
      $appFileName = 'uninstaller.exe'
      $appParameters = '/S /NORESTART'
      $appSourcePath = "${env:ProgramFiles(x86)}\Citrix\XenTools"
      If (($ComputerManufacturer -ne "Xen") -and (Get-InstalledApplication -Name $appName))
      {
          Write-Log -Message "Uninstalling $appName ..." -WriteHost $True -LogType 'CMTrace'
          # http://discussions.citrix.com/topic/347782-unable-to-installuninstall-xen-tools
          Execute-Process -Path "$appSourcePath\$appFileName" -Parameters $appParameters -CreateNoWindow -PassThru
          Remove-Folder -Path "$appSourcePath"
          Remove-File -Path "$env:windir\System32\xennetco.dll"
          Remove-File -Path "$env:windir\System32\drivers\xen*.sys"
          Remove-File -Path "$env:windir\System32\drivers\scsifilt.sys"
          Remove-File -Path "$env:windir\System32\drivers\xevtchn.sys"
          Remove-RegistryKey -Key 'HKLM:\SOFTWARE\Citrix\XenTools' -Recurse
      
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\CurrentControlSet\services\scsifilt' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\CurrentControlSet\services\xenvbd' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\CurrentControlSet\services\xenevtchn' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\CurrentControlSet\services\xennet' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\CurrentControlSet\services\xenvif' -Recurse
      
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet001\services\scsifilt' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet001\services\xenvbd' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet001\services\xenevtchn' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet001\services\xennet' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet001\services\xenvif' -Recurse
      
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet002\services\scsifilt' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet002\services\xenvbd' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet002\services\xenevtchn' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet002\services\xennet' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet002\services\xenvif' -Recurse
      
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\CurrentControlSet\services\eventlog\Application\Citrix Xen Guest Agent' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\CurrentControlSet\services\eventlog\Application\xenbvd' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\CurrentControlSet\services\eventlog\Application\xenevtchn' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\CurrentControlSet\services\eventlog\Application\xeniface' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\CurrentControlSet\services\eventlog\Application\xennet' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\CurrentControlSet\services\eventlog\Application\xennet6' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\CurrentControlSet\services\eventlog\Application\xensvc' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet002\services\eventlog\Application\xenvif' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\CurrentControlSet\services\eventlog\System\scsifilt' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\CurrentControlSet\services\eventlog\System\xenevtchn' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\CurrentControlSet\services\eventlog\System\xenvbd' -Recurse
      
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet001\services\eventlog\Application\Citrix Xen Guest Agent' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet001\services\eventlog\Application\xenbvd' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet001\services\eventlog\Application\xenevtchn' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet001\services\eventlog\Application\xeniface' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet001\services\eventlog\Application\xennet' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet001\services\eventlog\Application\xennet6' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet001\services\eventlog\Application\xensvc' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet002\services\eventlog\Application\xenvif' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet001\services\eventlog\System\scsifilt' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet001\services\eventlog\System\xenevtchn' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet001\services\eventlog\System\xenvbd' -Recurse
      
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet002\services\eventlog\Application\Citrix Xen Guest Agent' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet002\services\eventlog\Application\xenbvd' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet002\services\eventlog\Application\xenevtchn' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet002\services\eventlog\Application\xeniface' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet002\services\eventlog\Application\xennet' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet002\services\eventlog\Application\xennet6' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet002\services\eventlog\Application\xensvc' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet002\services\eventlog\Application\xenvif' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet002\services\eventlog\System\scsifilt' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet002\services\eventlog\System\xenevtchn' -Recurse
          Remove-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet002\services\eventlog\System\xenvbd' -Recurse
      
          Set-RegistryKey -Key 'HKLM:\SYSTEM\ControlSet001\Control\Class\{4D36E967-E325-11CE-BFC1-08002BE10318}' -Name 'LowerFilters' -Value '' -Type MultiString
      
          If (Get-Service "XenSvc" -ErrorAction 'SilentlyContinue'){(Get-WmiObject -Class Win32_Service -Filter "Name='XenSvc'").Delete()}
          If (Get-Service "XenPVInstall" -ErrorAction 'SilentlyContinue'){(Get-WmiObject -Class Win32_Service -Filter "Name='XenPVInstall'").Delete()}
          Get-WmiObject -Query "SELECT * FROM __Namespace WHERE Name='xenserver'" -Namespace "root\cirix" -ErrorAction SilentlyContinue | Remove-WmiObject
      } 
      ElseIf (($ComputerManufacturer -eq "Xen") -and (Get-InstalledApplication -Name $appName)) 
      {
          Write-Log -Message "$appName is already installed." -WriteHost $True -LogType 'CMTrace'
      }
      Else
      {
          Write-Log -Message "Not a Citrix XenServer virtual machine." -WriteHost $True -LogType 'CMTrace'
      }
      
      posted in Development
      J
      JonathanPitre