0
votes
0answers
20 views

Running Remote Powershell Commandlet that wraps a process exits before completion

I have a custom PowerShell commandlet that I have created in C# that spins up some instances of vstest.console.exe and publishes the test results to a .trx file or to tfs. This commandlet works in ...
2
votes
1answer
35 views

How to Write-Verbose from Invoke-Command?

In powershell Write-Verbose and the -Verbose flag are used to provide verbose information when commands are run in verbose mode. I am running some scripts remotely and would like to capture the ...
0
votes
1answer
21 views

Invoke-Command invocation of server script error

I have this script in the client computer that try to run a script from the server computer: try { $s = New-PSSession -ComputerName "name" -Authentication CredSSP -Credential $credential ...
0
votes
0answers
35 views

how do i prevent my script for waitnig for user input

i am writing a code that runs on remote computer using psexec, in some point of the code it stop and wait for user to press enter in order to continue , this only happens on remote! when i use local ...
5
votes
1answer
94 views

Creating a registry key with path components via PowerShell

For a legacy application, I need to create a registry key with a name in the format c:/foo/bar/baz. (Note: forward slashes, not backslashes.) To be clear: that is a single key's name, with forward ...
3
votes
3answers
64 views

PSRemoting performance overhead with get-childItem

This completes in 2.3 minutes on LOCALSERVER: A: measure-command {$x = invoke-command {gci -recurse "C:\"}} This completes in 38.4 minutes on LOCALSERVER: B: measure-command {$x = ...
1
vote
0answers
48 views

Powershell: Remote install fails when trying to connect to database

I have been struggling for a few days with this issue. I tried googling the issue but haven't found any answers. I am trying to install an exe on a remote machine (VM) using powershell. The ...
2
votes
1answer
46 views

Run a local function on a remote computer?

I have a simple function on my computer MYPC> $txt = "Testy McTesterson" MYPC> function Do-Stuff($file) { cd c:\temp; $txt > $file; } I would like to run it on a remote computer ...
0
votes
0answers
45 views

Running console EXE from PowerShell: different behavior in output in local and remote sessions

I'm trying to unzip an archive with 7za.exe (stand-alone version of 7-zip) from PowerShell. Basically, striping out all service code, my attempt looks like this: [string]$pathTo7z = ...
1
vote
2answers
150 views

powershell invoke-command does not work if I use -computerName

I want to execute below code in the either local or remote machine whith current user. $BackUpSqlAgentAndRemoveOldbackup = { ...
1
vote
2answers
492 views

Unable to Connect to live@edu through Powershell

HI, I am trying to connect to live@edu using powershell with following command. Command Fired: $SessionNew = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri ...
0
votes
1answer
89 views

Restarting PC's and writing to the event log with a custom message

I have written a script in PowerShell that will remotely restart a list of PC's using the 'Restart-Computer' command. Is there a way of adding a custom message to the systems event log, to explain ...
0
votes
3answers
126 views

In PowerShell how to copy files from a Remote PSsession to another Windows server

I am trying to copy a folder from one remote server to another inside a PSSession, it's giving errors like access is denied. I have admin privileges to both of the servers. If I try it without ...
0
votes
0answers
418 views

The data is invalid Error using Powershell Remoting and Get-WebSite (WebAdministration Module)

I'm using Win 7 64 bits, Windows PowerShell 2.0, and VS 2010 , .NET 4.0 and Unit Test project. C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe (32 bits) I use PS Console ...
0
votes
2answers
201 views

Powershell XML Export-csv not appending a Hash

I am fairly new to Powershell, I have rather weird xml according to me, My main objective is to convert the XML into CSV, where it ll be further used to sync to a database. I have used the Powershell ...

1 2 3 4 5 12
15 30 50 per page