Search found 10 matches

by ISAssets
Wed Apr 26, 2017 6:02 pm
Forum: PowerShell Studio
Topic: PS Studio can't detect DSA.MSC
Replies: 2
Views: 971

Re: PS Studio can't detect DSA.MSC

Alexander Riedel wrote:...Note that the 64 bit version of PowerShell Studio can run your scripts in 32 and 64 bit mode.
Make sure it is also set to 64 bit and see if that resolves your issue.
This was the issue. Thanks very much for your time :)
by ISAssets
Wed Apr 26, 2017 12:17 am
Forum: PowerShell Studio
Topic: PS Studio can't detect DSA.MSC
Replies: 2
Views: 971

PS Studio can't detect DSA.MSC

Product, version and build: PS Studio 2017 (5.4.135) 32 or 64 bit version of product: 64 bit Operating system: Windows 10 64 bit PowerShell Version: 5 I'm getting odd behaviour whereby "Test-Path c:\Windows\System32\dsa.msc" returns false in my "app" and in the debug console. However I go to the nor...
by ISAssets
Mon Sep 26, 2016 5:46 pm
Forum: PowerShell Studio
Topic: Check PS version on startup
Replies: 11
Views: 3499

Re: Check PS version on startup

Thank you for your support. Please note it does process the #Requires -Version 5 line. When I run the script from ISE I can see the error in the console. However when using in a Winform EXE, it doesn't output anything onscreen to advise the user why the "application" is failing to launch. That is wh...
by ISAssets
Sun Sep 25, 2016 10:40 pm
Forum: PowerShell Studio
Topic: Check PS version on startup
Replies: 11
Views: 3499

Re: Check PS version on startup

I placed the #Requires -Version 5 on line 1 of Global.ps1 . I built a new EXE. The application process exits in about 1 second without any visual output. I exported the script to clipboard then pasted into PSISE on my Windows 7 box. When I attempt to run I get the error below. At line:1634 char:2 + ...
by ISAssets
Sun Sep 25, 2016 9:58 pm
Forum: PowerShell Studio
Topic: Check PS version on startup
Replies: 11
Views: 3499

Re: Check PS version on startup

Hey jvierra. I tried this and the error fails to trigger. When launching the EXE on a PC without PS4, the process starts and soon stops with no output. I exported the code to clipboard from PSS then ran in ISE on the PC with PS4. The error still fails to trigger. I get the following output in the co...
by ISAssets
Thu Sep 22, 2016 6:40 pm
Forum: PowerShell Studio
Topic: Check PS version on startup
Replies: 11
Views: 3499

Check PS version on startup

I've created a multi form project which requires PowerShell 5 as it includes a class in Globals.ps1. How can I check the PS version before the main form loads and show a MessageBox error if version is less than 5? #Requires -Version 5 will produce a console error if I export the code and run in ISE,...
by ISAssets
Sun Sep 18, 2016 5:21 pm
Forum: Windows PowerShell
Topic: Unable to find type [Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException]
Replies: 10
Views: 7079

Re: Unable to find type [Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException]

I don't have PSS installed on a domain controller so I cannot test your code under PSS. Doesn't need to be on a Domain Controller. Just run on a PC with AD Users and Computers applet. You are not running the code native but under the Debugger so that may create an issue. Does the code run correctly...
by ISAssets
Wed Sep 14, 2016 4:52 pm
Forum: Windows PowerShell
Topic: Importing Custom Classes
Replies: 6
Views: 1721

Re: Importing Custom Classes

I'm using PowerShell Studio.

I want to be able to access it from code file behind the form so I can write some front end specific logic into the form code file.

With Visual Studio I'd add the class to the project and put in a using statement in form's code file.

Not sure how to do here.
by ISAssets
Wed Sep 14, 2016 12:59 am
Forum: Windows PowerShell
Topic: Importing Custom Classes
Replies: 6
Views: 1721

Importing Custom Classes

Product, version and build: PowerShell Studio 2015 4.2.89 32 or 64 bit version of product: 64 bit Operating system: Windows 10 32 or 64 bit OS: 64 bit PowerShell Version: 5 I've created a class which contains the properties and methods that I want to use in form. Can you please advise how I import m...