Repository navigation
Set XKCDDefault
Sets default preferences used automatically by other cmdlets in this module, such as whether to use high quality images by default.
Set-XKCDDefault [-HighQuality] [[-Path] <String>] [-FullSearch] [-SkipCacheRefresh] [[-CachePath] <String>]
[[-StatePath] <String>] [-Explanation] [-Transcript] [-Discussion] [-Full] [-Offline] [-Reset]
[[-DefaultsPath] <String>] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
The Set-XKCDDefault cmdlet saves default preferences that are then used automatically by other cmdlets in this module, so you don't need to specify the same parameters every time. Explicitly specifying a parameter on a cmdlet (e.g. Get-XKCD -HighQuality:$false) always overrides the saved default.
Only the preferences you specify are changed -- any others already saved are left as they are. Use -Reset to remove all saved preferences and restore the module's built-in behavior.
Supported preferences:
-HighQuality Default for -HighQuality on Get-XKCD, Show-XKCD, Get-XKCDExplanation, Show-XKCDExplanation and Export-XKCDTerminalImage. -Path Default download directory for Get-XKCD -Download, and default save directory for Export-XKCDTerminalImage. -FullSearch Default for -FullSearch on Find-XKCD. -SkipCacheRefresh Default for -SkipCacheRefresh on Find-XKCD. -CachePath Default comic data cache location for Update-XKCDCache, Get-XKCDCache and Find-XKCD. -StatePath Default location of the most-recently-viewed record for Show-XKCD, Get-XKCD -Show and Test-XKCD. -Explanation Default for -Explanation on Get-XKCDExplanation and Show-XKCDExplanation. -Transcript Default for -Transcript on Get-XKCDExplanation and Show-XKCDExplanation. -Discussion Default for -Discussion on Get-XKCDExplanation and Show-XKCDExplanation. -Full Default for -Full on Get-XKCDExplanation and Show-XKCDExplanation. -Offline Default for -Offline on Get-XKCD, Show-XKCD, Find-XKCD, Export-XKCDTerminalImage and Test-XKCD.
Set-XKCDDefault -HighQuality
Makes Get-XKCD, Show-XKCD, Get-XKCDExplanation and Show-XKCDExplanation use high quality images by default.
Set-XKCDDefault -Path C:\XKCD
Makes Get-XKCD -Download save images to C:\XKCD by default.
Set-XKCDDefault -Full
Makes Get-XKCDExplanation and Show-XKCDExplanation retrieve the explanation, transcript, and discussion by default.
Set-XKCDDefault -Offline
Makes Get-XKCD, Show-XKCD, Find-XKCD, Export-XKCDTerminalImage and Test-XKCD use their local cache (and, for Get-XKCD/Show-XKCD/Export-XKCDTerminalImage, previously downloaded images) by default, instead of querying the xkcd API.
Set-XKCDDefault -HighQuality:$false
Explicitly saves -HighQuality as disabled by default, overriding a previously saved value.
Set-XKCDDefault -Reset
Removes all saved default preferences.
Sets the default for -HighQuality, used by Get-XKCD, Show-XKCD, Get-XKCDExplanation, Show-XKCDExplanation and Export-XKCDTerminalImage.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseSets the default download directory used by Get-XKCD -Download, and the default save directory used by Export-XKCDTerminalImage.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSets the default for -FullSearch, used by Find-XKCD.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseSets the default for -SkipCacheRefresh, used by Find-XKCD.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseSets the default comic data cache location used by Update-XKCDCache, Get-XKCDCache and Find-XKCD.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSets the default location of the most-recently-viewed record used by Show-XKCD, Get-XKCD -Show and Test-XKCD.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSets the default for -Explanation, used by Get-XKCDExplanation and Show-XKCDExplanation.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseSets the default for -Transcript, used by Get-XKCDExplanation and Show-XKCDExplanation.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseSets the default for -Discussion, used by Get-XKCDExplanation and Show-XKCDExplanation.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseSets the default for -Full, used by Get-XKCDExplanation and Show-XKCDExplanation.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseSets the default for -Offline, used by Get-XKCD, Show-XKCD, Find-XKCD, Export-XKCDTerminalImage and Test-XKCD.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseRemoves all saved default preferences, restoring the module's built-in behavior.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalsePath to the file used to store default preferences. By default this is in the user's per-user data directory (~/.xkcd).
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: (Get-XKCDUserDataPath -FileName 'XKCD.defaults.json' -LegacyDirectory $PSScriptRoot)
Accept pipeline input: False
Accept wildcard characters: FalseShows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalsePrompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False{{Fill ProgressAction Description}}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
https://github.com/markwragg/Powershell-XKCD/wiki/Set-XKCDDefault