Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Power Shell Sapien Primal Forms

Posted on 2013-06-18
4
Medium Priority
?
392 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 2000 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

Congratulations! You’re Certified – Now What?

Starting a new career can be overwhelming. Becoming certified in your field of expertise is a great start, but where do you go from here?  Here are some tips to help you on your career journey.

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.
My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

721 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