Jump to content
Welcome to our new Citrix community!
  • 0

How to Use Citrix Optimizer tool


Saqib Afzal

Question

Hello All, 

 

Hope all is well.

 

I have a strange and possibly a silly question. The Citrix optimizer seems like a standard use program but I guess i am missing something.

 

I extra this onto my master image, run the optimizations that i need to run ( for now it is just the removing of the default apps) I run the analyse and optmize buttons. 

 

However, the apps first do not remove. I am sure its a problem on my side, but could you please show me the light! :)

 

Regards, 

 

Link to comment

Recommended Posts

  • 0

Hi Saq, 

 

This is actually expected behavior (and I'm adding a note to include this in documentation). What Optimizer is doing is that it will remove applications that should be added to new accounts, but doesn't touch the current session. It does not remove already provisioned applications, it just disables them for any new accounts (which is behavior you are seeing). 

 

There are two different cmdlets for this: Remove-AppXProvisionedPackage and Remove-AppXPackage. Below is description for Remove-AppXProvisionedPackage (which is what we're using): 

Quote

The Remove-AppxProvisionedPackage cmdlet removes app packages (.appx) from a Windows image. App packages will not be installed when new user accounts are created. Packages will not be removed from existing user accounts. To remove app packages (.appx) that are not provisioned or to remove a package for a particular user only, use Remove-AppxPackage instead.

 

We could probably remove packages from current session as well, however decided that it's not priority and would require additional code (checking if app was provisioned, making sure that it's not running and was removed properly etc...). 

 

Martin

  • Like 1
Link to comment
  • 1
1 hour ago, Saqib Afzal said:

 

 

Thank you for the reply Martin.

 

Which account should this be done with, local admin, domain admin etc?

 

The problem is, though this did not remove applications from the session(which was us updating our master image using pvs 7.15), when we promoted image and used a standard user account, the application tiles were showing up as tiles with downward arrows ( i do not think this is a Citrix Optimizer issues, maybe more a Windows 10 issue).

 

It is a 64 bit, does that make any difference.

 

The below pic shows the issues we are having : 

 

image.thumb.png.b96e035192ad34f71b3851321ae57c5f.png

 

I am afraid that it's Windows 10 default behavior and there is nothing we can do to fix it. 

 

The only solution that I'm aware of is to also update the default start layout for one user, export it and apply this updated layout to all new users through Group Policy. You can read more about this approach here: 

https://docs.microsoft.com/en-us/windows/configuration/customize-windows-10-start-screens-by-using-group-policy

  • Like 1
Link to comment
  • 1
On 2/21/2018 at 4:45 PM, Saqib Afzal said:

 

That is fine. Is this what everyone else would do/get when running the tool?. It was more me thinking i was doing something wrong or there being something wrong with our environment.

 

If we have to create a default start layout/template and push out through GP, I am more than willing to go down that route. I am guessing everyone who uses this tool does the same.

 

Thanks again guys, been very much helpful.

 

 

 

Preface: This is for our Windows 10 1703 layered image (App Layering 4.7), currently in UAT.

 

1. On a clean install of Windows 10 1703, after you've removed the apps (requirement for App Layering), remove all items from the right side of the Start menu so that it's blank

2. Run the following PowerShell command:

Export-StartLayout Blank.xml

     a. Optional: If you want to restrict the Start menu width to one column, like it was in 1607, edit the XML file with Notepad and change the following line:

<LayoutOptions StartTileGroupCellWidth="6" StartTileGroupsColumnCount="1" />

3. On the image you're building, set the Start menu to be blank for any new user by running the following PS command:

Import-StartLayout –LayoutPath \\Server\Share\Blank.xml –MountPath C:\

     a. I only do this because I noticed default icons, some similar to your screenshot, still appearing in our Start menu even with our custom layout. So if we start fresh, that is no longer an issue. If you force the users to utilize your own layout (step 4a below), then you will only see the shortcuts listed in the file

4. Create your own custom Start layout (per Microsoft) and export it to an XML file

     a. Optional: You can again restrict the Start menu width to 1 column like in step 2a, but also allow users to modify the Start menu (except for the items you list in the XML file)      themselves by changing the following line:

<DefaultLayoutOverride LayoutCustomizationRestrictionType="OnlySpecifiedGroups">

5. Using a Group Policy, set User Configuration\Policies\Administrative Templates\Start Menu and Taskbar\Start Layout to Enabled, and enter the path to the newly created XML file

 

While I loathe how Microsoft changed the way the new Start menu is handled in terms of tiles and shortcuts, the above method has proven to be useful. We do partially-lock down the Start layout so that our standard groups cannot be modified while allowing the users to pin their own tiles if they so choose to do so. I haven't had a chance to look into WEM yet, but it's next on my list, so I can't comment on the linked article. Looks pretty neat, though, and the more options the better.

  • Like 1
Link to comment
  • 1
4 hours ago, Saqib Afzal said:

 

Thanks for the detailed response. 

 

will the above only work with app layering?

 

We are using mandatory profile, where the ideal scenario would be to have the start menu and an empty tile area on first time login. Then we would like them to be able to either add tiles, which saves setting on log off.

 

if that is not possible, just a start menu that worked like win7

 

We do not use app layering and wont be in the short term, is there something simple that caters for above scenario?

 

The method I posted will work with anything - physical device, XenDesktop, etc.  You would just run all of these steps in your image, either when you're building the actual image (before converting to a vDisk), or if you're editing the vDisk in Private mode. If all you're looking for is a blank Start menu that is only as wide as the standard Start menu (no tiles on the right side), then just follow steps 1-3. This will allow users to expand the Start menu and add tiles should they want to go that route.

  • Like 1
Link to comment
  • 1

That's correct, it will make the Start menu blank for all future users. When you run that Import-StartLayout command, it copies your source XML file and placed it here: C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml

 

One thing I forgot to mention earlier - before you run that Import-StartLayout command, you need to first delete the existing LayoutModification.xml file. So, step three can be broken into two steps (both PS commands):

 

3a. Remove-Item "C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml" -Force

3b. Import-StartLayout –LayoutPath \\Server\Share\Blank.xml –MountPath C:\

 

If you want to read up more on the Start Layout stuff, here are two good links for you:

 

https://blogs.technet.microsoft.com/deploymentguys/2016/03/07/windows-10-start-layout-customization/
https://docs.microsoft.com/en-us/windows/configuration/start-layout-xml-desktop

  • Like 1
Link to comment
  • 0
10 minutes ago, James Kindon said:

The Citrix Optimizer is awesome :)

 

