TSplusDocs
Güncel v19 EN
TSplus Bağlantı İstemcisi

Bağlantı İstemcisi Oluşturucu — Komut Satırı Başvurusu

ClientGenerator.exe için sessiz komut satırı kullanımı; yeni istemci oluşturma ve mevcut .connect dosyasını düzenleme kipleri.

Çeviri notu: Bu yeni resmî teknik başvurunun Türkçe çevirisi henüz kaynak dokümantasyonda yayımlanmadı. Komutların doğruluğunu korumak için güncel resmî İngilizce içerik aşağıda eksiksiz sunulmaktadır.

ClientGenerator.exe supports two silent command-line modes:

  1. Generation mode — creates a new .connect client file from scratch.
  2. Edit mode (-edit) — edits an existing .connect file and writes the result to a new file.

The mode is selected automatically based on whether the -edit flag is present.


Generation mode

Creates a new .connect client file.

Syntax

ClientGenerator.exe -name "clientname.connect" [-location "output folder"] -server my.server.com -user login -psw password [...]

Parameters

ParameterRequiredDescription
-nameNoName of the generated .connect file. Defaults to Client-<timestamp>.connect if omitted.
-locationNoFolder where the file is generated. Defaults to the current user’s Desktop.
(all other parameters)DependsForwarded as-is to the client generation logic (-server, -user, -psw, etc.).

Example

ClientGenerator.exe -name "clientname.connect" -server my.server.com -server 127.0.0.1 -user login -psw password

Edit mode

Edits an existing .connect file (input) and writes the modified result to a new .connect file (output). Requires the -edit flag.

Syntax

ClientGenerator.exe -edit -path "input file path" -output "output file path" [-user user] [-psw psw] [-domain domain] [-mode remoteapp|remotedesktop]

Parameters

ParameterRequiredDescription
-editYesEnables edit mode.
-pathYesPath to the input .connect file. Must end with .connect.
-outputYesPath to the output .connect file. Must end with .connect.
-userAt least one of -user, -psw, -domain, -mode is requiredNew username value.
-pswSee aboveNew password value.
-domainSee aboveNew domain value.
-modeSee aboveConnection mode. Must be remoteapp or remotedesktop.

Example

ClientGenerator.exe -edit -path "C:\Clients\template.connect" -output "C:\Clients\output.connect" -user jdoe -mode remoteapp

Exit codes

CodeMeaning
0Operation completed successfully.
Non-zeroOperation completed with errors — see console output for details.
1Invalid or missing command-line arguments.

PowerShell usage examples

Generate a single client

& ".\ClientGenerator.exe" -name "clientname.connect" -server "my.server.com" -user "login" -psw "password"

Generate multiple clients in a loop (from a CSV list)

Given a clients.csv file:

Name,Server,User,Passwordmarie.connect,srv01.company.com,marie,P@ssw0rd1edgar.connect,srv02.company.com,edgar,P@ssw0rd2rose.connect,srv03.company.com,rose,P@ssw0rd3
$clients = Import-Csv -Path ".\clients.csv"
foreach ($client in $clients) {    Write-Host "Generating client: $($client.Name)"
    & ".\ClientGenerator.exe" `        -name $client.Name `        -server $client.Server `        -user $client.User `        -psw $client.Password
    if ($LASTEXITCODE -ne 0) {        Write-Warning "Generation failed for $($client.Name) (exit code $LASTEXITCODE)"    }}

Generate clients for a range of usernames

$server = "my.server.com"
1..10 | ForEach-Object {    $user = "user{0:D2}" -f $_    $name = "$user.connect"
    Write-Host "Generating client for $user..."
    & ".\ClientGenerator.exe" -name $name -server $server -user $user -psw "TempP@ss123"}

Edit multiple existing .connect files in a loop

Applies the same domain and mode update to every .connect file in a folder.

$inputFolder  = "C:\Clients\ToUpdate"$outputFolder = "C:\Clients\Updated"
New-Item -ItemType Directory -Path $outputFolder -Force | Out-Null
Get-ChildItem -Path $inputFolder -Filter "*.connect" | ForEach-Object {    $outputPath = Join-Path $outputFolder $_.Name
    Write-Host "Editing: $($_.Name)"
    & ".\ClientGenerator.exe" `        -edit `        -path $_.FullName `        -output $outputPath `        -domain "CORP" `        -mode "remoteapp"
    if ($LASTEXITCODE -eq 0) {        Write-Host "  -> Success" -ForegroundColor Green    } else {        Write-Warning "  -> Failed (exit code $LASTEXITCODE)"    }}

Edit clients with per-file settings (from CSV)

Given an edits.csv file:

InputPath,OutputPath,User,ModeC:\Clients\a.connect,C:\Clients\a-updated.connect,alice,remoteappC:\Clients\b.connect,C:\Clients\b-updated.connect,bob,remotedesktop
$edits = Import-Csv -Path ".\edits.csv"
foreach ($edit in $edits) {    & ".\ClientGenerator.exe" `        -edit `        -path $edit.InputPath `        -output $edit.OutputPath `        -user $edit.User `        -mode $edit.Mode
    if ($LASTEXITCODE -ne 0) {        Write-Warning "Failed to edit $($edit.InputPath)"    }}

Note: $LASTEXITCODE is only reliable immediately after a native executable call. Avoid running other commands between the ClientGenerator.exe call and the check.

TSplus Türkiye

Bu konuda yardıma mı ihtiyacınız var?

TSplus Türkiye ekibi, üretim ortamına geçmeden önce yapılandırmanızı doğrulamanıza yardımcı olabilir.

Yerel destekle iletişime geç →
Arama sonuçları

Tüm ürünlerde aramak için en az iki karakter yazın.