Auth

New-NetstorageAuth

Synopsis

Create and write NetStorage credentials to an auth file.

Syntax

New-NetstorageAuth [-UploadAccountID] <String> [[-AuthSection] <String>] [[-OutputDirectory] <String>]
 [[-EdgeRCFile] <String>] [[-Section] <String>] [[-AccountSwitchKey] <String>]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

Description

Creates a new NetStorage auth file or appends an existing auth file with NetStorage Usage API credentials.

Examples

Example 1

Creates a new .nsrc at the root directory with the defaults.

New-NetStorageAuth -UploadAccountID 'my-upload-account-id'

Example 2

Creates a new .nsrc at a given directory.

New-NetStorageAuth -UploadAccountID 'my-upload-account-id' -OutputDirectory '~/another/path'

Parameters

-UploadAccountID

A NetStorage upload account's ID.

Type: String
Parameter Sets: (All)
Aliases: None
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AuthSection

A human-readable name for the new credentials section. Use only lowercase alpha, numbers, or dashes for the value. Defaults to default.

Type: String
Parameter Sets: (All)
Aliases: None
Required: False
Position: 2
Default value: Default
Accept pipeline input: False
Accept wildcard characters: False

-OutputDirectory

The path to the directory in which to place the new .nsrc file. Defaults to ~/.nsrc.

Type: String
Parameter Sets: (All)
Aliases: None
Required: False
Position: 3
Default value: ~
Accept pipeline input: False
Accept wildcard characters: False

-EdgeRCFile

The path to an .edgerc file. Defaults to ~/.edgerc.

Type: String
Parameter Sets: (All)
Aliases: None
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Section

The edgerc section name. Defaults to default.

Type: String
Parameter Sets: (All)
Aliases: None
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AccountSwitchKey

A key used to apply changes to an account external to your credentials' account.

Type: String
Parameter Sets: (All)
Aliases: None
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Outputs

Related links