--- title: "New-NectarLocation" slug: "new-nectarlocation" updated: 2023-05-15T17:41:30Z published: 2023-05-15T17:41:30Z canonical: "support.nectarcorp.com/new-nectarlocation" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.nectarcorp.com/llms.txt > Use this file to discover all available pages before exploring further. # New-NectarLocation Creates a Nectar DXP location in the location database ## Description Creates a Nectar DXP location in the location database. This command can use the Google Geocode API to automatically populate the latitude/longitude for each location. You can register for an API key and save it as persistent environment variable called GoogleGeocode_API_Key on this machine. This command will prompt for the GeoCode API key and will save it in the appropriate location. Follow this link to get an API Key - https://developers.google.com/maps/documentation/geocoding/get-api-key. If this is not an option, then use the -SkipGeoLocate switch ## Syntax ``` New-NectarLocation -Network -NetworkMask -ExtNetwork -ExtNetworkMask -NetworkName -SiteName -SiteCode -Region -StreetAddress -City -State -PostCode -Country -Description -IsWireless -IsExternal -IsVPN -SkipGeoLocate -Latitude -Longitude -TenantName ``` ## Examples ### Example 1 ``` New-NectarLocation -Network 10.14.3.0 -NetworkMask 24 -NetworkName Corp5thFloor -SiteName 'Head Office' ``` Creates a new location using the minimum required information ### Example 2 ``` New-NectarLocation -Network 10.15.1.0 -NetworkMask 24 -ExtNetwork 79.23.155.71 -ExtNetworkMask 28 -NetworkName Corp3rdFloor -SiteName 'Head Office' -SiteCode HO3 -IsWireless True -IsVPN False -Region EastUS -StreetAddress '366 North Broadway' -City Jericho -State 'New York' -Country US -PostCode 11753 -Description 'Head office 3rd floor' -Latitude 40.7818283 -Longitude -73.5351438 ``` Creates a new location using all available fields ### Example 3 ``` Import-Csv LocationData.csv | New-NectarLocation ``` Imports a CSV file called LocationData.csv and creates new locations ### Example 4 ``` Import-Csv LocationData.csv | New-NectarLocation -SkipGeolocate ``` Imports a CSV file called LocationData.csv and creates new locations but will not attempt geolocation ## Parameters **-Network ** The IP subnet of the network | Parameter | Value | | --- | --- | | Required | true | | Position | 1 | | Required | true | | Default Value | None | | Accept pipeline input? | true (ByPropertyName) | | Accept wildcard characters? | false | **-NetworkMask ** The subnet mask of the network | Parameter | Value | | --- | --- | | Required | true | | Position | 2 | | Required | true | | Default Value | None | | Accept pipeline input? | true (ByPropertyName) | | Accept wildcard characters? | false | **-ExtNetwork ** The IP subnet of the external/public network. Optional. Used to help differentiate calls from corporate locations that use common home subnets (192.168.x.x) | Parameter | Value | | --- | --- | | Required | false | | Position | 3 | | Required | false | | Default Value | None | | Accept pipeline input? | true (ByPropertyName) | | Accept wildcard characters? | false | **-ExtNetworkMask ** The subnet mask of the external/public network. Optional. Used to help differentiate calls from corporate locations that use common home subnets (192.168.x.x) | Parameter | Value | | --- | --- | | Required | false | | Position | 4 | | Required | false | | Default Value | None | | Accept pipeline input? | true (ByPropertyName) | | Accept wildcard characters? | false | **-NetworkName ** The name to give to the network | Parameter | Value | | --- | --- | | Required | true | | Position | 5 | | Required | true | | Default Value | None | | Accept pipeline input? | true (ByPropertyName) | | Accept wildcard characters? | false | **-SiteName ** The name to give to the site | Parameter | Value | | --- | --- | | Required | true | | Position | 6 | | Required | true | | Default Value | None | | Accept pipeline input? | true (ByPropertyName) | | Accept wildcard characters? | false | **-SiteCode ** A site code to assign to the site | Parameter | Value | | --- | --- | | Required | false | | Position | 7 | | Required | false | | Default Value | None | | Accept pipeline input? | true (ByPropertyName) | | Accept wildcard characters? | false | **-Region ** The name of the region. Typically is set to country name or whatever is appropriate for the company | Parameter | Value | | --- | --- | | Required | false | | Position | 8 | | Required | false | | Default Value | None | | Accept pipeline input? | true (ByPropertyName) | | Accept wildcard characters? | false | **-StreetAddress ** The street address of the location | Parameter | Value | | --- | --- | | Required | false | | Position | 9 | | Required | false | | Default Value | None | | Accept pipeline input? | true (ByPropertyName) | | Accept wildcard characters? | false | **-City ** The city of the location | Parameter | Value | | --- | --- | | Required | false | | Position | 10 | | Required | false | | Default Value | None | | Accept pipeline input? | true (ByPropertyName) | | Accept wildcard characters? | false | **-State ** The state/province of the location | Parameter | Value | | --- | --- | | Required | false | | Position | 11 | | Required | false | | Default Value | None | | Accept pipeline input? | true (ByPropertyName) | | Accept wildcard characters? | false | **-PostCode ** The postal/zip code of the location | Parameter | Value | | --- | --- | | Required | false | | Position | 12 | | Required | false | | Default Value | None | | Accept pipeline input? | true (ByPropertyName) | | Accept wildcard characters? | false | **-Country ** The 2-letter ISO country code of the location | Parameter | Value | | --- | --- | | Required | false | | Position | 13 | | Required | false | | Default Value | None | | Accept pipeline input? | true (ByPropertyName) | | Accept wildcard characters? | false | **-Description ** A description to apply to the location | Parameter | Value | | --- | --- | | Required | false | | Position | 14 | | Required | false | | Default Value | None | | Accept pipeline input? | true (ByPropertyName) | | Accept wildcard characters? | false | **-IsWireless ** True or false if the network is strictly wireless | Parameter | Value | | --- | --- | | Required | false | | Position | 15 | | Required | false | | Default Value | None | | Accept pipeline input? | true (ByPropertyName) | | Accept wildcard characters? | false | **-IsExternal ** True or false if the network is outside the corporate network | Parameter | Value | | --- | --- | | Required | false | | Position | 16 | | Required | false | | Default Value | None | | Accept pipeline input? | true (ByPropertyName) | | Accept wildcard characters? | false | **-IsVPN ** True or false if the network is a VPN | Parameter | Value | | --- | --- | | Required | false | | Position | 17 | | Required | false | | Default Value | None | | Accept pipeline input? | true (ByPropertyName) | | Accept wildcard characters? | false | **-SkipGeoLocate ** Don't attempt geolocation. Do this if you don't have a valid Google Maps API key. | Parameter | Value | | --- | --- | | Required | false | | Position | named | | Required | false | | Default Value | False | | Accept pipeline input? | false | | Accept wildcard characters? | false | **-Latitude ** The geographical latitude of the location. If not specified, will attempt automatic geolocation. | Parameter | Value | | --- | --- | | Required | false | | Position | 18 | | Required | false | | Default Value | 0 | | Accept pipeline input? | true (ByPropertyName) | | Accept wildcard characters? | false | **-Longitude ** The geographical longitude of the location. If not specified, will attempt automatic geolocation. | Parameter | Value | | --- | --- | | Required | false | | Position | 19 | | Required | false | | Default Value | 0 | | Accept pipeline input? | true (ByPropertyName) | | Accept wildcard characters? | false | **-TenantName ** The name of the Nectar DXP tenant. Used in multi-tenant configurations. | Parameter | Value | | --- | --- | | Required | false | | Position | 20 | | Required | false | | Default Value | None | | Accept pipeline input? | true (ByPropertyName) | | Accept wildcard characters? | false |