Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Improve speed of Test-IsNanoServer function #155

Open
mhendric opened this issue May 25, 2019 · 0 comments
Open

Improve speed of Test-IsNanoServer function #155

mhendric opened this issue May 25, 2019 · 0 comments
Labels
enhancement The issue is an enhancement request. in progress The issue is being actively worked on by someone.

Comments

@mhendric
Copy link
Contributor

Opening a dedicated issue to track the issue @X-Guardian tried to fix in #154. Currently, the Test-IsNanoServer function calls the Get-ComputerInfo cmdlet to check with the computer is running Nano server or not. Get-ComputerInfo can take 40+ seconds to run each time. This function is called for each user and group resource within a Dsc configuration and therefore can make the Dsc application very slow.

Recommended fix:
Replace Get-ComputerInfo with checking the registry value at HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Server\ServerLevels\NanoServer, as documented here: https://msdn.microsoft.com/en-us/library/windows/desktop/hh846315(v=vs.85).aspx

@mhendric mhendric added enhancement The issue is an enhancement request. in progress The issue is being actively worked on by someone. labels May 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement The issue is an enhancement request. in progress The issue is being actively worked on by someone.
Projects
None yet
Development

No branches or pull requests

1 participant