invoke-command Questions

2

Solved

I'm trying to do basic background jobs in PowerShell 2.0, and I'm seeing different things with start-job and invoke-command -asjob. If I do this: start-job -scriptblock {get-process} I get a job...
Matheny asked 12/11, 2009 at 22:9

1

I'm using Invoke-Expression under remote session and when throws exception - it returns just RemoteException without any stack trace information. Example: try { Invoke-Expression "$command 2>...
Hallett asked 10/6, 2014 at 15:49

1

Solved

First short code, then question $session = New-PSSession -ComputerName someServer $servicesList = "Service1", "Service2", "Service3" Invoke-Command -ScriptBlock { Param ($newServicesList)...
Halden asked 11/9, 2013 at 14:28

3

Solved

I have a problem, I have a script which: Connect with PSSession (I use PSSession with admin account) Stop 2 process Do change on them files Start the 2 process (Problem here) I want to start pr...
Pichardo asked 12/8, 2013 at 8:39

5

Solved

I want to invoke a command when ENTER is pressed in a TextBox. Consider the following XAML: <UserControl ... xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Intera...
Dingle asked 29/1, 2011 at 0:10

4

Solved

Setup Mac OSX 10.6.8, Apache Tomcat 6.0.16, Java1.6.0_29, Eclipse IDE Indigo. I asked a similar question to this before at How to execute and include a Java API from a Web App project but the set ...
Collettecolletti asked 5/3, 2012 at 12:10

2

Solved

When i run the Powershell script below i receive the error below. How do i run programs through powershell with parameters? The script will be a group policy logon. Invoke-Expression : A positio...
Ripple asked 9/1, 2012 at 15:47

2

Solved

I want to use Powershell in order to call a batch file on remote machines. This batch file has arguments. Here's what I have so far: $script = "\\fileshare\script.cmd" $server = $args[0] $args [st...

3

Solved

I realised that when using an InvokeCommandAcction associated to an EventTrigger, the original event was still routing up to the parent elements until it is handled. Well, I guess it is an expected...
Grimsby asked 4/10, 2011 at 12:6

2

Solved

I've tried a number of different ways to do this, they all result in the same error. Here is one set of commands: $s = New-PSsession -ComputerName ServerA $job = Invoke-Command -Session $s -Script...
Schiffman asked 12/11, 2010 at 22:24

2

Solved

I have a set of PowerShell scripts that include a "common" script, located in the same folder, like this: # some-script.ps1 $scriptDir = Split-Path -Parent $myinvocation.mycommand.path . "$scriptD...
Airedale asked 7/3, 2011 at 12:1

4

Solved

OK here is my issue: I am trying to run a script remotely on a server. I am an administrator on both boxes, firewall exceptions are in place, remote admin is enabled, and everything else looks ...
Partiality asked 11/2, 2010 at 22:5

© 2022 - 2024 — McMap. All rights reserved.