When you have run the "optimize" - have you loaded the appropriate template for your OS (sorry, have to ask) and what does your CitrixOptimzer.log file say (its created in the same location you run the Optimizer from)

Thanks for the reply James.

 

This is exactly what I have done. Extracted files, run the application. I am using the UI, so first page asks to select windows version. I select the Windows 10 1709 option. 

 

I then unselect everything and go to default apps, select all and then run optimize. So i select the template before I 'Optimize'

 

It says it is successful, but I do not see any change. I promote the master image just to confirm but average user still can see all apps.

 

I am running these changes as a domain admin. 

 

 

Link to comment
  • 0

Yup exactly that. 

 

It says they are already optimized. Applications have not been removed. 

Funny thing is when promoted the version, a normal account logged in can see the tiles with downward arrows and a couple of tiles have some strange code - but not clickable(meaning theyve been removed i am guessing)

 

So for some reason the clean process is taking place, but not doing it fully etc

 

it defo is strange, i got same thing in a test environment running the Get-AppxPackage | Remove-AppxPackage in Powershell.

 

 

Maybe it is our environment, but this is a fresh build, no policies at the moment. 

 

Regards 

 

 

 

Link to comment
  • 0
1 hour ago, Martin Zugec1709152432 said:

Hi Saq, 

 

