Import-BirdWeatherModuleSettings
SYNOPSIS
Imports the BirdWeather BaseURI, station token, API key, & JSON configuration information to the current session
SYNTAX
Set (Default)
Import-BirdWeatherModuleSettings [[-BirdWeatherConfigPath] <string>]
[[-BirdWeatherConfigFile] <string>]
ALIASES
This cmdlet has the following aliases,
- Import-BWModuleSettings
DESCRIPTION
The Import-BirdWeatherModuleSettings cmdlet imports the BirdWeather BaseURI, station token, API key, & JSON configuration information stored in the BirdWeather configuration file to the users current session
By default the configuration file is stored in the following location: $env:USERPROFILE\Celerium.BirdWeather
Environment variables are also supported and take precedence over the values stored in the configuration file:
BIRDWEATHER_BASE_URI - the BirdWeather host (a REST or GraphQL url is converted to the host)
BIRDWEATHER_STATION_TOKEN - the station token of the REST API
BIRDWEATHER_ADMIN_TOKEN - an administrator API token of the REST API, used instead of the station token
BIRDWEATHER_API_KEY - the Bearer API key of the GraphQL API
The environment variables of the Celerium.BirdWeatherREST & Celerium.BirdWeatherGraphQL modules are read when the new variable is not defined:
BIRDWEATHERREST_BASE_URI & BIRDWEATHERGRAPHQL_BASE_URI
BIRDWEATHERREST_API_KEY (station token)
BIRDWEATHERREST_ADMIN_TOKEN
BIRDWEATHERGRAPHQL_API_KEY
When no base URI is configured the BirdWeather production API is used: https://app.birdweather.com
EXAMPLES
EXAMPLE 1
Import-BirdWeatherModuleSettings
Validates that the configuration file created with the Export-BirdWeatherModuleSettings cmdlet exists then imports the stored data into the current users session
The default location of the BirdWeather configuration file is: $env:USERPROFILE\Celerium.BirdWeather\config.psd1
EXAMPLE 2
Import-BirdWeatherModuleSettings -BirdWeatherConfigPath C:\Celerium.BirdWeather -BirdWeatherConfigFile MyConfig.psd1
Validates that the configuration file created with the Export-BirdWeatherModuleSettings cmdlet exists then imports the stored data into the current users session
The location of the BirdWeather configuration file in this example is: C:\Celerium.BirdWeather\MyConfig.psd1
PARAMETERS
-BirdWeatherConfigFile
Define the name of the BirdWeather configuration file
By default the configuration file is named: config.psd1
Type: System.String
DefaultValue: config.psd1
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 1
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-BirdWeatherConfigPath
Define the location to store the BirdWeather configuration file
By default the configuration file is stored in the following location: $env:USERPROFILE\Celerium.BirdWeather
Type: System.String
DefaultValue: $(Join-Path -Path $Home -ChildPath $(if ($IsWindows -or $PSEdition -eq 'Desktop') {"Celerium.BirdWeather"}else{".Celerium.BirdWeather"}) )
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
OUTPUTS
NOTES
N/A