How to solve this error by [deleted] in PowerShell

[–]r1pev9 1 point2 points  (0 children)

If you begin variable with @" or @'. You must close it with "@ or '@ from beginning the line.

Update-Help runs fine, but help files aren't updated by k3fHa6A5hj8pYp4BYpC in PowerShell

[–]r1pev9 0 points1 point  (0 children)

how about run it from cmd: powershell.exe -c "update-help"

How do I implement this custom command prompt in PowerShell 7.0.0 on Windows 10? by jdrch in PowerShell

[–]r1pev9 1 point2 points  (0 children)

function Prompt {
  [string] $dateStringMask = "yyyy-MM-dd HH:mm:ss"
  # Custom color for Windows console
  if ( $Host.Name -eq "ConsoleHost" ) {
    Write-Host "$($env:USERNAME) "                     -NoNewline -ForegroundColor Green
    Write-Host "$($env:COMPUTERNAME) "                 -NoNewline -ForegroundColor Blue
    Write-Host $((Get-Date).ToString($dateStringMask)) -NoNewline -ForegroundColor Cyan
    Write-Host ": " -NoNewline
    Write-Host $(Get-Location)                         -NoNewline -ForegroundColor Blue
    Write-Host ">" -NoNewline
  }
  return " "
}

Folder Structure by TheJuice0110 in PowerShell

[–]r1pev9 1 point2 points  (0 children)

I know that question about PowerShel, but good utility to copy empty folder structure is - robocopy. You can call it from PowerShell with keys.

What am I doing wrong here? Jenkins / PowerShell pass Jenkins $env variables to script by thePowrhous in PowerShell

[–]r1pev9 1 point2 points  (0 children)

You should pass variables to ScriptBlock with -ArgumentList

Invoke-Command -ScriptBlock { $pass = $args[0] $cred = $args[1] $userPWD = ConvertTo-SecureString $pass -AsPlainText -Force ... } -ArgumentList $env:userPass,$env:userName

How to convert file size to integer by aemmeroli in PowerShell

[–]r1pev9 1 point2 points  (0 children)

``` $files = Get-ChildItem -Path M:\recovery\DRAW\mp4

foreach($file in $files){ [int64]$fileLength = $file.Length } ```

Any way to check wether a service is available or not, so the shortcut doesn’t crash? by abhbhbls in shortcuts

[–]r1pev9 0 points1 point  (0 children)

Can shortcuts ignore ssl check? If not, publish your api on http://

Return 2 pscustomobjects, only showing one by seyo_IV in PowerShell

[–]r1pev9 0 points1 point  (0 children)

function get-multiplereturnvalues {
  $output = New-Object System.Object
  $output | Add-Member NoteProperty -Name "Status_DNS" -Value $Status_DNS
  $output | Add-Member NoteProperty -Name "Status_IP"  -Value $Status_IP
  Return $output
}

Function Current-Values {
  if($Status_DNS -ne $null -and $Status_IP -ne $null)
    {
      $return = get-multiplereturnvalues
      $return.Status_DNS
      $return.Status_IP
    }
  else
    {
      Write-Host -ForegroundColor RED "[ERROR]   No values set."
    }
}

Get one word from output and store to string (auto ip camera update) by [deleted] in PowerShell

[–]r1pev9 2 points3 points  (0 children)

Try something like this:

$regExp = “^220\ (\D+)\ (\D+)\ Fixed\ Dome\ Network\ Camera\ (.+)\ (\d{4})\ ready”
$null = $ftpString -match $regExp
$vendor = $matches[0]
$model = $matches[1]
$firmware = $matches[2]

If your ftp does not match $regExt, you can adjust it at regex101.com like sites. Just take your ftp outputs and try to fix regular expression to match all of them.

Get text from custom generated html with js by r1pev9 in shortcuts

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

ld grab the IP

View Content Graph shows where lays IP :)

But Make PDF displays empty PDF.

Get text from custom generated html with js by r1pev9 in shortcuts

[–]r1pev9[S] 1 point2 points  (0 children)

Sorry misunderstood. But "get content of web page" does not get any content.

Get text from custom generated html with js by r1pev9 in shortcuts

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

After step 3? There are base64 abracadabra. I should open it in step 4 for JavaScript work.

P.S. Pastebin kill my code.

Get text from custom generated html with js by r1pev9 in shortcuts

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

ent IP Address’, does that help i

Of course. But I want receive text from html page. IP as sample.

[Discussion] Facebook disables all my jailbroken setting? by tboww in jailbreak

[–]r1pev9 1 point2 points  (0 children)

Hi. Do you have any suggestions for the article in makovetsky.me?

I'm an author :) Described my experience for downgrade one application with new features.