Open Gijsreyn opened 1 week ago
@Gijsreyn - instead of a validate set, why not use a validate script? Something like -
[ValidateScript({
if ($_ -notin (Get-TimeZone -ListAvailable).Id) { throw "$_ is not a TimeZone that is currently available" }
return $true
})]
That way if different OS Editions support different timezones, it will be handled seamlessly
@Trenly Thanks for checking man. Even thought I like the approach, it does not offer the user tab-completion when creating a configuration.
Prerequisites
Steps to reproduce
I am experiencing some odd behaviours while working on the
Time
DSC resource in the winget-dsc repository. I might be stretching the limit here, but I couldn't find a related issue.What I'm trying to achieve, is the following:
When adding the module to
$env:PSModulePath
, it doesn't get discovered. If I remove it the count up until 68 (that is Libya Standard Time), it gets discovered.Expected behavior
Actual behavior
Error details
No response
Environment data
Version
N/A
Visuals
No response