다음을 통해 공유


PowerShellAssemblyLoadContextInitializer.SetPowerShellAssemblyLoadContext Method

Definition

Create a singleton of PowerShellAssemblyLoadContext. Then register to the Resolving event of the load context that loads this assembly.

public:
 static void SetPowerShellAssemblyLoadContext(System::String ^ basePaths);
public:
 static void SetPowerShellAssemblyLoadContext(Platform::String ^ basePaths);
 static void SetPowerShellAssemblyLoadContext(std::wstring const & basePaths);
public static void SetPowerShellAssemblyLoadContext (string basePaths);
static member SetPowerShellAssemblyLoadContext : string -> unit
Public Shared Sub SetPowerShellAssemblyLoadContext (basePaths As String)

Parameters

basePaths
String

Base directory paths that are separated by semicolon ';'. They will be the default paths to probe assemblies.

Remarks

This method is to be used by native host whose TPA list doesn't include PS assemblies, such as the in-box Nano powershell, the PS remote WinRM plugin, in-box Nano DSC and in-box Nano SCOM agent.

Applies to