Citrix

13K

Solutions

9K

Contributors

Citrix is the synonym for the virtualization and application infrastructure systems developed by the company of the same name. Main areas are application virtualization, Software-As-A-Service (SaaS), cloud-computing and networking. The two most well-known are Citrix XenApp or Citrix CloudPlatform.

Share tech news, updates, or what's on your mind.

Sign up to Post

Hi Everyone. I would like to share a basic but working PowerShell script to clean up the Windows 2016 Start Menu (from ProgramData and Default User) and the Public Desktop. This is useful when using a Workspace Manager like RES or Citrix WEM. I've added this script at shutdown (local GPO) so we do not need to manually clean-up the folders after every application update or new installations.

#Start Menu Clean-up at Shutdown 

Robocopy "C:\ProgramData\Microsoft\Windows\Start Menu\Programs" "C:\StartMenu\ProgramData\Programs"  /e /is /move /xj /r:0 
New-Item "C:\ProgramData\Microsoft\Windows\Start Menu\Programs" -ItemType "directory"
Robocopy "C:\StartMenu\ProgramData\Programs\Administrative Tools" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Administrative Tools" /e /xj /r:0 

Robocopy "C:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs" "C:\StartMenu\Default\Programs" /e /is /move /xj /r:0 
New-Item "C:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs" -ItemType "directory"

#Desktop clean-up at shutdown

Robocopy "C:\Users\Public\Desktop" "C:\StartMenu\Public\Desktop" /e /is /move /xj /r:0 
New-Item "C:\Users\Public\Desktop" -ItemType "directory"
Robocopy "C:\Users\Default\Desktop" "C:\StartMenu\Default\Desktop" /e /is /move /xj /r:0 
New-Item "C:\Users\Default\Desktop" -ItemType "directory"

Open in new window

0
Ensure Business Longevity with As-A-Service
Ensure Business Longevity with As-A-Service

Using the as-a-service approach for your business model allows you to grow your revenue stream with new practice areas, without forcing you to part ways with existing clients just because they don’t fit the mold of your new service offerings.

Enforce File Type Associations

In a Windows 2016 published Desktop, Citrix users are able to use the "Open with..." command in the context menu and set their own file type association. This is by design. One solution to enforce the FTA at logon is to use the "SetUserFTA" software from Christoph Kolbicz's Blog or to use a GPO to assign a "Default Associations Configuration File" (thanks to McKnife) . Another way is to detect and remove user defined File Type Associations in the registry via a script. The registry key is locked down with a "Deny" access control set to everyone including the Administrators. The following script will remove the "Deny" access control, and then proceed to the deletion of the user defined file type association. This script runs at logon and at logoff and have been tested successfully.

# REMOVE HKCU File Type Association
# in addition to OEMDefaultAssociation.xml
Function RegACL-Reset
{
$hkey = 2147483649 
$reg = [wmiclass]"root\default:StdRegProv"
$ace = $reg.GetSecurityDescriptor($hkey,$hsubkey).Descriptor.DACL
$reg.psbase.Scope.Options.EnablePrivileges = $true
$sd = ([WMIClass] "Win32_SecurityDescriptor").CreateInstance()
$sd.ControlFlags = 0x0004
for($i=0;$i -lt $ace.length;$i++)
{
 if($ace[$i].AceType -ne 1)
 {
  $SD.dacl += $ace[$i] 
 }
}
$reg.SetSecurityDescriptor($hkey,$hsubkey,$sd)
}

# .XML - Remove user defined .XML file type association
$testreg = Test-Path -Path 

Open in new window

1
LVL 64

Expert Comment

by:McKnife
Fine. And no hard feelings, I hope :-)
At least I learned that there are some policies which have no effect when not domain-joined - for whatever reason Microsoft enforces this...
0
LVL 4

Author Comment

by:Olivier MARCHETTA
No worries :-).
0
Get users profile folder size via PowerShell

Long story short, this is the script I've found and is the most accurate / reliable in my experience when used in recurse mode on Citrix user profiles to get the profiles size:

function Get-FolderSize {
 [CmdletBinding()]
Param ( 
[Parameter(Mandatory=$true,ValueFromPipeline=$true)]
$Path, [ValidateSet("KB","MB","GB")]
$Units = "MB"
)   

if ( (Test-Path $Path) -and (Get-Item $Path).PSIsContainer ) {
     $Measure = Get-ChildItem $Path -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum     
$Sum = $Measure.Sum / "1$Units"
    [PSCustomObject]@{
       "Path" = $Path
      "Size($Units)" = $Sum
    }
   }
 }

Open in new window

1
Install and run a Microsoft Access application with one click

A revised article on this topic has been published:
Deploy and update a Microsoft Access application with one click
Microsoft Access on Windows 10
Deploying a Microsoft Access application in a normal Windows environment is not difficult but takes a few steps. The method and script provided here will - literally - turn the process into a one-click process for the user, even in a Citrix environment.
0
Hello Team,
when saving an email in outlook 2010 or use the drag and drop, I get the following error msg
"This operation has been cancelled due to restrictions in effect on this computer" please contact your administrator.
however, when you close the error it will let  you save the file.

anyone has seen this issue before?
kindly please advise
thank you
0
LVL 28

Administrative Comment

by:Andrew Leniart
Hi CondoGEEKS,

What you have done is made a "Post" here.  To get expert help, you need to "Ask a Question" so that more experts are able to see that you need help. Click the Big blue button near the top of your screen.

Ask a Question

The following link also explains more about asking for help at Experts Exchange..
http://support.experts-exchange.com/customer/portal/articles/336330

Hope that's helpful.

Regards,
Andrew
EE Topic Advisor
0
Xenapp 6.5 Intermittent issues since KB4012215 (WannaCry security fix)

Hi All,

Ever since we installed KB4012215 as part of MS recommended protection against ransomware\ 'Wannacry' into our Windows 2008 R2 Xenapp 6.5 base image we've seen constant intermittent issues with file handles and permissions related to user profiles, UPM, Office applications and RDS.

Issue 1 - when user logs on\ launches a session:  
Word - 'your autocorrect file C:\users\user\appdata\roaming\microsoft\office\MSO3081.acl could not be saved - click OK 'Word cannot open the existing file normal.dot'

Issue 2- when user logs on\ launches a session:
Outlook signature file goes missing for customers - they'll add and then they'll lose it again on another session later.

There seem be weird file and handler locks and registry handles not being released properly or quickly enough after logon. i.e. an application wont recognise required datafiles (XML) in user\ \appdata\roaming profile folder even though the file\ folder definitely exists and can be written to.
To our frustration we cannot replicate the problem however it seems that the issues manifest when a user logs onto a specific CITRIX server the first time around and then relaunch an application session on THAT server again within a given timeframe. Testing further indicates that if a user is logged off completely and then they log back onto that same server the issue is NOT present.
A server …
0

Author Comment

by:loubot loubot
thank you Andrew- I have now done so

Appreciate your time to assist :)
0
LVL 28

Expert Comment

by:Andrew Leniart
My pleasure. Good luck with your question :)
0

Citrix

13K

Solutions

9K

Contributors

Citrix is the synonym for the virtualization and application infrastructure systems developed by the company of the same name. Main areas are application virtualization, Software-As-A-Service (SaaS), cloud-computing and networking. The two most well-known are Citrix XenApp or Citrix CloudPlatform.