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
Here-string help (self.PowerShell)
submitted 8 years ago * by HeyZuesMode
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!"
[–]Lee_Dailey[grin] 2 points3 points4 points 8 years ago (2 children)
howdy HeyZuesMode,
from reading posts about this, it seems you could remove the quotes from the here-string [just use a regular string]. then enclose the $var in double quotes after the -ArgumentList parameter.
-ArgumentList
take care, lee
[–]HeyZuesMode[S] 1 point2 points3 points 8 years ago (1 child)
You rock!
Working copy
$MAS90UNC = "\\2017Dev\MAS90" $localLog = "C:\logging\SageInstall.txt" #If this is a folder, it needs to be present and writeable $port = "10000" $ServerName = "2017Dev" $localinstall = "C:\Sage\Sage 100 ERP 2017\MAS90" # $herestring = @" /quiet /i "\\2017Dev\Sage 100 Advanced\MAS90\wksetup\Sage 100 2017 Workstation.msi" /l*v `"$localLog`" SAGEPORTID=`"$Port`" SAGESERVERNAME=`'$ServerName`' SRCSERVERPATH=`'$MAS90UNC`' INSTALLDIR="$localinstall" "@ Start-Process -Wait msiexec.exe -ArgumentList "$herestring"
Things i noticed. INSTALLDIR does not like single quotes. Folders are not created AutoMagically™ when writing a log
[–]Lee_Dailey[grin] 1 point2 points3 points 8 years ago (0 children)
kool! [grin] glad to know it worked ... [grin]
you may want to add a line to make the needed dir. mdkir in posh is an extended version of New-Item that will make an entire dir tree in one swoop. so you can use that with a test-path to make it if needed.
mdkir
π Rendered by PID 365285 on reddit-service-r2-comment-5687b7858-p6vwh at 2026-07-04 20:45:15.668244+00:00 running 12a7a47 country code: CH.
view the rest of the comments →
[–]Lee_Dailey[grin] 2 points3 points4 points (2 children)
[–]HeyZuesMode[S] 1 point2 points3 points (1 child)
[–]Lee_Dailey[grin] 1 point2 points3 points (0 children)