Solved

Power Shell Sapien Primal Forms

Posted on 2013-06-18
4
371 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 10

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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
devops career advice 1 35
Remote Powershell Issue 3 32
New-MoveRequest Exchange 2010 Powershell 1 42
Need to export the list of AD users with below attrubutes 2 20
Synchronize a new Active Directory domain with an existing Office 365 tenant
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

733 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