# Save-ToolkitModule [Function index](README.md) | [Repository readme](../README.md) | [Source](../Toolkit/Functions/Save-ToolkitModule.ps1) > Idempotently saves one or more powershell modules into the toolkit module directory. ## Description The module is only downloaded when it is not already present within the destination directory, or when the requested version is newer than the version that is already present. This allows the parent script to be executed repeatedly without incurring repeated downloads. ## Parameters | Name | Type | Required | Aliases | Description | | --- | --- | --- | --- | --- | | `Name` | `String[]` | Yes | N | One or more powershell module name(s) to save. | | `Destination` | `IO.DirectoryInfo` | Yes | D, Path | A valid folder path. If the folder does not exist, it will be created. This is typically the "Toolkit\Modules" directory. | | `RequiredVersion` | `String` | No | RV | An optional specific module version to save. When omitted, the latest available version will be saved. | | `Repository` | `String` | No | R | The powershell repository to retrieve the module(s) from. | | `Force` | `Switch` | No | F | Save the module(s) even if they are already present within the destination directory. | | `ContinueOnError` | `Switch` | No | COE | Ignore failures. | ## Examples ### Example 1 ```powershell $SaveToolkitModuleParameters = New-Object -TypeName 'System.Collections.Specialized.OrderedDictionary' $SaveToolkitModuleParameters.Name = New-Object -TypeName 'System.Collections.Generic.List[System.String]' $SaveToolkitModuleParameters.Name.Add('Indented.Net.IP') $SaveToolkitModuleParameters.Name.Add('Indented.Net.Dns') $SaveToolkitModuleParameters.Destination = $ModulesDirectory.FullName $SaveToolkitModuleParameters.Verbose = $True $SaveToolkitModuleResult = Save-ToolkitModule @SaveToolkitModuleParameters Write-Output -InputObject ($SaveToolkitModuleResult) ``` ## Notes The saved module(s) are imported by the toolkit during the next execution of the parent script. Any module that is saved during the current execution is imported by this function so that it becomes immediately usable. ## Reference -