mkht / dscr_mslicense Goto Github PK
View Code? Open in Web Editor NEWPowerShell DSC Resource to set Windows / Office product key.
License: MIT License
PowerShell DSC Resource to set Windows / Office product key.
License: MIT License
Currently this resource compares the existing PartialProductKey with the provided key and then overwrites the installed key if there is a difference.
There are some scenarios where this might not be your desired behavior. For example in a MAK VLK licensing scenario, you might exhaust your activations and then purchase new activations from Microsoft. Those new activations may or may not come with a new key as well.
For some users of DSC using a Pull Server, AWS SSM's DSC automation or any other schedule mof execution, this mof will get applied repeatedly. When combined with a new key, this could result in exhausting the new license activations when it rolls out to the fleet.
I think ideally, an option like "InstallOnMismatch" would be created and cascade like the following:
Check if key matches > if no, is InstallOnMismatch set to $true > install key
Check if key matches > if no, is InstallOnMismatch set to $false > do not install key
There's a couple different options there, such as also basing this on windows activation status (ie. activated > do not install/overwrite existing). Perhaps an "OverwriteExisting" option.
Just want to surface this scenario and see if a good option can be created to account for it.
Method not found: 'System.Collections.Generic.List1 Microsoft.PowerShell.DesiredStateConfiguration.Internal.DscClassCache.ImportClasses(System.String, System.Tuple
2, System.Collections.ObjectModel.Collection1)'.Method not found: 'System.Collections.Generic.List
1 Microsoft.PowerShell.DesiredStateConfiguration.Internal.DscClassCache.ImportClasses(System.String, System.Tuple2, System.Collections.ObjectModel.Collection
1)'.
First of all I must say this resource is great! But I think with a small improvement makes it even better. From a security perspective I think it would be better that the Product Key parameters are optional because it's saved as plain text in de mof files. There are situations where a user is an admin on a machine, but you want them to have the product keys. As there are other ways to insert product keys into a system it should be an optional parameter.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.