About NordVPN-Servers Settings

about_NordVPN-Servers_Settings

SHORT DESCRIPTION

Describes the persistent settings of the NordVPN-Servers PowerShell module.

LONG DESCRIPTION

The NordVPN-Servers module utilises persistent settings stored in the module root, as JSON file NordVPN-Servers.settings.json. The settings can be changed in this file directly, or using the command Set-NordVPNModuleSetting [-Name] <string> [[-Value] <object>]. The currently available settings are described below:

FALLBACK FILES

The fallback files are stored in the module directory and contain pre-processed copies of the data available from the NordVPN web API. They are stored in CLI XML format.

Filename Approx. size
NordVPN_Countries.xml 57 KB
NordVPN_Groups.xml 10 KB
NordVPN_Technologies.xml 8 KB
NordVPN_Servers.xml 40 MB
NordVPN_Servers.xml.zip 1.3 MB

The final item in the list is the compressed version of the server fallback file.

These files can be updated using the -UpdateFallback switch parameter in the functions Get-NordVPNCountryList, Get-NordVPNGroupList, Get-NordVPNTechnologyList, and Get-NordVPNServerList. The files are utilised when the OfflineMode setting is enabled, or when the -Offline switch parameter is passed to one of the four functions above.

EXAMPLES

The Get-NordVPNModuleSetting function is used to retrieve the values of one or all module settings. Not passing any parameters displays the current value of all settings. The function can also display the required type and default value of a setting. See the Get-NordVPNModuleSetting help topic for full usage.

Get-NordVPNModuleSetting

Name                           Value
----                           -----
TechnologyCacheLifetime        600
DeleteServerFallbackAfterUse   False
CountryCacheLifetime           600
OfflineMode                    False
GroupCacheLifetime             600

The Set-NordVPNModuleSetting function is used to set the values of a module setting. The function will also reset a setting to default if the -Value parameter is omitted. See the Set-NordVPNModuleSetting help topic for full usage.

# Sets the country cache lifetime to 5 minutes.
Set-NordVPNModuleSetting CountryCacheLifetime 300

# Sets the country cache lifetime back to default
Set-NordVPNModuleSetting CountryCacheLifetime

Reset setting to default
This will reset 'CountryCacheLifetime' to its default of 600. Are you sure?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): y

The Reset-NordVPNModule function is used to reset the values of a module setting to its default value. See the Reset-NordVPNModule help topic for full usage.

Get-NordVPNModuleSetting

Name                           Value
----                           -----
TechnologyCacheLifetime        500
DeleteServerFallbackAfterUse   True
CountryCacheLifetime           300
OfflineMode                    False
GroupCacheLifetime             400

# Resets all module settings back to default
Reset-NordVPNModule

Get-NordVPNModuleSetting

Name                           Value
----                           -----
TechnologyCacheLifetime        600
DeleteServerFallbackAfterUse   False
CountryCacheLifetime           600
OfflineMode                    False
GroupCacheLifetime             600

NOTE

Deleting the NordVPN-Servers.settings.json file will result in the module settings being reverted to their defaults.

SEE ALSO

This page on GitHub Pages

KEYWORDS