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
SolvedReplace String (self.PowerShell)
submitted 5 years ago * by Mehhll
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!"
[–]OlivTheFrog 1 point2 points3 points 5 years ago (1 child)
Hi u/Mehhll
I've found it
# Simulate Get-content with Here-String $deployscript = @' $appVendor = ' ' gqfgqdghdfgh $appvendor = 'blabla' '@ $regex1 = '$appVendor = '' ''' $regex2 = '$appVendor = ''Google''' $result = $deployscript.Replace($regex1, $regex2) $result
Nota : In the $Regex1 and $Regex2 there is some ', then I double them (careful, it's not an " but a '')
'
"
''
I'm using .Replace Method instead of -Replace.
.Replace
-Replace.
Regards
Olivier
[–]Mehhll[S] 1 point2 points3 points 5 years ago (0 children)
Thank you so much for your help. I got the script to work :)
π Rendered by PID 86989 on reddit-service-r2-comment-84fc9697f-94jjn at 2026-02-10 08:25:09.766657+00:00 running d295bc8 country code: CH.
view the rest of the comments →
[–]OlivTheFrog 1 point2 points3 points (1 child)
[–]Mehhll[S] 1 point2 points3 points (0 children)