-
Notifications
You must be signed in to change notification settings - Fork 4
New KNSession
Authentificate on Keenetic device and save session parameters
New-KNSession [[-Target] <Uri>] [-Credential] <PSCredential> [-AsDefaultSession] [<CommonParameters>]
Pass through auth challenge on given device and output result for future use. Please note about session expiration after few minutes of inactivity.
Get-Credential | New-KNSession -Target https://my.keenetic.com -AsDefaultSession
Log onto Keenetic Router on given URL and credentials and save session parameters in memory for further use.
$Session = New-KNSession -Credential (Get-Credential)
Log onto Keenetic Router on default address 'http://my.keenetic.net' and return session parameters as an object.
URL to connect, like 'http://192.168.0.1' or 'https://my.keenetic.pro'. Presumes 'http://my.keenetic.net' by default.
Type: Uri
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: Http://my.keenetic.net
Accept pipeline input: False
Accept wildcard characters: False
User name and password for target device. User must have 'http' tag to interact with core interface.
Type: PSCredential
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Store session parameters to $DefaultKNSession instead of returning object
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.