Tags "wsman" Result

How to access WinRM in C#

I'd like to create a small application that can collect system information (Win32_blablabla) using WinRM as opposed to WMI. How can i do that from C#? The main goal is to use WS-Man (WinRm) as opposed to DCOM (WMI). Solution I guess the easiest way would be to use WSMAN automation. Reference wsmauto.dll from windwos\system32 in your project: t

it1352 50 2019-05-10

Powershell to Exchange 2013 - Restricted language mode error

I'm working on a C# web service that will be deployed on an Exchange 2013 server. This service will be responsible for running powershell commands to configure Exchange. I connect via a runspace created like this const string shellUri = "http://schemas.microsoft.com/powershell/microsoft.exchange"; var uri = new Uri(_exchangeConnectionUri); var cr

it1352 0 2020-11-01

PowerShell remoting: Controlling what edition is being targeted (PowerShell Core or Windows PowerShell); the state of cross-platform remoting

This self-answered question, which focuses on Windows[1], addresses the following aspects: Now that there are two PowerShell editions - the legacy, Windows-only Windows PowerShell and the cross-platform PowerShell Core, both may be installed on a given Windows machine: How can I tell which PowerShell edition will execute remote commands, such as

it1352 8 2020-07-03

Create remote powershell session in c#?

I'm very new to PS so I think I'm missing something basic here. I can do a remote powershell session like this... $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://remote.com/Powershell -Credential "Domain\Admin" I want the equivalent in C# so I'm tryi

it1352 2 2019-05-10