This is actually expected behavior (and I'm adding a note to include this in documentation). What Optimizer is doing is that it will remove applications that should be added to new accounts, but doesn't touch the current session. It does not remove already provisioned applications, it just disables them for any new accounts (which is behavior you are seeing). 

 

There are two different cmdlets for this: Remove-AppXProvisionedPackage and Remove-AppXPackage. Below is description for Remove-AppXProvisionedPackage (which is what we're using): 

 

We could probably remove packages from current session as well, however decided that it's not priority and would require additional code (checking if app was provisioned, making sure that it's not running and was removed properly etc...). 

 

Martin

 

 

Thank you for the reply Martin.

 

Which account should this be done with, local admin, domain admin etc?

 

The problem is, though this did not remove applications from the session(which was us updating our master image using pvs 7.15), when we promoted image and used a standard user account, the application tiles were showing up as tiles with downward arrows ( i do not think this is a Citrix Optimizer issues, maybe more a Windows 10 issue).

 

It is a 64 bit, does that make any difference.

 

The below pic shows the issues we are having : 

 

image.thumb.png.b96e035192ad34f71b3851321ae57c5f.png

Link to comment
  • 0
4 hours ago, Martin Zugec1709152432 said:

 

I am afraid that it's Windows 10 default behavior and there is nothing we can do to fix it. 

 

The only solution that I'm aware of is to also update the default start layout for one user, export it and apply this updated layout to all new users through Group Policy. You can read more about this approach here: 

https://docs.microsoft.com/en-us/windows/configuration/customize-windows-10-start-screens-by-using-group-policy

 

That is fine. Is this what everyone else would do/get when running the tool?. It was more me thinking i was doing something wrong or there being something wrong with our environment.

 

If we have to create a default start layout/template and push out through GP, I am more than willing to go down that route. I am guessing everyone who uses this tool does the same.

 

Thanks again guys, been very much helpful.

 

 

Link to comment
  • 0
19 minutes ago, James Kindon said:

I feel like this is a segway to my soap box rant about windows 10 tiles :-)

https://jkindon.com/2017/10/13/citrix-wem-modern-start-menus-and-tiles/

 

Thank you James, 

 

I will have a read through this tomorrow. 

 

I have been reading around and people, mostly admins have some bad things to say about the start menu with windows 10 and ways to administer it.

 

We just want to get rid of it and still have options for users to pin/favorite/have recent applications showing in the left start menu. I am not sure if that is out there but we will try to get it as clutter free as possible. It is just to busy for an enterprise environment for my liking, esp for user base which has been used to Windows 7 etc

 

Thanks again for the help.

 

Link to comment
  • 0
On 2/22/2018 at 9:27 AM, Saqib Afzal said:

We just want to get rid of it and still have options for users to pin/favorite/have recent applications showing in the left start menu

That's my view on it these days as well - its 100% achievable, just finicky - might have to write a blog post about it at some point 

 

have fun :)

Link to comment
  • 0
On 2/27/2018 at 2:46 PM, Nick Panaccio said:

 

Preface: This is for our Windows 10 1703 layered image (App Layering 4.7), currently in UAT.

 

1. On a clean install of Windows 10 1703, after you've removed the apps (requirement for App Layering), remove all items from the right side of the Start menu so that it's blank

2. Run the following PowerShell command:


Export-StartLayout Blank.xml

     a. Optional: If you want to restrict the Start menu width to one column, like it was in 1607, edit the XML file with Notepad and change the following line:


<LayoutOptions StartTileGroupCellWidth="6" StartTileGroupsColumnCount="1" />

3. On the image you're building, set the Start menu to be blank for any new user by running the following PS command:


Import-StartLayout –LayoutPath \\Server\Share\Blank.xml –MountPath C:\

     a. I only do this because I noticed default icons, some similar to your screenshot, still appearing in our Start menu even with our custom layout. So if we start fresh, that is no longer an issue. If you force the users to utilize your own layout (step 4a below), then you will only see the shortcuts listed in the file

4. Create your own custom Start layout (per Microsoft) and export it to an XML file

     a. Optional: You can again restrict the Start menu width to 1 column like in step 2a, but also allow users to modify the Start menu (except for the items you list in the XML file)      themselves by changing the following line:


<DefaultLayoutOverride LayoutCustomizationRestrictionType="OnlySpecifiedGroups">

5. Using a Group Policy, set User Configuration\Policies\Administrative Templates\Start Menu and Taskbar\Start Layout to Enabled, and enter the path to the newly created XML file

 

While I loathe how Microsoft changed the way the new Start menu is handled in terms of tiles and shortcuts, the above method has proven to be useful. We do partially-lock down the Start layout so that our standard groups cannot be modified while allowing the users to pin their own tiles if they so choose to do so. I haven't had a chance to look into WEM yet, but it's next on my list, so I can't comment on the linked article. Looks pretty neat, though, and the more options the better.

 

Thanks for the detailed response. 

 

will the above only work with app layering?

 

We are using mandatory profile, where the ideal scenario would be to have the start menu and an empty tile area on first time login. Then we would like them to be able to either add tiles, which saves setting on log off.

 

