Copy-ContentToCache
SYNOPSIS
Copies the toolkit content to a cache folder on the local machine and sets the $dirFiles and $supportFiles directory to the cache path
SYNTAX
Copy-ContentToCache [[-Path] <String>] [<CommonParameters>]
DESCRIPTION
Copies the toolkit content to a cache folder on the local machine and sets the $dirFiles and $supportFiles directory to the cache path
EXAMPLES
EXAMPLE 1
Copy-ContentToCache -Path 'C:\Windows\Temp\PSAppDeployToolkit'
PARAMETERS
-Path
The path to the software cache folder
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: "$configToolkitCachePath\$installName"
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
OUTPUTS
NOTES
This function is provided as a template to copy the toolkit content to a cache folder on the local machine and set the $dirFiles directory to the cache path. This can be used in the absence of an Endpoint Management solution that provides a managed cache for source files, e.g. Intune is lacking this functionality whereas ConfigMgr includes this functionality. Since this cache folder is effectively unmanaged, it is important to cleanup the cache in the uninstall section for the current version and potentially also in the pre-installation section for previous versions. This can be done using [Remove-File -Path "$configToolkitCachePath$installName" -Recurse -ContinueOnError $true]