Power Shell Sapien Primal Forms

Posted on 2013-06-18
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
Question by:CarlosReyes1

Author Comment

ID: 39257430
ok this is what i have so far

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

Thanks in advance
LVL 10

Accepted Solution

JoeKlimis earned 500 total points
ID: 39918059

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


$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

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
This article will help you understand what HashTables are and how to use them in PowerShell.
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

746 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now