Search found 55 matches

by OldLost
Wed Jun 22, 2016 2:46 pm
Forum: PowerShell
Topic: Suppressing undesired output that appears in generated EXE
Replies: 23
Views: 17361

Re: Suppressing undesired output that appears in generated EXE

You could try adding *>sometempfile to the end of the commands you wish all output suppressed from, e.g., $URL_Contents=Invoke-WebRequest -URI $URL -ErrorAction SilentlyContinue -WarningAction SilentlyContinue *>sometempfile then delete the temp file when you're done. Or use a subset of handle numbe...
by OldLost
Mon May 09, 2016 12:54 pm
Forum: PowerShell Studio
Topic: SQLPS module cmdlets not displaying in Object Browser
Replies: 1
Views: 1262

SQLPS module cmdlets not displaying in Object Browser

PowerShell Studio 2016 v5.2.121 x64 Windows Server 2012 R2 64bit I have the same issue as the other poster. Attached is the zip of my SQLPS files from the cache. This module iss supplied by Microsoft as part of SQLServer 2008 or 2012 or something. Here is the output of Get-Module SQLPS, if it helps:...
by OldLost
Wed May 04, 2016 2:25 pm
Forum: PowerShell Studio
Topic: PrimalSense not showing all parameterset parameters
Replies: 2
Views: 1449

PrimalSense not showing all parameterset parameters

PowerShell Studio 2016 v5.2.120 x64 Windows Server 2012 R2 64bit I have the following function: function New-HeaderCell { [CmdletBinding(DefaultParameterSetName = 'SaveColor')] Param ( [Parameter(Mandatory, Position = 0)][string]$Text, [Parameter(Position = 1, ParameterSetName = 'SaveColor')][string...
by OldLost
Thu Apr 07, 2016 11:05 am
Forum: PowerShell
Topic: JSON to array
Replies: 4
Views: 3786

Re: JSON to array

Another option:

$Kayak = $data | Select-Object @{N='Dates';E={$_.shortDateRange}},Airline,@{N='Price';E={$_.flightinfo.price}}

Write-Output $Kayak
by OldLost
Thu Apr 07, 2016 10:57 am
Forum: PowerShell
Topic: JSON to array
Replies: 4
Views: 3786

Re: JSON to array

You're only producing one object, that's why. You probably want to iterate over your $data. Something like this (note: untested code!): $Kayak = $data | % { New-Object -TypeName PSObject -Property @{ Dates = $_.shortDateRange Airline = $_.airline Price = $_.flightinfo | select -Exp price } } Write-O...
by OldLost
Tue Mar 22, 2016 12:52 pm
Forum: PowerShell
Topic: PSS 2016 5.2.117 - Problem with wordwraps
Replies: 9
Views: 5877

Re: PSS 2016 5.2.117 - Problem with wordwraps

A bit of an aside, but this highlights two things that might enhance PSS for some: A way to show hidden characters in the script (space and tab, specifically) An entry in the toolbar that would remove all trailing spaces/tabs from the file If these options are already present, I'm not aware of them.
by OldLost
Wed Mar 09, 2016 9:13 am
Forum: PowerShell Studio
Topic: Additional Deployment Commands question
Replies: 1
Views: 1356

Additional Deployment Commands question

PowerShell Studio 2016 v5.2.116 x64 Windows Server 2012 R2 64bit Is there a length limit on the entries under "Additional Deployment Commands" specified in the Deploy Settings dialog? I ask because I'm trying to execute a command line that is about 600 characters long but it seems to me Po...
by OldLost
Mon Mar 07, 2016 9:09 am
Forum: PowerShell Studio
Topic: Project Control buttons grayed out at launch
Replies: 2
Views: 1576

Project Control buttons grayed out at launch

PowerShell Studio 2016 v5.2.116 x64 Windows Server 2012 R2 64bit Project control buttons in Project window are grayed out when first launching PowerShell Studio. 2016-03-07 09_00_54-SAPIEN PowerShell Studio 2016.png The buttons will return to "normal" if I load a different project, then re...
by OldLost
Thu Mar 03, 2016 1:44 pm
Forum: PowerShell
Topic: Problem converting image to base64 string
Replies: 6
Views: 6065

Re: Problem converting image to base64 string

And here's a slight alternative to jvierra's code:

Code: Select all

$url='https://upload.wikimedia.org/wikipedia/commons/6/60/Standing-rib-roast.jpg'
$bytes = Invoke-WebRequest -Uri $url -Method Get | Select-Object -ExpandProperty Content
$base64String=[convert]::ToBase64String($bytes)
by OldLost
Thu Mar 03, 2016 10:59 am
Forum: PowerShell Studio
Topic: Tab Size in Options dialog in PSS 2016
Replies: 4
Views: 1729

Re: Tab Size in Options dialog in PSS 2016

Is there anything I can do in the meantime to get it back to 4? A config file edit or something?