Skip to content

Register AvmApp

Gincules edited this page Apr 4, 2023 · 1 revision

Register-AvmApp

Synopsis

Action: RegisterApp
Available on: ✅ FRITZ!Box / 🚫 FRITZ!Repeater
Status: ✅
Remote access: 🚫
Required rights: 🔧 / ☎️ / 🖴 / 🏠

Description

This function returns registers a new app instance. A new app instance is created if an app instance with identifier AppId does not already exists. Otherwise the existing app instance is overwritten (any VoIP and VPN configuration of this app instance is deleted).

In case NewAppInternetRights is true and the app instance will get access rights from the internet and new port forwardings must be (automatically) activated (e.g. for HTTPS and FTP) configuration rights (write access) are required.

The effective access rights of the app instance are determined by the intersection of these rights and the rights of the box user of the security context this action was called in. Specific NAS directory access rights are not included in this parameter but determined by the box user only

Input:

Data type Variable Example or Description
String NewAppId 1
String NewAppDisplayName AppName
String NewAppDeviceMAC 1A:2B:3C:1A:2B:3C
String NewAppUsername AppUsername
SecureString NewAppPassword AppPassword as PowerShell SecureString
RightEnum NewAppRight NO, RO, RW, UNDEFINED
RightEnum NewNasRight NO, RO, RW, UNDEFINED
RightEnum NewPhoneRight NO, RO, RW, UNDEFINED
RightEnum NewHomeautoRight NO, RO, RW, UNDEFINED
Boolean NewAppInternetRights 0

Output:

Data type Variable Example
String u urn:dslforum-org:service:X_AVM-DE_AppSetup:1

Syntax

Register-AvmApp
    [-Insecure]
    [-RemoteAccess]
    [-Url <String>]
    [-Port <Ushort>]
    [-Credential <PSCredential>]
    [-NewAppId <String>]
    [-NewAppDisplayName <String>]
    [-NewAppDeviceMAC <String>]
    [-NewAppUsername <String>]
    [-NewAppPassword <SecureString>]
    [-NewAppRight <RightEnum>]
    [-NewNasRight <RightEnum>]
    [-NewPhoneRight <RightEnum>]
    [-NewHomeautoRight <RightEnum>]
    [-NewAppInternetRights <Boolean>]

Examples

Example 1

This example describes how to run the command using local connection with a valid certificate.

[PSCredential]$Credential = Import-Clixml -Path "${env:APPDATA}\PScred\avmtools-credential.xml"
[SecureString]$NewAppPassword = Get-Content -Path "${env:APPDATA}\PScred\function-password.txt" | ConvertTo-SecureString

$splatParameters = @{
    Url = "https://fritz.box"
    Port = 49443
    Credential = $Credential
    NewAppId = "1"
    NewAppDisplayName = "AppName"
    NewAppDeviceMAC = "1A:2B:3C:1A:2B:3C"
    NewAppUsername = "Username"
    NewAppPassword = $NewAppPassword
    NewAppRight = "RW"
    NewNasRight = "RW"
    NewPhoneRight = "RW"
    NewHomeautoRight = "RW"
    NewAppInternetRights = 1
}

Register-AvmApp @splatParameters

IP address can be used instead of DNS name.

[PSCredential]$Credential = Import-Clixml -Path "${env:APPDATA}\PScred\avmtools-credential.xml"
[SecureString]$NewAppPassword = Get-Content -Path "${env:APPDATA}\PScred\function-password.txt" | ConvertTo-SecureString

$splatParameters = @{
    Url = "https://192.168.178.1"
    Port = 49443
    Credential = $Credential
    NewAppId = "1"
    NewAppDisplayName = "AppName"
    NewAppDeviceMAC = "1A:2B:3C:1A:2B:3C"
    NewAppUsername = "Username"
    NewAppPassword = $NewAppPassword
    NewAppRight = "RW"
    NewNasRight = "RW"
    NewPhoneRight = "RW"
    NewHomeautoRight = "RW"
    NewAppInternetRights = 1
}

Register-AvmApp @splatParameters

Example 2

This example describes how to run the command using local connection without a valid certificate.

[PSCredential]$Credential = Import-Clixml -Path "${env:APPDATA}\PScred\avmtools-credential.xml"
[SecureString]$NewAppPassword = Get-Content -Path "${env:APPDATA}\PScred\function-password.txt" | ConvertTo-SecureString

$splatParameters = @{
    Insecure = $true
    Url = "http://fritz.box"
    Port = 49000
    Credential = $Credential
    NewAppId = "1"
    NewAppDisplayName = "AppName"
    NewAppDeviceMAC = "1A:2B:3C:1A:2B:3C"
    NewAppUsername = "Username"
    NewAppPassword = $NewAppPassword
    NewAppRight = "RW"
    NewNasRight = "RW"
    NewPhoneRight = "RW"
    NewHomeautoRight = "RW"
    NewAppInternetRights = 1
}

Register-AvmApp @splatParameters

IP address can be used instead of DNS name.

[PSCredential]$Credential = Import-Clixml -Path "${env:APPDATA}\PScred\avmtools-credential.xml"
[SecureString]$NewAppPassword = Get-Content -Path "${env:APPDATA}\PScred\function-password.txt" | ConvertTo-SecureString

$splatParameters = @{
    Insecure = $true
    Url = "http://192.168.178.1"
    Port = 49000
    Credential = $Credential
    NewAppId = "1"
    NewAppDisplayName = "AppName"
    NewAppDeviceMAC = "1A:2B:3C:1A:2B:3C"
    NewAppUsername = "Username"
    NewAppPassword = $NewAppPassword
    NewAppRight = "RW"
    NewNasRight = "RW"
    NewPhoneRight = "RW"
    NewHomeautoRight = "RW"
    NewAppInternetRights = 1
}

Register-AvmApp @splatParameters

Clone this wiki locally