runspace Questions
3
I am using System.Management.Automation with reference assemblies 4.0 with C#
I need to see the output of Write-Host. Documentation says that Write-Host will be outputted in the output stream. What...
Injudicious asked 30/8, 2018 at 15:51
3
Solved
I am creating a powershell script with a GUI, that copies user profiles from a selected source disk to a destination disk. I've created the GUI in XAML, with VS Community 2019.
The script works lik...
Lysin asked 1/1, 2021 at 14:47
2
Solved
Is there an easier way to run commands in parallel while keeping it efficient in Windows PowerShell?
This self-answer intends to provide an easy and efficient parallelism alternative for those stuck with Windows PowerShell and being unable to install Modules due to, for example, Company Policies....
Cerberus asked 30/10, 2022 at 23:53
2
I’m trying to use the Task class in Powershell to run an operation asynchronously.
But I’m getting the following exception:
Id : 1
Exception : System.AggregateException: One or more errors occurre...
Manvil asked 25/2, 2013 at 12:30
2
Solved
When running the script in Powershell i'm able to receive the Write-Host output but not in C#.
Here is the code for the output Write-Host "HELLO WORLD TEST."
The application fails when it reaches t...
Bondholder asked 30/1, 2020 at 14:24
2
Solved
Problem with Powershell object in C#9
I am trying to retrieve physical disks in C# using a system.management.powershell object.
When I try using the cmdlet “Get-Process” the powershell object retri...
Penumbra asked 4/9, 2021 at 1:14
2
Solved
PowerShell 7 introduced a much needed feature for running pipeline input in parallel.
The documentation for PowerShell 7 does not provide any detail on how this is implemented.
Having leveraged...
Hydroplane asked 24/3, 2020 at 19:13
2
Solved
I'm trying to implement a remote runspace that needs both connectionInfo to talk to Exchange and an imported module to talk to active directory. Here is problem code:
runspace = System.Management....
Chose asked 7/1, 2014 at 18:17
1
Solved
I'm struggling to draw the boundaries in my head for PowerShell. My very limited understanding is this:
A Scope contains user/script defined variables and functions, and there can be a hierarchy ...
Misbeliever asked 18/1, 2017 at 19:41
3
Solved
I am trying with C# to execute a Powershell file with paramters in a runspace. Unfortunately i get the following output:
A command that prompts the user failed because the host program or the
c...
Spherics asked 21/9, 2014 at 20:33
2
Solved
I have a windows service that is doing a lot of exchange remote calls to get some server information. I noticed that as longs as the time passes the memory used by the service starts growing until ...
Phthisis asked 23/4, 2014 at 3:20
1
Solved
The only ways I know to connect to a remote runspace include the following parameters
WSManConnectionInfo connectionInfo =
new WSManConnectionInfo(false, "localhost", 80, "/Powershell", "http:/...
Page asked 27/3, 2012 at 13:3
1
I am trying to use InitialSessionState.ImportPSModule in order to import a Powershell module.
I am interested in knowing if importing of the module failed due to any reason (e.g file not found et...
Lazulite asked 18/12, 2012 at 8:49
1
Solved
Trying to execute a Powershell cmdlet from a MVC 3 Controller using impersonation but keep receiving an "Requested registry access is not allowed." exception when calling Runspace.Open()
StringBui...
Quillan asked 1/2, 2012 at 12:28
1
Solved
I'm writing a web service that executes powershell scripts (active directory, directory management, etc).
Right now, Runspace instance is created per web request. As Runspace initialization is tim...
Adriell asked 11/2, 2011 at 12:23
1
© 2022 - 2024 — McMap. All rights reserved.