Search found 150 matches

by clum09
Mon Feb 03, 2014 9:34 am
Forum: PowerShell
Topic: Packaged script does not work with PowerShell V2
Replies: 17
Views: 9723

Re: Packaged script does not work with PowerShell V2

jvierra, I understand that this is a security issue, but this issue only occurs when the script is packaged in the SAPIEN PowerShell Host (Command line) engine type, and the Use PowerShell V3 engines option is not selected. As I mentioned, when the script is launched without packaging, it does not g...
by clum09
Sat Feb 01, 2014 6:05 pm
Forum: PowerShell
Topic: Packaged script does not work with PowerShell V2
Replies: 17
Views: 9723

Re: Packaged script does not work with PowerShell V2

Hello, Belwo is the code that failed when it is packaged with SAPIEN PowreShell Host (Command line) when the "Use PowerShell V3 engine" is not selected. $cred = Get-Credential 'DOMUSERNAME' $Computer = 'W2K8R2-01' Try { Get-WmiObject -Namespace "rootCIMV2SecurityMicrosoftVolumeEncryption" -ComputerN...
by clum09
Wed Jan 22, 2014 11:48 am
Forum: PowerShell
Topic: Packaged script does not work with PowerShell V2
Replies: 17
Views: 9723

Re: Packaged script does not work with PowerShell V2

Hello, Below is the an error generated on the computer with PowerShell V4 installed when I did not select "Use PowerShell V3 engine" during packaging. It complained the code on line 298 that the parameter was null. ERROR: Test-Path : Cannot bind argument to parameter 'Path' because it is null. ERROR...
by clum09
Wed Jan 22, 2014 10:17 am
Forum: PowerShell
Topic: Packaged script does not work with PowerShell V2
Replies: 17
Views: 9723

Re: Packaged script does not work with PowerShell V2

Hello, While the packaged script works fine on a computer with PowerShell V3 or V4 installed, the packaged script failed on a computer with PowerShell V2 with the following error: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Management.Automation, Ver...
by clum09
Tue Jan 21, 2014 3:09 pm
Forum: PowerShell
Topic: Packaged script does not work with PowerShell V2
Replies: 17
Views: 9723

Packaged script does not work with PowerShell V2

Hello, I have a powershell script that I packaged with PrimalScript 2012. If I selected the "Use PowerShell V3 engine" to package the script, the packaged script works fine. The Engine type for the packager is SAPIEN PowerShell Host (Command line). However, if I did not select the "Use PowerShell V3...
by clum09
Fri Jan 17, 2014 4:02 pm
Forum: PowerShell
Topic: Passing parameter to the packaged script
Replies: 8
Views: 27275

Re: Passing parameter to the packaged script

Davidc, I have looked the linked. I tried the code, but it did not work for some reason. I packaged the script, and I tried to launch it with -File FileName.txt, but all I got was -File as my output. Any idea why? Param ($TestCommandline) function Convert-CommandLineToDictionary { <# .SYNOPSIS Parse...
by clum09
Fri Jan 17, 2014 3:18 pm
Forum: PowerShell
Topic: Passing parameter to the packaged script
Replies: 8
Views: 27275

Passing parameter to the packaged script

Hello, I wrote a PowerShell script that requires the parameters input in order for the script to run. The script works prefectly when the script is not packaged. After I packaged the script to a self-executable and run the packaged script with PrimalScript 2012, the parameters no longer work correct...
by clum09
Thu Sep 12, 2013 4:22 pm
Forum: PrimalScript
Topic: Powershell script packager
Replies: 5
Views: 3217

Re: Powershell script packager

Alexander, PrimalScript 2009 has an option to package the script to a 64-bit version. That was what I did when I packaged the script. Otherwise, I had to turn the Execution Policy for the 32-bit in the OS in order for it to work. Windows Server 2008 R2 is only available for 64-bit. I don't know what...
by clum09
Thu Sep 12, 2013 11:08 am
Forum: PrimalScript
Topic: Powershell script packager
Replies: 5
Views: 3217

Re: Powershell script packager

Alexander, Thank you for the response. I am not working on the automatic module import like PowerShell V3. I can do the module import in PowerShell V2 also as long as the module is available locally on the machine. The module I am importing is the ServerManager module which is already on Windows Ser...
by clum09
Wed Sep 11, 2013 11:42 am
Forum: PrimalScript
Topic: Powershell script packager
Replies: 5
Views: 3217

Powershell script packager

Hello, I have a PowerShell script that works fine when I launch it from either a command prompt using a batch file or within a the PowerShell console. The script imports the module and perform its other routines just fine within these two consoles. I tried to package this PowerShell script using Pri...