UtilPowerShellExecutePowerShellCommand(String, IList, String) Method

Executes the specified PowerShell command and returns the execution results.

Definition

Namespace: DevCase.Core.Diagnostics.PowerShell
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static Collection<PSObject> ExecutePowerShellCommand(
	string command,
	IList parameters,
	params string[] importModules
)

Parameters

command  String
The PowerShell command to execute.
parameters  IList
A list of parameter names.
importModules  String
Specifies PowerShell's module names to import.

Return Value

CollectionPSObject
A CollectionT object that represents the command execution results.

Remarks

Note: To use this functionality you need to install this nuget package:

System.Management.Automation

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

See Also