Powershell cannot be instantiated

Archived support forum for customers who once purchased a PrimalForms product license. This forum is locked.
This topic is 12 years old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Powershell cannot be instantiated

Post by davidc »

Interesting. I wonder if this is a permission issue. Does the packaged exe (without credentials) work if you log on as the impersonated user? David
David
SAPIEN Technologies, Inc.
User avatar
boyddt_co
Posts: 89
Last visit: Mon Sep 25, 2023 9:36 pm

Powershell cannot be instantiated

Post by boyddt_co »

good question, I'll give it a try. Why would it work within PrimalForms? is the impersonation not applicable at that time?David
User avatar
boyddt_co
Posts: 89
Last visit: Mon Sep 25, 2023 9:36 pm

Powershell cannot be instantiated

Post by boyddt_co »

David, I had the change to logon as iusr_domain which is the account specified in the build of the form. It ran as expected.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Powershell cannot be instantiated

Post by davidc »

I'm glad you were able to resolve the issue. FYI when you run a script inside PrimalForms, it runs as the current user, but you have the option to elevate if needed. David
David
SAPIEN Technologies, Inc.
User avatar
boyddt_co
Posts: 89
Last visit: Mon Sep 25, 2023 9:36 pm

Powershell cannot be instantiated

Post by boyddt_co »

David, the situation isn't solved. I can run it when I logon as iusr_domain but it still won't run using those credentials logged in as someone else. This little app is to be used by our helpdesk personnel who do not have the appropriate security rights to set folder permissions.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Powershell cannot be instantiated

Post by davidc »

Please try using "Run As" instead of "Impersonation". It may have to do with the fact that it is a domain user. David
David
SAPIEN Technologies, Inc.
User avatar
boyddt_co
Posts: 89
Last visit: Mon Sep 25, 2023 9:36 pm

Powershell cannot be instantiated

Post by boyddt_co »

from the start menu or something within PrimalForm
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Powershell cannot be instantiated

Post by davidc »

It's a packager setting under the Security Tab. David
David
SAPIEN Technologies, Inc.
User avatar
boyddt_co
Posts: 89
Last visit: Mon Sep 25, 2023 9:36 pm

Powershell cannot be instantiated

Post by boyddt_co »

Ok, now I feel really fullish, no stupid. After testing different scenarios it turns out that I entered the password wrong. Which is interesting because I must have entered it 4 or 5 times in PrimalForms and I logged in with that account more than once.Well, thank you for your help and I'm sorry I wasted your time.
User avatar
mssapien
Posts: 23
Last visit: Fri Oct 23, 2015 1:27 am

Powershell cannot be instantiated

Post by mssapien »

I am experiencing the same problem. This is a new/blank forms project. I am quite sure I am not entering the wrong password.When choosing impersonate, the error message is: PowerShell cannot be instantiatedWhen choosing run as, the error message is: The directory name is invalidThe same error messages appear when I login as the impersonated/runas-ed user.
The username is entered in this form: username@domain.comI use PrimalForms 2011, Version 2.0.21 on a Windows 7 Enterprise x64 domain member machine.mssapien2012-03-28 04:42:21
This topic is 12 years old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.