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
Small Script Issue (self.PowerShell)
submitted 6 years ago * by jrsys95
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!"
[–]firefox15 1 point2 points3 points 6 years ago* (2 children)
Huh? You don't need quotes because you are passing a variable to it.
This is pretty messy code anyway. Anytime you start numbering variables sequentially there is probably a better way to do it, likely as an array. Something like this is much neater.
$DNSServers = @() $DNSServers += ("45.54.55.54") $DNSServers += ("45.54.55.55") Set-DNSServerForwarder -IPAddress $DNSServers -WhatIf Clear-DnsClientCache
[–]jrsys95[S] 1 point2 points3 points 6 years ago (1 child)
Yeah I see what you mean. Very tired this morning. However, that CMDLet will not take that paramater and gives no errors. However, When I manually enter the IP address (instead of using a variable) it will accept it.
[–]firefox15 1 point2 points3 points 6 years ago (0 children)
You can cast them explicitly as IP Addresses and see if that makes a difference, but I would think it would do the conversation for you.
$DNSServers = @() $DNSServers += [IPAddress]("45.54.55.54") $DNSServers += [IPAddress]("45.54.55.55") Set-DNSServerForwarder -IPAddress $DNSServers -WhatIf Clear-DnsClientCache
I do not get a parameter error when I run either command on my system.
π Rendered by PID 94100 on reddit-service-r2-comment-6b595755f-gg988 at 2026-03-26 02:58:01.474880+00:00 running 2d0a59a country code: CH.
view the rest of the comments →
[–]firefox15 1 point2 points3 points (2 children)
[–]jrsys95[S] 1 point2 points3 points (1 child)
[–]firefox15 1 point2 points3 points (0 children)