Repository navigation
Set CurrencyDefault
Sets default preferences used automatically by other cmdlets in this module, such as the currency to convert From, To, and your APIKey.
Set-CurrencyDefault [[-From] <String>] [[-To] <String>] [[-APIKey] <String>] [-Reset]
[[-DefaultsPath] <String>] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
The Set-CurrencyDefault 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. Convert-Currency -From EUR) 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:
-From Default for -From on Convert-Currency and Convert-CryptoCurrency, and -Currency (alias -From) on Get-ExchangeRate and Get-CryptoExchangeRate. -To Default for -To on Convert-Currency, Convert-CryptoCurrency, Get-ExchangeRate and Get-CryptoExchangeRate. -APIKey Default for -APIKey on Convert-Currency and Get-ExchangeRate.
Set-CurrencyDefault -From USD -To GBP
Makes Convert-Currency, Convert-CryptoCurrency, Get-ExchangeRate and Get-CryptoExchangeRate use USD and GBP by default, so they can be called without specifying -From/-To.
Set-CurrencyDefault -APIKey 12345abcdef
Makes Convert-Currency and Get-ExchangeRate use the specified API key by default.
Set-CurrencyDefault -Reset
Removes all saved default preferences.
Sets the default for -From on Convert-Currency and Convert-CryptoCurrency, and -Currency (alias -From) on Get-ExchangeRate and Get-CryptoExchangeRate.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSets the default for -To on Convert-Currency, Convert-CryptoCurrency, Get-ExchangeRate and Get-CryptoExchangeRate.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSets the default for -APIKey on Convert-Currency and Get-ExchangeRate.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
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 (~/.currencyconverter).
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: (Get-CurrencyDefaultsPath)
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-CurrencyConverter/wiki/Set-CurrencyDefault