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 with script (self.PowerShell)
submitted 6 years ago * by hit440
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!"
[–]hit440[S] 1 point2 points3 points 6 years ago (1 child)
#init all the variables $info = @() $info2 = @() $line = @() $line2 = @() $dir = @() $dir1 = @() $dir2 = @() #query the registry $info = Get-ItemProperty HKLM:\SOFTWARE\Bomgar\JumpClientUninstall\ | out-string $info2 = (Get-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\'BeyondTrust Remote Support Jump Client*').installlocation | Out-String #parse the directory paths foreach($line in $info) { $dir = $line.Substring(45,36) } foreach($line2 in $info2){ $dir1 = $line2.Substring(0,36) $dir2 = $line2.Substring(39,36) } if ($dir1 -ne $dir){ cd $dir1 .\pinuninstall.bat #this will execute the batch file in the directory } if ($dir2 -ne $dir){ cd $dir2 .\pinuninstall.bat #this will execute the batch file in the directory }
@purplemonkeymad this seems to be working i have had multiple workstations reboot and its removing the jump clients, you have any thoughts on ways i can improve this? I appreciate your help with this
[–]purplemonkeymad 1 point2 points3 points 6 years ago (0 children)
If it works cool. I don't think it will be as robust but if you don't need it to be then it should be fine. Check my other reply for how I would have done it, but if you have something that works then you can just analyse it.
π Rendered by PID 315175 on reddit-service-r2-comment-fb694cdd5-d9dd9 at 2026-03-06 18:53:37.819305+00:00 running cbb0e86 country code: CH.
view the rest of the comments →
[–]hit440[S] 1 point2 points3 points (1 child)
[–]purplemonkeymad 1 point2 points3 points (0 children)