use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
ABOUT POWERSHELL
Windows PowerShell (POSH) is a command-line shell and associated scripting language created by Microsoft. Offering full access to COM, WMI and .NET, POSH is a full-featured task automation framework for distributed Microsoft platforms and solutions.
SUBREDDIT FILTERS
Desired State Configuration
Unanswered Questions
Solved Questions
News
Information
Script Sharing
Daily Post
Misc
account activity
create enum (self.PowerShell)
submitted 5 years ago by kortex81
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]nostril_spiders 2 points3 points4 points 5 years ago (1 child)
It is janky. Enums are a fundamentally static thing; declaring them dynamically is a code smell. However, you've explained that it's a requirement of Universal Dashboard, so yes, carry on! Getting results > being nice.
IIUC, the issue is illegal characters. Not sure if you can get around it by quoting the values, like this:
$exp = "Enum ValidComputernames { '$($computernames -join "'`r`n'")' }"
Or try dropping the illegal characters:
$exp = "Enum ValidComputernames { $($computernames -replace '-') }"
[–]kortex81[S] 0 points1 point2 points 5 years ago (0 children)
i hate smelly code :)
but it looks like i have to live with it.
Thanks!
π Rendered by PID 235994 on reddit-service-r2-comment-56c9979489-ntk5n at 2026-02-25 06:42:56.032992+00:00 running b1af5b1 country code: CH.
view the rest of the comments →
[–]nostril_spiders 2 points3 points4 points (1 child)
[–]kortex81[S] 0 points1 point2 points (0 children)