Solved

Power Shell Sapien Primal Forms

Posted on 2013-06-18
4
383 Views
Last Modified: 2014-09-30
Hi i'am very new to this well very very very new, i am trying to create form with primal forms with a text box to enter computer name and with 2 button that will go install java and the other will install flash to a the remote computer put in the text box .

Thanks in advance
0
Comment
Question by:CarlosReyes1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 

Author Comment

by:CarlosReyes1
ID: 39257430
ok this is what i have so far

$compname=$compname.text
Copy-item -Path \\servername\java -recurse \\$compname\c$\windows\temp\
([WMICLASS]"\\$RemoteSystem\ROOT\CIMV2:win32_process").Create("cmd.exe /c \\$compname\c$\windows\temp\java\jre.exe /s`" /qn")      

}

This is the error is coming back with

ERROR: Cannot convert value "\\\ROOT\CIMV2:win32_process" to type "System.Management.ManagementClass". Error: "Invalid parameter "
DeploySoftware.pff (57): ERROR: At Line: 57 char: 12
ERROR: +     ([WMICLASS] <<<< "\\$RemoteSystem\ROOT\CIMV2:win32_process").Create("cmd.exe /c \\$compname\c$\windows\temp\java\jre.exe /s`" /qn")
ERROR:     + CategoryInfo          : NotSpecified: (:) [], RuntimeException
ERROR:     + FullyQualifiedErrorId : RuntimeException
ERROR:

Thanks in advance
0
 
LVL 11

Accepted Solution

by:
Joe Klimis earned 500 total points
ID: 39918059
hi

The problem with this line is you have an extra  
`"  
  in you line of code, you will also need to specify the file location in full

See below a working example

If I can help further let me know

Regards
Joe


$remotesystem = "JoeDellXps"
$compname = "\\joedellxps\c$\"

$result = ([WMICLASS]"\\$RemoteSystem\ROOT\CIMV2:win32_process").Create("cmd.exe /c \\$compname\c$\windows\temp\java\jre.exe /s /v /qn")

Open in new window


$result.returnvalue   # should return 0 is successful
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question