< Back

Connect-Teamviewer

Sat Jan 18, 2020 8:01 pm

NAME Connect-Teamviewer



SYNOPSIS

Connects to a Teamviewer Device





SYNTAX

Connect-Teamviewer [-AccessToken <SecureString>] -ComputerName <String[]> -Password <SecureString>

[-UpdateDeviceList] [<CommonParameters>]





DESCRIPTION

Connects to a Teamviewer Device using ComputerName.



Requires a Teamviewer Access Token to be set via Set-TeamviewerAccessToken. If in a new PowerShell Session, you

can load a saved Access Token with Initialize-Teamviewer.





PARAMETERS

-AccessToken <SecureString>

The Teamviewer Access Token.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-ComputerName <String[]>

The name or the alias of the Device to be connected to.



Required? true

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-Password <SecureString>

The Teamviewer Device password.



Required? true

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-UpdateDeviceList [<SwitchParameter>]

Update the Devices List Global Variable that the Device information is stored. Teamviewer accounts with a

large device list can take a very long time to send a response back with Device Ids. To get around this Device

information is gathered and stored when Initialize-Teamviewer is ran to decrypt the Teamviewer Access Token.

This allows quick Device information look up.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

System.String[]







OUTPUTS

System.Object







NOTES





Before you can use this Command you need to set you Teamviewer AccessToken with Set-TeamviewerAccessToken or

load a previously saved AccessToken with Initialize-Teamviewer.



-------------------------- EXAMPLE 1 --------------------------



PS C:\\> Connect-Teamviewer -ComputerName 'TestName' -Password $SecureString



Connects to Teamviewer device using supplied password as Secure String.

-------------------------- EXAMPLE 2 --------------------------



PS C:\\> Connect-Teamviewer -ComputerName 'TestName'



Connects to Teamviewer device and prompts the User to enter the Device Password.

-------------------------- EXAMPLE 3 --------------------------



PS C:\\> $ComputerList = @('Test1','Test2')

PS C:\\> Connect-Teamviewer -ComputerName $ComputerList



Connects to Teamviewer devices Test1 and Test2 and prompts the User to enter the Device Password.

-------------------------- EXAMPLE 4 --------------------------



PS C:\\> Connect-Teamviewer -ComputerName 'Test'



The user is prompted to select a Device from a list of Matches of Devices with the word 'Test' in the name.

-------------------------- EXAMPLE 5 --------------------------



PS C:\\> Connect-Teamviewer -ComputerName 'TestName' -UpdateDeviceList



Updates the stored Device list before connecting to the Device. Requires the Teamviewer AccessToken to be set

using Set-TeamviewerAccessToken or Initialize-Teamviewer to load a previously saved one.



RELATED LINKS

Online Version http://posh-teamviewer.readthedocs.io/e ... eamviewer/

Markdown Version https://github.com/gerane/Posh-Teamview ... mviewer.md

Documentation https://readthedocs.org/projects/posh-teamviewer/

PSGallery https://www.powershellgallery.com/packa ... eamviewer/

Create Teamviewer Access Token https://integrate.teamviewer.com/en/dev ... eateScript

Teamviewer Api Documentation https://integrate.teamviewer.com/en/develop/api/