Search found 55 matches

by OldLost
Wed May 17, 2017 1:01 pm
Forum: Wish List and Feature Requests
Topic: PowerShell Studio: Add PrimalSense for ValidateSet parameters
Replies: 3
Views: 1267

Re: PowerShell Studio: Add PrimalSense for ValidateSet parameters

Try something like Export-Csv -Encoding
5-17-2017 12-59-40 PM.jpg
5-17-2017 12-59-40 PM.jpg (52.08 KiB) Viewed 1239 times
So, not so much. And it also doesn't seem to work with functions defined in modules I've written and imported either.
by OldLost
Mon May 15, 2017 3:25 pm
Forum: Wish List and Feature Requests
Topic: PowerShell Studio: Add PrimalSense for ValidateSet parameters
Replies: 3
Views: 1267

PowerShell Studio: Add PrimalSense for ValidateSet parameters

Sorry if this has already been requested; a quick search of this forum did not turn up any results for me. While I know we can do this ourselves on a function-by-function basis using CustomSense/Triggers.xml, it would be nice if PSS would actually recognize function parameters defined using Validate...
by OldLost
Tue May 02, 2017 8:56 am
Forum: PowerShell Studio
Topic: Assemblies not saving?
Replies: 8
Views: 2521

Re: Assemblies not saving?

I tried your method of placing Add-Type -LiteralPath into the code, and while it does seem to work for getting PrimalSense to show the types and methods from the containing objects, it still feels like a kludge. For example, I am also loading an assembly for EWS which may be different on each system...
by OldLost
Tue May 02, 2017 8:16 am
Forum: PowerShell Studio
Topic: Assemblies not saving?
Replies: 8
Views: 2521

Re: Assemblies not saving?

PS: assemblies can be loaded in other ways besides Add-Type. [Reflection.Assembly]::LoadFile(), for example. I do not think PSS would recognize assemblies loaded that way either so, again, the Assemblies feature within PSS would be the best way to go. Also note that my project is a module project so...
by OldLost
Tue May 02, 2017 7:51 am
Forum: PowerShell Studio
Topic: Assemblies not saving?
Replies: 8
Views: 2521

Re: Assemblies not saving?

Yes, in code I am doing something more like in your first example since I cannot be sure the current directory is $PSScriptRoot. If I do not the assembly may not be found. What I meant by "Import-Module support" was that when I place an Import-Module command into the code that module's exported comm...
by OldLost
Fri Apr 28, 2017 11:10 am
Forum: PowerShell Studio
Topic: Assemblies not saving?
Replies: 8
Views: 2521

Re: Assemblies not saving?

I'm doing that for when the script runs, but I was looking for PSS to provide Intellisense/primalsense to the objects while coding. Add-Type doesn't help then, or at least it doesn't seem to work similarly to putting "Import-Module blah" for getting PSS to recognize module functions while coding. In...
by OldLost
Thu Apr 27, 2017 10:50 am
Forum: PowerShell Studio
Topic: Assemblies not saving?
Replies: 8
Views: 2521

Assemblies not saving?

PowerShell Studio 2017 v5.4.139 x64 Windows Server 2012 R2 64bit I have a project with a PS1 file. While editing the PS1 file I click on Assemblies and, of course, at first it starts with the default list of assemblies. I click the plus to add one, click Browse... and select the DLL file in my proje...
by OldLost
Mon Apr 03, 2017 11:49 am
Forum: PowerShell Studio
Topic: Code Formatting & Syntax highlighting issue?
Replies: 1
Views: 571

Code Formatting & Syntax highlighting issue?

PowerShell Studio 2017 v5.4.137 x64 Windows Server 2012 R2 64bit These both work in PowerShell itself, but PS Studio does not want to syntax highlight the second one properly. 4-3-2017 12-01-00 PM.jpg Also, in the second, "Format Script" wants to put a space after the dash before "Pattern". Is this ...
by OldLost
Thu Mar 30, 2017 12:44 pm
Forum: Windows PowerShell
Topic: Download file to update profile.ps1
Replies: 2
Views: 859

Re: Download file to update profile.ps1

Deploy it as a package to an internal nuget repo! Trust me, it's easier than it sounds. Use the Register-PSRepository, Publish-Module, Install-Module, & Update Module cmdlets. Register-PSRepository -Name "Internal" -SourceLocation "\\fileserver\modules" -PublishLocation "\\fileserver\modules" -Insta...
by OldLost
Tue Mar 21, 2017 1:13 pm
Forum: PowerShell Studio
Topic: Format Script - WAI?
Replies: 3
Views: 851

Format Script - WAI?

PowerShell Studio 2017 v5.4.136 x64 Windows Server 2012 R2 64bit Not sure if it's me or PowerShell Studio's script formatting, but for the below block of code PowerShell Studio is placing the do command on the same line as the else's closing bracket. $i = 3 if ($true) { Write-Host "true" } else { Wr...