troubleshooting Question

Powershell scripting

Avatar of ccfcfc
ccfcfcFlag for United Kingdom of Great Britain and Northern Ireland asked on
Windows NetworkingVB ScriptPowershell
18 Comments1 Solution2456 ViewsLast Modified:
All, I am in the middle of configuring a powershell script that is able to run a BAT file that is stored on a remote server. This script will be ran from our NMS and will run the BAT file remotely (ideally anyway). However, to where our NMS and remote server lie, are across 2 domains and wondered if anyone of a way I can run the powershell script under a different domain credentials?

here is a copy of the scripts that works:

$RemoteServerName = "\\xxx.xxx.xxx.xxx"
$Process = [WMICLASS]"$RemoteServerName\ROOT\CIMV2:win32_process"
$result = $process.create("D:/xxxx/xxx.bat")

surely there must a switch that can be included that can run this task as another remote user?

thanks
ASKER CERTIFIED SOLUTION
Qlemo
"Batchelor", Developer and EE Topic Advisor
Join our community to see this answer!
Unlock 1 Answer and 18 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 18 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros