Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
1 vote
0 answers
43 views

Consider the following PowerShell which writes to each of the (non-output) streams in the current runspace, then does the same in another runspace created with $Host: $sb = { $DebugPreference = '...
alx9r's user avatar
  • 4,365
1 vote
1 answer
84 views

I'm getting an error saying bottom cannot be greater than or equal to top. I'm using the Rectangle constructor documented here: https://learn.microsoft.com/en-us/dotnet/api/system.management....
1 vote
1 answer
177 views

I'm trying to execute a PS1 file via a C# application and capture/segment the output based on severity. Error, Debug, Info, etc. This is a Windows Form application. Here's the Run Method, which I ...
1 vote
0 answers
443 views

In my PSCmdlet class I'm asking the user to make a choice with PromptForChoice. The user is prompted to select the connectionstring he wants to use. I can't manage to give the ChoiceDescriptions the ...
0 votes
1 answer
667 views

i am trying to implement a custom PSHost class for the purpose of crafting GUIs for Power Shell scripts. I have taken the code here as a base and started adapting it for GUI Projects https://msdn....
VikFreeze's user avatar
5 votes
1 answer
2k views

Background PowerShell 3 with SDK C# with Framework 4.5 Implementation I have implemented my own PSHost alogn with PSHostUserInterface. In PSHostUserInterface I override all Write... methods and ...
krs's user avatar
  • 599
2 votes
3 answers
10k views

I am trying to establish a session with a remote host B from my machine A, within a C# code. I am using runspace API for that. the code snippet is provided below Runspace runspace = ...
6 votes
3 answers
7k views

I've got a scipt executing in C# using the powershell async execution code on code project here: http://www.codeproject.com/KB/threads/AsyncPowerShell.aspx?display=PrintAll&fid=407636&df=90&...
1 vote
2 answers
753 views

I have a PSHost object executing a Powershell script myscript.ps1 and that .ps1 script is executing sqlcmd.exe to get what it needs done. Is there a way to keep it from popping up empty sqlcmd dos ...

AltStyle によって変換されたページ (->オリジナル) /