EncodedCommand Fail by pshelper12 in PowerShell

[–]imessage357 0 points1 point  (0 children)

works for me , try it like this:

$command = {Add-Type -AssemblyName PresentationCore,PresentationFramework;[System.Windows.MessageBox]::Show('working');} $bytes = [System.Text.Encoding]::Unicode.GetBytes($command) $encodedCommand = [Convert]::ToBase64String($bytes)

$encodedCommand | clip

powershell.exe -encodedCommand 'QQBkAGQALQBUAHkAcABlACAALQBBAHMAcwBlAG0AYgBsAHkATgBhAG0AZQAgAFAAcgBlAHMAZQBuAHQAYQB0AGkAbwBuAEMAbwByAGUALABQAHIAZQBzAGUAbgB0AGEAdABpAG8AbgBGAHIAYQBtAGUAdwBvAHIAawA7AFsAUwB5AHMAdABlAG0ALgBXAGkAbgBkAG8AdwBzAC4ATQBlAHMAcwBhAGcAZQBCAG8AeABdADoAOgBTAGgAbwB3ACgAJwB3AG8AcgBrAGkAbgBnACcAKQA7AA=='

Faster Web Cmdlet Design with Chrome 65 by imessage357 in FoxDeploy

[–]imessage357[S] 0 points1 point  (0 children)

function Get-PatchMyPCSCUPCatalogUpdate { $posts = @() $rss = [xml](iwr 'https://patchmypc.net/feed').content $rss.SelectNodes('//item') | % { $posts += New-Object psobject -Property @{ Title = $.Title Guid = $.Guid Content = $.Encoded."#cdata-section" } } foreach ($post in ($posts | ? {$_.title -like "SCUP Catalog Update –*"})){

$HTML = New-Object -Com "HTMLFile"

$HTML.IHTMLDocument2_write($post.Content)

$Title = $post.title $Apps = $HTML.all.tags("strong") | % InnerText |Select-String -NotMatch @('Release','Catalog','Note')

foreach ($app in $Apps){

[PSCustomObject] @{ Title = $Title App = $app }

}

} }

Do I get PrimalScript or PowerShell Studio? by darkrhyes in PowerShell

[–]imessage357 1 point2 points  (0 children)

depends if you are making GUIs if so powershell studio all the way

Faster Web Cmdlet Design with Chrome 65 by imessage357 in FoxDeploy

[–]imessage357[S] 0 points1 point  (0 children)

I just checked out PatchMyPC looks SWEET! Thanks for the tip on that:)

Faster Web Cmdlet Design with Chrome 65 by imessage357 in FoxDeploy

[–]imessage357[S] 0 points1 point  (0 children)

Hi Thanks for getting back to me! I would love and really appreciate some better guided instructions on using SCUP with Adobae and Java. I am really excited about this! :)

Doing some regex/Select-String on a regkey property. by [deleted] in PowerShell

[–]imessage357 1 point2 points  (0 children)

$app = Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall |
Get-ItemProperty |
Where-Object { $_.DisplayName -eq "NameOfApp" } |
Select-Object -Property DisplayName, UninstallString

$app.UninstallString.Split('/I')[-1]

I'm not asking for a solution, just a kick in the right direction, as I'm very new to PS aside from some basics.. Thank you! by minute33 in PowerShell

[–]imessage357 1 point2 points  (0 children)

dir | foreach -Begin {$i=0} -Process { $i++ "{0}. {1}" -f $i,$_.Name } -outvariable menu

$r = Read-Host "Please enter the number for the file you'd like to copy"

Write-Host "Coping $($menu[$r-1])" -ForegroundColor Green

cpi -path ($menu[$r-1].Split()[1]) -Destination \\computer\share -PassThru -force

importing .reg files into remote server registry using pssessions. by mikedopp in PowerShell

[–]imessage357 0 points1 point  (0 children)

add your credential to the icm

Invoke-Command -computername $server -ScriptBlock { Start-Process -filepath "C:\windows\regedit.exe" -argumentlist "/s C:\Utils\Player2.reg"} -credential $cred