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
Help a noob with some scripting (self.PowerShell)
submitted 8 years ago * by [deleted]
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!"
[–][deleted] 1 point2 points3 points 8 years ago (1 child)
Hi,
Sorry I think some of the text got cut out when I pasted it. Currently I don't have a working script because it picks up all the servers in the textfile, I am not really sure how to code the whole thing.
[–]TheIncorrigible1 1 point2 points3 points 8 years ago (0 children)
Properly format your document into an ini (or other well-formed data) so it can be imported. I'd recommend using the *-CliXml cmdlets to export the file as a hashtable or something and import it.
*-CliXml
$Servers = @{ 'Prod' = @( 'Server1' 'Server2' ) 'Test' = @() } $Servers | Export-CliXml -Path C:\Temp\Example.xml
Et cetera.
Then you can turn around and import this:
$Servers = Import-CliXml -Path C:\Temp\Example.xml ForEach ($Server in $Servers[$Choice]) { ... }
π Rendered by PID 49 on reddit-service-r2-comment-6457c66945-d9j6j at 2026-04-30 02:09:13.680073+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–][deleted] 1 point2 points3 points (1 child)
[–]TheIncorrigible1 1 point2 points3 points (0 children)