Showing posts with label win10. Show all posts
Showing posts with label win10. Show all posts

February 8, 2023

Windows Pagefile Done Right

Over the years there has been a lot of information on configuring the pagefile, paging has gone through the evolution on what size and configuration it should be. With virtual machine RAM allocation going higher and higher and a lot of guidance from the likes of Citrix and VMware to potentially build VMs with 64GB+ RAM. Paging is a very interesting topic as setting the pagefile size too high, wastes disk space; removing the page file entirely is bad as well as Windows needs to have a pagefile even though we do not want the system to page. Not having a pagefile equates Windows complaining about not having enough virtual memory if the actual memory is fully allocated. While no one wants to page and systems should be built to minimize paging aka allocating enough memory to let folks operate their applications without paging but systems should be configured to allow some sort of paging as a "use in case" measure. Lastly the out of box configuration of a system managed pagefile is also a bad idea.

Setting the pagefile to system managed in an enterprise type of environment is a bad practice. The reason why? If there are any monitoring tools a lot of monitoring tools track pagefile utilization and it is typically tracked as a percentage. If the pagefile is set to system managed and the minimum/maximum are not set, it can result in monitoring tools reporting excessive pagefile utilization.

Setting the pagefile with the old school approach of setting the pagefile 1.5x the size of the memory results in this configuration. We will hear a lot of complaints about wanting to capture some sort of dump for Microsoft to "analyze". When was the last time Microsoft successfully analyzed a dump with meaningful results? For me it has never happened.

Here is what the drives would look like if we for instance allocated 64GB of RAM to a VM and are using the old school approach of 1.5x RAM for the pagefile:

Here is the error in the eventlog when the pagefile is completely eliminated as virtual memory is low:

What is the happy medium? Setting the pagefile to either 4096MB/4GB for both the minimum and maximum on single user operating systems and 8192MB/8GB for both the minimum maximum on multi-user operating systems.


Why is this the happy medium? I checks all of the boxes as it allows for Windows to have a pagefile if needed, it allows for a minidump to be configured/captured/analyzed in Windows if needed and it is not too large that we feel like we are wasting space.

What about memory dumps? Well if there is a need for some sort of memory dump to be captured and analyzed, Windows can be configured to generate a minidump. There are plenty or articles/blog posts out on the internet on how to configure Windows to produce a minidump.

If you have any thoughts, we would like to hear from you in the comments.

Johnny @mrjohnnyma

February 10, 2021

Stop Using Windows 10 LTSC



Windows 10 comes in all kinds of variations. If you have ever run Windows 10 in a virtual desktop capacity there has no doubt been a consideration of using the Long Term Service Channel (LTSC) as opposed to the Semi-Annual Channel (SAC) that is traditionally used on physical endpoints. The two supported versions of LTSC out there as of this posting are Windows 10 1607 LTSB (this was the channel name before Microsoft changed it from Branch to Channel) and 1809 LTSC. As you see, these are locked in time versions of Windows 10 that have 5 years of support before upgrades are needed and if/when upgrades are performed and you can leapfrog from one version of LTSC to another version of LTSC to remain supported. The Semi-Annual Channel has servicing timeline of 18 months from release. Meaning you should be off that particular version 18 months after it is released to maintain support. If we look at the benefits of LTSC vs SAC, we can clearly see some very appealing things for it. 

Here are examples of the big ones: 
  • No Windows Store
  • No Microsoft Edge (we are talking about classic Edge not Chromium Edge)
  • No Cortana 
  • No feature updates
  • Less of the question “Who Moved My Cheese” (If you get that reference)

These few items have had administrators and engineers spend countless hours over the years trying to disable them in their virtual desktop environments via scripts, registry changes and disabling services. If we take a step back and look at it, running Windows 10 LTSC gives all of the good things and none of the bad things of running Windows 10 as a virtual desktop. I used to make the comparison as running Windows 7 with a Windows 10 wrapper and if you were running LTSC in your virtual desktop environment you were probably very happy.

Then on February 1st 2018, Microsoft had to come to mess it all up. They posted an article stating that Office 365 Pro Plus would no longer be supported on any version of Windows 10 LTSC effective January 14th 2020. With the wide adoption of Office 365 and the availability of E3/G3 or E5/G5 licensing and the ability to download the offline office clients from these subscriptions it is imperative to maintain support. Microsoft has always taken a stance that LTSC should only be used where the key requirement is that functionality and features don’t change over time. Examples include kiosks, medical systems, industrial process controllers, and air traffic control devices. These systems can have very detrimental effects on functionality if upgraded or are systems that do not have the ability to be updated due to security and network related reasons.

