Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Citrix WEM 1909 - Agent is not detected #139

Closed
citrixguyblog opened this issue Sep 25, 2019 · 10 comments

Comments

@citrixguyblog
Copy link

@citrixguyblog citrixguyblog commented Sep 25, 2019

With Citrix WEM 1909 the service name changed (new installation) and is not detected by BIS-F anymore.

  • No WEM Cache will get redirected
  • When working with MCS/PVS the Targets are not capable of refreshing the cache

Script: 90_PrepBISF_CTX.ps1
Line: 249

#Citrix Workspace Environment Management Agent
function Set-WEMAgent {
$product = "Citrix Workspace Environment Management (WEM) Agent"
$services = "Norskale Agent Host Service", "Citrix WEM Agent Host Service"
$AgentCacheFolder = "WEMAgentCache" # -> $LIC_BISF_CtxPath$AgentCacheFolder

    foreach ($service in $services)
    {
     $svc = Test-BISFService -ServiceName "$service" -ProductName "$product"
	 IF ($svc -eq $true) {
        $servicename = $service
		Invoke-BISFService -ServiceName "$servicename" -Action Stop
        
    }
@citrixguyblog

This comment has been minimized.

Copy link
Author

@citrixguyblog citrixguyblog commented Sep 25, 2019

Here is the modification for the Personalisation:

Script: 02_PersBISF_CTX.ps1
Line: 145

#Citrix Workspace Environment Management Agent 
$product ="Citrix Workspace Environment Management (WEM) Agent"
$services = "Norskale Agent Host Service", "Citrix WEM Agent Host Service"

foreach ($service in $services)
 {
   $svc = Test-BISFService -ServiceName "$service" -ProductName "$product"

   	IF ($svc -eq $true)
    {
     $servicename = $service
	 Invoke-BISFService -ServiceName "$servicename" -Action Stop
	 Start-Sleep $Wait1
	 Invoke-BISFService -ServiceName "$servicename" -Action Start
	 Invoke-BISFService -ServiceName "Netlogon" -Action Start	
	
	 #read WEM AgentAlternateCacheLocation from registry
	 $REG_WEMAgent = "HKLM:\SYSTEM\CurrentControlSet\Control\Norskale\Agent Host"
	 $WEMAgentLocation = (Get-ItemProperty $REG_WEMAgent).AgentLocation
	 Write-BISFLog -Msg "WEM Agent Location: $WEMAgentLocation"

	 #read WEM Agent Host BrokerName from registry 
	 $REG_WEMAgentHost = "HKLM:\SOFTWARE\Policies\Norskale\Agent Host"
	 $WEMAgentHostBrokerName = (Get-ItemProperty $REG_WEMAgentHost).BrokerSvcName
	 IF (!$WEMAgentHostBrokerName) {Write-BISFLog -Msg "WEM Agent BrokerName not specified through WEM ADMX" } ELSE {Write-BISFLog -Msg "WEM Agent BrokerName: $WEMAgentHostBrokerName"}

	 $WEMAgentCacheUtil = "$WEMAgentLocation" + "AgentCacheUtility.exe"
		 
	
	 Write-BISFLog -Msg "Running Agent Cache Management Utility with $product BrokerName $WEMAgentHostBrokerName " -ShowConsole -Color DarkCyan -SubMsg
	 Start-BISFProcWithProgBar -ProcPath "$WEMAgentCacheUtil" -Args "-RefreshCache" -ActText "Running Agent Cache Management Utility" | Out-Null
	 
}
 }
@matthias-schlimm

This comment has been minimized.

Copy link
Collaborator

@matthias-schlimm matthias-schlimm commented Sep 25, 2019

thanks Julian, if you aware with Github pull request are welcome too and easier to handle :-)

@citrixguyblog

This comment has been minimized.

Copy link
Author

@citrixguyblog citrixguyblog commented Sep 25, 2019

Going to install a new master when I find some free time and verify if everything is working as expected.
After this I will try to do a pull request. See you tomorrow @VCBAWUE

@chezzer64

This comment has been minimized.

Copy link

@chezzer64 chezzer64 commented Sep 25, 2019

I've also come across this issue and was going to suggest the relevant code update to support both old and new WEM Agent Service names. Looking at the proposed code fix, I'd recommend using the service name rather than display name i.e. WemAgentSvc rather than "Citrix WEM Agent Host Service".

Also, I've noticed that when using the the Citrix Cloud WEM Service, the WEM Agent uses reg key "HKLM:\SOFTWARE\Policies\Norskale\Agent Host\CloudConnectorList" instead of "HKLM:\SOFTWARE\Policies\Norskale\Agent Host\BrokerSvcName". Would be nice to get this supported in the code update - though it is only cosmetic (reported in the BIS-F Log) and not actually used in any commands from what I can see.

Happy to help with the PR if required?

@matthias-schlimm

This comment has been minimized.

Copy link
Collaborator

@matthias-schlimm matthias-schlimm commented Sep 25, 2019

@citrixguyblog

This comment has been minimized.

Copy link
Author

@citrixguyblog citrixguyblog commented Sep 26, 2019

@chezzer64: Can you send me your e-mail address? Implemented your suggestion with the service name and the CloudConnectorList.

@chezzer64

This comment has been minimized.

Copy link

@chezzer64 chezzer64 commented Sep 26, 2019

@citrixguyblog - you can reach me at chezzer64.github @ outlook.com

@citrixguyblog

This comment has been minimized.

Copy link
Author

@citrixguyblog citrixguyblog commented Oct 2, 2019

Here is the updated script code.
02_PersBISF_CTX_wem1909.txt
90_PrepBISF_CTX_wem1909.txt

Thanks @chezzer64 for doing some changes and final testing.

@matthias-schlimm

This comment has been minimized.

Copy link
Collaborator

@matthias-schlimm matthias-schlimm commented Oct 3, 2019

@citrixguyblog @chezzer64 included now in Bugs Bunny Release

@matthias-schlimm

This comment has been minimized.

Copy link
Collaborator

@matthias-schlimm matthias-schlimm commented Oct 3, 2019

Please note this ADMX extension: Configure WEM Cache to persistent drive #11 must be done as well

Releae 7 1912 - Codename Bugs Bunny automation moved this from In progress to Done Oct 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.