mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Use params in ImportPSModule (#7933)
This commit is contained in:
@@ -1842,10 +1842,13 @@ namespace System.Management.Automation.Runspaces
|
||||
/// </summary>
|
||||
/// <param name="name">The modules to add</param>
|
||||
/// <returns></returns>
|
||||
public void ImportPSModule(string[] name)
|
||||
public void ImportPSModule(params string[] name)
|
||||
{
|
||||
if (name == null)
|
||||
{
|
||||
throw new ArgumentNullException("name");
|
||||
}
|
||||
|
||||
foreach (string n in name)
|
||||
{
|
||||
ModuleSpecificationsToImport.Add(new ModuleSpecification(n));
|
||||
|
||||
Reference in New Issue
Block a user