This caused panic and a need to pivot for the IT departments to shift away from LTSC back to the SAC and now administrators and engineers needed figure out a way to be able to test/accommodate these updates to prevent any issues in their virtual desktop environment.

The long story short or TLDR version of this. When deciding if LTSC or SAC version of Windows 10. This really should be a no-brainer and SAC is the only way to go. For those that say they will never go to Office 365 from their on-prem exchange as I have all of these requirements that prevent it, all I can say is “never say never”. You do not want to be reason why an entire environment is not supported and become the bottleneck towards environmental progress. If you are working with a VAR/partner and they tell you that LTSC is the way to go for your virtual desktop image, you may want to re-evaluate that partner as they may be leading you down a bad path.




September 17, 2019

Citrix MCS - Automate Master Image vCenter Update

Purpose:
This post is to share a Citrix MCS / VMware PowerShell script I created over the last year or so to automate the process of renaming a master image (Win2K16 or W10), converting it to a template, cloning the template and creating a snapshot of the clone in preparation for MCS updates.

You can use this script if you have a single datacenter or if you have multiple. It's relatively easy to modify it so the master image is copied to multiple vCenter datacenters/clusters and follows the same process.

I currently have 9 different datacenters/clusters running the same master image. I just maintain the core master image in the primary datacenter, perform updates, shutdown, run this script and once the process is done I can update each machine catalog one by one from the same master image.

Download the script from Citrix ShareFile

SageLike Post ID: SL0023

April 24, 2017

Windows 10 Store Apps Missing


Purpose:
This post explains how to reinstall the Windows 10 Calculator app after it has been uninstalled

Symptom:
Windows 10 Calculator App missing

Resolution:

Issues reinstalling Win10 Store apps after removing them. This is specific to the Windows Calculator app.

Requirement is to have Base Filtering Engine and Windows Firewall service turned on.
*Note* - This is also a requirement for Windows 10 Updates to function correctly.

If the folders in the C:\Program Files\WindowsApps directory have been deleted or are missing find another machine that does have these folders and copy them into your machines directory. I also had to copy the VCLibs directories (highlighted below - You'll see why in a minute why these are needed.)



After you have these directories open up an elevated powershell window and register the apps using this command (specific to Calculator)

Add-AppxPackage -Register "C:\Program Files\WindowsApps\Microsoft.WindowsCalculator_10.1703.601.0_x64__8wekyb3d8bbwe\AppxManifest.xml" -DisableDevelopmentMode




However when I ran this command I got an error about the VCLibs missing. So  I registered these VCLibs first with these command:

Add-AppxPackage -Register "C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00_14.0.24123.0_x64__8wekyb3d8bbwe\AppxManifest.xml" -DisableDevelopmentMode

Add-AppxPackage -Register "C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00_14.0.24123.0_x86__8wekyb3d8bbwe\AppxManifest.xml" -DisableDevelopmentMode



And then re-ran the command to register the Calculator app.

Add-AppxPackage -Register "C:\Program Files\WindowsApps\Microsoft.WindowsCalculator_10.1703.601.0_x64__8wekyb3d8bbwe\AppxManifest.xml" -DisableDevelopmentMode

Cause:

The uninstall of Windows 10 Apps by various means

SageLike Post ID: SL0018

Applies to:

Windows 10

References:
http://www.intowindows.com/reset-and-reinstall-calculator-in-windows-10/
https://www.cnet.com/how-to/how-to-reinstall-default-apps-in-windows-10/

March 29, 2017

Windows 10 Win + G Pop Up Citrix Receiver Launching Apps/Desktops

Purpose:
To fix the Win + G Popup when launching Citrix apps/desktops from Windows 10 Machines with the latest patches.

Symptom:
When launching published apps or desktops from a Windows 10 OS a green popup windows briefly appears prompting to press Win + G for the game bar or for the search bar.

Resolution:
Open Registry Editor (Run > regedit)
Navigate to HKEY_CURRENT_USER\System\GameConfigStore
Set the value of DWORD "GameDVR_Enabled" to 0
Go to HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\
Create key "GameDVR".
Create DWORD 32bit called "AllowGameDVR" and set to 0
Restart your computer.

Cause:
By default Windows 10 has the DVR function enabled. 

SageLike Post ID: SL0015

Applies to:

Windows 10 - Both endpoint devices and VDI's

References:
https://support.steampowered.com/kb_article.php?ref=6239-DZCB-8600#appreg