if that is not possible, just a start menu that worked like win7

 

We do not use app layering and wont be in the short term, is there something simple that caters for above scenario?

Link to comment
  • 0
On 3/1/2018 at 0:45 PM, Nick Panaccio said:

 

The method I posted will work with anything - physical device, XenDesktop, etc.  You would just run all of these steps in your image, either when you're building the actual image (before converting to a vDisk), or if you're editing the vDisk in Private mode. If all you're looking for is a blank Start menu that is only as wide as the standard Start menu (no tiles on the right side), then just follow steps 1-3. This will allow users to expand the Start menu and add tiles should they want to go that route.

 

 

Thanks.

 

I am starting this now in a test environment .  I have created the .xml.

 

So for step 3a, i just call onto the created blank.xml. This makes a blank start menu for each user on first time use, but then should it save any customizations user makes going forward? - if so where do these get saved?

 

step 4 says create an .xml again - Am i right in saying that steps 1 to 3 are for a blank start menu that can be customized and steps 4 and 4a is for a customized start menu(set by IT) that should always stick(bar any additional things pinned by users)?

 

Regards, 

 

 

 

Link to comment
  • 0
On 3/5/2018 at 11:52 AM, Nick Panaccio said:

That's correct, it will make the Start menu blank for all future users. When you run that Import-StartLayout command, it copies your source XML file and placed it here: C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml

 

One thing I forgot to mention earlier - before you run that Import-StartLayout command, you need to first delete the existing LayoutModification.xml file. So, step three can be broken into two steps (both PS commands):

 

3a. Remove-Item "C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml" -Force

3b. Import-StartLayout –LayoutPath \\Server\Share\Blank.xml –MountPath C:\

 

If you want to read up more on the Start Layout stuff, here are two good links for you:

 

https://blogs.technet.microsoft.com/deploymentguys/2016/03/07/windows-10-start-layout-customization/
https://docs.microsoft.com/en-us/windows/configuration/start-layout-xml-desktop

Thanks again.

 

Update - I have run this today.  We got it working about 70%.  The start menu was as we wanted it, however it was locked down. This maybe something we want to keep actually, but it was not customisable for user.

 

Also, do you have any info on the task bar. I cleared the start menu and the task bar, however in the .XML there was no mention of taskbar. So when we login, still seem to load a generic taskbar which seem to increase load up time?

 

Regards, 

 

Link to comment
  • 0

Here's a sample XML file that is not locked down, and replaces the taskbar with your own tiles:


 

<LayoutModificationTemplate xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" xmlns:taskbar="http://schemas.microsoft.com/Start/2014/TaskbarLayout" Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
  <LayoutOptions StartTileGroupCellWidth="6" StartTileGroupsColumnCount="1" />
  <DefaultLayoutOverride>
    <StartLayoutCollection>
      <defaultlayout:StartLayout GroupCellWidth="6">
        <start:Group Name="Corporate Applications">
          <start:DesktopApplicationTile Size="1x1" Column="0" Row="0" DesktopApplicationID="Microsoft.InternetExplorer.Default" />
          <start:DesktopApplicationTile Size="1x1" Column="1" Row="0" DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Accessories\Old Calculator.lnk" />
        </start:Group>
        <start:Group Name="Office Applications">
          <start:DesktopApplicationTile Size="1x1" Column="0" Row="0" DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Outlook 2016.lnk" />
          <start:DesktopApplicationTile Size="1x1" Column="1" Row="0" DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Word 2016.lnk" />
          <start:DesktopApplicationTile Size="1x1" Column="2" Row="0" DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Excel 2016.lnk" />
          <start:DesktopApplicationTile Size="1x1" Column="3" Row="0" DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\PowerPoint 2016.lnk" />
          <start:DesktopApplicationTile Size="1x1" Column="4" Row="0" DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Skype for Business 2016.lnk" />
        </start:Group>
      </defaultlayout:StartLayout>
    </StartLayoutCollection>
  </DefaultLayoutOverride>
	<CustomTaskbarLayoutCollection PinListPlacement="Replace">
		<defaultlayout:TaskbarLayout>
			<taskbar:TaskbarPinList>
				<taskbar:DesktopApp DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\Accessories\Internet Explorer.lnk"/>
				<taskbar:DesktopApp DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\System Tools\File Explorer.lnk"/>
			</taskbar:TaskbarPinList>
		</defaultlayout:TaskbarLayout>
	</CustomTaskbarLayoutCollection>
</LayoutModificationTemplate>

More info on the taskbar layout: https://docs.microsoft.com/en-us/windows/configuration/configure-windows-10-taskbar

Link to comment
  • 0
On 3/5/2018 at 11:52 AM, Nick Panaccio said:

That's correct, it will make the Start menu blank for all future users. When you run that Import-StartLayout command, it copies your source XML file and placed it here: C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml

 

One thing I forgot to mention earlier - before you run that Import-StartLayout command, you need to first delete the existing LayoutModification.xml file. So, step three can be broken into two steps (both PS commands):

 

3a. Remove-Item "C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml" -Force

3b. Import-StartLayout –LayoutPath \\Server\Share\Blank.xml –MountPath C:\

 

If you want to read up more on the Start Layout stuff, here are two good links for you:

 

https://blogs.technet.microsoft.com/deploymentguys/2016/03/07/windows-10-start-layout-customization/
https://docs.microsoft.com/en-us/windows/configuration/start-layout-xml-desktop

 

 

Thanks, perfect.

 

I am 95% there. So we have 1-2 issues. We were able to create a blank.xml with no apps etc. However, when importing and mounting into the image, we got a invalid layout file error. The fix for this was we HAD to have one app pinned to start menu. This as a result does not let us start with a blank profile for new users. Any way around this or did you have this error also by any chance?

 

 

secondly, the start menu seems to stay locked which is fine, but what is the command to keep customisable by user?

 

taskbar is complete.

Edited by CItrix1982
Link to comment
  • 0

What does your blank XML file look like? I can export mine, with no tiles pinned, just fine:

 

<LayoutModificationTemplate xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
  <LayoutOptions StartTileGroupCellWidth="6" />
  <DefaultLayoutOverride>
    <StartLayoutCollection>
      <defaultlayout:StartLayout GroupCellWidth="6" />
    </StartLayoutCollection>
  </DefaultLayoutOverride>
</LayoutModificationTemplate>

 

My bad, the XML file I posted was the locked-down version. Just replace <DefaultLayoutOverride> with <DefaultLayoutOverride LayoutCustomizationRestrictionType="OnlySpecifiedGroups">. That will allow users to pin their own tiles. If you specify tiles in your own in this XML file using the code above, users will be able to un-pin them if they want.

Link to comment
  • 0
9 minutes ago, Nick Panaccio said:

What does your blank XML file look like? I can export mine, with no tiles pinned, just fine:

 


<LayoutModificationTemplate xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
  <LayoutOptions StartTileGroupCellWidth="6" />
  <DefaultLayoutOverride>
    <StartLayoutCollection>
      <defaultlayout:StartLayout GroupCellWidth="6" />
    </StartLayoutCollection>
  </DefaultLayoutOverride>
</LayoutModificationTemplate>

 

My bad, the XML file I posted was the locked-down version. Just replace <DefaultLayoutOverride> with <DefaultLayoutOverride LayoutCustomizationRestrictionType="OnlySpecifiedGroups">. That will allow users to pin their own tiles. If you specify tiles in your own in this XML file using the code above, users will be able to un-pin them if they want.

My blank.xml is as below

 

<LayoutModificationTemplate xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
  <LayoutOptions StartTileGroupCellWidth="6" />
  <DefaultLayoutOverride>
    <StartLayoutCollection>
      <defaultlayout:StartLayout GroupCellWidth="6" />
    </StartLayoutCollection>
  </DefaultLayoutOverride>
</LayoutModificationTemplate>

 

 

It exports fine, however when importing into the image in private mode - says invalid layout - checked online somebit and it seems if you do not have a tile pinned - it does not work?

 

 

Thanks for the edit area, will change that up.

 

Am i right in saying when a new user logs in for you, they have just the alphabetical column in left and start menu is blank?

 

 

Link to comment
  • 0

Interesting, I'm seeing the same thing when attempting to import that XML file into my image. My "Blank.xml" file actually has two pinned items, which is why I never noticed that before. That's an add requirement. Based on this, I think it's safe to assume that you're not going to be able to use this method to create an old style Start menu that does not have the right-side area (where pinned tiles would go).

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...