1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. Moombas

Beiträge von Moombas

  • JIT.au3 - C-Code direkt aus AutoIt kompilieren und ausführen

    • Moombas
    • 6. März 2026 um 11:32

    Ja, KI kann hilfreich sein, das stimmt.

    Witzigerweise hat gerade ein Kollege einen Artikel (Achtung: Englisch) gepostet was die Nutzung von KI (im allgemeinen) vs. selber umsetzen angeht (Aber den Artikel bitte nicht falsch verstehen):

    Project Overview ‹ Your Brain on ChatGPT – MIT Media Lab
    Check project's website: https://www.brainonllm.comWith today's wide adoption of LLM products like ChatGPT from OpenAI, humans and businesses engage and u…
    www.media.mit.edu

    Falls es wen interessiert. Es ist aber kein Artikel gegen KI, nur es werden durchaus Unterschiede sichtbar.

  • Window Looper

    • Moombas
    • 4. März 2026 um 15:47

    Warum schiebst du dann nicht einfach nur eine verknüpfung zum Programm in Autostart?

  • Window Looper

    • Moombas
    • 24. Februar 2026 um 11:37
    Zitat von Kanashius

    Jo, fehlt nur noch das automatische Starten der Programme/Öffnen der Fenster beim hochfahren :D

    Das hatte ich zumindest bei meinem Beispiel mit drin, das die Programme gestartet werden wenn dises Programm startet, sofern sie noch nicht laufen.

    Eigentlich fehlt nur das man eben nix anderes machen kann wenn es läuft und nur per Passwort raus kommt, dann hast du deinen Kiosk ;)
    Wobei, wenn kein Eingabegerät vorhanden ist und man nur den Bildschirm sieht, das vollkommen drüber wäre :D

  • Window Looper

    • Moombas
    • 24. Februar 2026 um 08:26

    Im Prinzip ist das ja was für einen Kiosk Bildschirm ;)

  • 2 Apps abwechselnd anzeigen lassen

    • Moombas
    • 23. Februar 2026 um 08:25

    Kanashius du musst mich auch immer übertreffen :P:D

  • 2 Apps abwechselnd anzeigen lassen

    • Moombas
    • 20. Februar 2026 um 15:42

    Nochmal mit VSCode getestet,damit geht es, es scheint hier ggf. ein Problem mit bestimmten MS Programmen zu sein, die in Windoof integriert sind und sich da anders verhalten.

    Folgendes Beispiel funktionierte bei mir nun Einwandfrei (Achtung, die Zeit musst du verlängern, zum Testen hier auf 5 Sekunden gesetzt):

    AutoIt
    Opt('MustDeclareVars', 1)
    #include <Timers.au3>
    #include <Array.au3>
    
    HotKeySet("^!k", "Terminate") ; Strg + Alt + K zum Beenden des Skrip
    
    Global $Programm[2][3] = [[2, "C:\Program Files\Notepad++\notepad++.exe", "C:\Program Files\Microsoft VS Code\Code.exe"]]
    Global $killSwitch = False
    
    If Check_Programs() then Loop()
    
    Func Check_Programs()
    Local $pid
    	For $i = 1 to $Programm[0][0]
    		$pid = ProcessExists($Programm[1][$i])
    		If $pid = 0 Then $pid = Run($Programm[0][$i])
    		if $pid = 0 Then return false
    		Sleep(2000)
    		$Programm[1][$i] = _WinActivatePID($pid)
    	Next
    	return True
    EndFunc
    
    Func Loop()
    Local $i = 1
    Local $currentProgram = $Programm[1][$i]
    Local $interval = 5 * 1000 ; 5 Sekunden
    Local $timer = _Timer_Init()
    Local $TimerProgress = 0
    Local $diff = $interval
    
    	While Not $killSwitch
    		While $diff > 0
    			$TimerProgress = _Timer_Diff($timer)
    			$diff = $interval-$TimerProgress
    			If not WinActive($currentProgram) Then
    				WinSetOnTop($currentProgram, Default, $WINDOWS_ONTOP)
    				sleep(100)
    				WinSetOnTop($currentProgram, Default, $WINDOWS_NOONTOP)
    			EndIf
    			Sleep(100)
    		WEnd
    
    		If $currentProgram = $Programm[1][$i] Then
    			$i += 1
    			If $i > UBound($Programm, 2)-1 Then $i = 1
    
    			$currentProgram = $Programm[1][$i]
    			WinSetOnTop($currentProgram, Default, $WINDOWS_ONTOP)
    			sleep(100)
    			WinSetOnTop($currentProgram, Default, $WINDOWS_NOONTOP)
    		EndIf
    		$TimerProgress = 0
    		$diff = $interval
    		$timer = _Timer_Init()
    	WEnd
    EndFunc
    
    Func _WinActivatePID($iPID)
    Local $aList, $i
    	$aList = WinList()
    	For $i = 1 To $aList[0][0]
    		If WinGetProcess($aList[$i][1]) = $iPID Then Return WinActivate($aList[$i][1])
    	Next
    	Return -1
    EndFunc
    
    Func Terminate()
    	$killSwitch = True
    EndFunc
    Alles anzeigen
  • 2 Apps abwechselnd anzeigen lassen

    • Moombas
    • 20. Februar 2026 um 15:27
    Zitat von Velted

    Noch mal Moin,

    dass Run eine 'falsche' PID liefert entsteht dadurch, dass "Calc.exe" nur einen weiteren Prozess mit eigener PID startet und sich dann verabschieded. Die gelieferte PID ist dann wertlos.

    Das das nicht nur Calc betrifft hast du gesehen? Ich kann das mit msedge (siehe oben) als auch notepad nachstellen, andere habe ich noch nicht probiert.

  • 2 Apps abwechselnd anzeigen lassen

    • Moombas
    • 20. Februar 2026 um 13:09

    Alles schon gemacht (ein sich ändernder Exename lässt sich aber nicht dynamisch einfach mal so abfangen, ohne ihn manuell mit anzugeben, was ich vermeiden wollte, der calc war auch nur zum testen da).

    Aber ich nehme das trotzdem mal als Beispiel:
    - calc.exe gestartet -> pid: 24316
    - CalculatorApp.exe pid über ProcessList ausgelesen -> pid: 2452
    - msedge.exe gestartet -> pid: 31180
    - msedge.exe pid über ProcessList ausgelesen -> 13 pids aber nicht die 31180

    Oder ist das Problem nur bei mir, weil Unternehmens PC und sich irgendwas dazwischen setzt und daher die pids nicht passen?

  • 2 Apps abwechselnd anzeigen lassen

    • Moombas
    • 20. Februar 2026 um 12:53

    Wenn ich den Prozess starte (egal ob mit Shellexecute oder run) bekommst du ja bereits eine pid zurück.

    Dort lag erst mal mein Fokus (Programme laufen noch nicht).

    Und mit WinList() kannst du ja durchgehen und mit WinGetProcess($aList[$i][1]) die jeweiligen pids auslesen, bleibt aber immer ohne Ergebnis.
    Auch wenn ich mir per Processlist (wo ja keine hwnd zu bekommen ist aber ich halt zur Prüfung geschaut habe) die Prozesse nach dem starten anschaue, taucht die pid vom erstellen nicht auf.
    Manchmal auch nichtmal der Prozess laut Name (z.B. Rechner) oder eben mit einer ganz anderen pid (und ja es ist kein 2. Prozess dieser Programme am laufen).

    Keine Ahnung was da falsch läuft.

  • 2 Apps abwechselnd anzeigen lassen

    • Moombas
    • 20. Februar 2026 um 11:07

    Naja ProcessExists funktioniert bei mir ja aber halt in der ProcessList oder Winlist taucht der Prozess entweder nicht auf oder mit einer anderen PID als das was ich beim erstellen zurück bekommen habe.

  • 2 Apps abwechselnd anzeigen lassen

    • Moombas
    • 20. Februar 2026 um 10:44

    Das Problem was meinen Vorschlag angeht, ist, das ich (unter Win11) es nicht hin bekomme, von der pid zum hwnd zu kommen, da der erstellte Prozess (wo man ja eine pid zurück bekommt) weder in ProcessList, noch in Winlist auftaucht. Erklären kann ich mir das aber nicht.

    Ansonsten sähe meine Umsetzung ca. so aus (nicht komplett zu testen, aus genannten Gründen, leider)

    AutoIt
    Opt('MustDeclareVars', 1)
    #include <Timers.au3>
    
    HotKeySet("^!k", "Terminate") ; Strg + Alt + K zum Beenden des Skrip
    
    Global $Programm[2][3] = [[2, "C:\Windows\System32\notepad.exe", "C:\Windows\System32\calc.exe"]]
    Global $killSwitch = False
    
    If Check_Programs() then Loop()
    
    Func Check_Programs()
    Local $pid
    	For $i = 1 to $Programm[0][0]
    		$pid = ProcessExists($Programm[1][$i])
    		If $pid = 0 Then $pid = Run($Programm[0][$i])
    		if $pid = 0 Then return false
    		Consolewrite($pid & @CRLF)
    		Sleep(2000)
    		$Programm[1][$i] = _WinActivatePID($pid)
    	Next
    	return True
    EndFunc
    
    Func Loop()
    Local $i = 1
    Local $currentProgram = $Programm[1][$i]
    Local $interval = 5 * 1000 ; 5 Sekunden
    Local $timer = _Timer_Init()
    Local $TimerProgress = 0
    Local $diff = $interval
    
    	While Not $killSwitch
    		While $diff > 0
    			$TimerProgress = _Timer_Diff($timer)
    			$diff = $interval-$TimerProgress
    			If not WinActive($currentProgram) Then
    				WinSetState($currentProgram, "", @SW_MAXIMIZE)
    			EndIf
    			Sleep(100)
    		WEnd
    
    		If $currentProgram = $Programm[1][$i] Then
    ;~ 			WinSetState($currentProgram, "", @SW_MINIMIZE)
    			ConsoleWrite($i & @CRLF)
    			ConsoleWrite($Programm[1][$i] & @CRLF)
    			$i += 1
    			If $i > UBound($Programm, 2)-1 Then $i = 1
    
    			$currentProgram = $Programm[1][$i]
    			WinSetState($currentProgram, "", @SW_MAXIMIZE)
    		EndIf
    		$TimerProgress = 0
    		$diff = $interval
    		$timer = _Timer_Init()
    	WEnd
    EndFunc
    
    Func _WinActivatePID($iPID)
    Local $aList, $i
    	$aList = WinList()
    	For $i = 1 To $aList[0][0]
    		If WinGetProcess($aList[$i][1]) = $iPID Then Return WinActivate($aList[$i][1])
    	Next
    	Return -1
    EndFunc
    
    Func Terminate()
    	$killSwitch = True
    EndFunc
    Alles anzeigen
  • 2 Apps abwechselnd anzeigen lassen

    • Moombas
    • 18. Februar 2026 um 15:11

    Wobei das Beispiel aus "Gute Frage" ja jedesmal das Programm startet und minimiert und nicht anzeigt.

    AutoIt
    #include <Timers.au3>
    
    Global $Programm1 = "C:\Program Files\Programm1.exe"
    Global $Programm2 = "C:\Program Files\Programm2.exe"
    Global $interval = 30 * 1000 ; 30 Sekunden
    Global $timer = _Timer_Init()
    Global $currentProgram = $Program1
    Global $killSwitch = False
    
    While Not $killSwitch
    	Run($currentProgram)
    	_Timer_SetTimer($timer, $interval)
    
    	While _Timer_GetTimer($timer) > 0 And Not $killSwitch
    		Sleep(100)
    
    		If WinActive($currentProgram) Then
    			WinSetState($currentProgram, "", @SW_MINIMIZE)
    		EndIf
    
    	WEnd
    
    	If $currentProgram = $Program1 Then
    		$currentProgram = $Program2
    	Else
    		$currentProgram = $Program1
    	EndIf
    WEnd
    
    Func Terminate()
    
    	$killSwitch = True
    
    EndFunc
    
    HotKeySet("^!k", "Terminate") ; Strg + Alt + K zum Beenden des Skrip
    Alles anzeigen

    Eigentlich müsste man vorher prüfen ob die Programme schon laufen, sich dann die PID dazu merken und darauf prüfen.

    Sind die Programme noch nicht am laufen, starte sie, zeige das 1. Programm und wechsel bei Hotkey (ohne sie nochmal starten zu wollen).

    Zudem eine gesonderter Hotkey zum Beenden der ganzen Schleife.

  • Community Projekt: Teil 1 - Interesse an einem gemeinsamen größeren (Software)Projekt?

    • Moombas
    • 2. Februar 2026 um 10:45

    Grundsätzlich gerne, allerdings habe ich dafür privat zu wenig Zeit.
    Ich habe ja Ende des letzten Jahres mein Smart Home erweitert und kämpfe da noch mit dem ein oder anderen Problem.

    Hier ab und zu ein paar Zeilen zuschreiben geht noch aber halt sich ernsthaft zum programmieren hin zu setzen, schaffe ich aktuell nicht :(.

  • Community Projekt: Teil 1 - Interesse an einem gemeinsamen größeren (Software)Projekt?

    • Moombas
    • 2. Februar 2026 um 08:25
    Zitat von Schnuffel

    Ich würde nicht anfangen Software von Dritten zu hosten, versenden oder amderweitig anzubieten.

    Das war auch nicht gemeint ;)

    Was ich meinte, war (dies Software soll ja beim nutzenden Admin lokal laufen) das der Admin sich das für lokale Zwecke ablegt und seinen nutzern eben nur explizit diese Software/Version zur verfügung stellt, die er möchte. Die ggf. auch schon geprüft/getestet wurde.

    Haben wir bei uns immer so gemacht, um zum Einen eine Fallback Installationsdatei zu haben und zum Anderen dem Benutzer nur vorher geprüfte Versionen zur Verfügung gestellt haben.
    Aber ich wollte es halt nur einmal anmerken, bin ja mittlerweile nur noch im Mobility Bereich zuständig und da läuft das ganze leider nochmal wesentlich schlechter/anders.

  • Community Projekt: Teil 1 - Interesse an einem gemeinsamen größeren (Software)Projekt?

    • Moombas
    • 30. Januar 2026 um 13:20
    Zitat

    Dabei crawled der einfach als cronjob das Netz nach in seiner DB bekannten URLs nach neueren Versionen von angebotener Software und schickt eine Email an eingetragene User, die dann für den jeweiligen User interessante Software als Email eine Aktualisierung meldet.
    Der User geht auf die Seite des Herstellers und lädt sich die Aktualisierung, da er ja grundsätzlich keine direkte I-Net Verbindung hat.

    Warum es nicht komplett "offline" machen?
    Aus meiner Erfahrung ist selbst das "...Der User geht auf die Seite des Herstellers und lädt sich die Aktualisierung..." teilweise schon problematisch (holt der Nutzer sich die richtige Version (32- vs. 64-Bit,...), hakt er richtige Optionen an/ab,...).
    Ich selber wäre da eher bei: Du/der Admin bekommt eine Mail und lädt die neue Version runter und legt diese auf einem lokalen Server ab (ggf. sogar die letzten X Versionen um ein Fallback zu haben).

    Danach wird entweder
    ... der User informiert das dieser über eine eigene "Pull-" Software sich von dort die neue, explizit vom Admin bereitgestellte Version, vom Server holt und installiert (hier wäre dann ggf. auch die Möglichkeit Installationsparameter mit zu übergeben) oder
    ... der Admin diese zu den Usern im Hintergrund "Pusht" und eine beim Enduser laufende Software dann (unter bestimmten Bedingungen) das Update ausführt.


    Ich hatte mir soetwas in der Art mal in Turbo Pascal gebaut aber da ich es nicht mehr brauchte, ist das auch nicht mehr vorhanden ;)

  • Progress einfärben in Win10

    • Moombas
    • 30. Januar 2026 um 08:08

    Habs auch nur durch "mal schauen" ("Jugend" forscht) gesehen :D

  • Progress einfärben in Win10

    • Moombas
    • 29. Januar 2026 um 10:16

    Thema bearbeiten -> Erweitert -> auf das Label drücken und das richtige auswählen - speichern ;)

    Label (das mit [...]) <> Themen Status (das Kästchen):

  • Kleine PS Sammlung durch Migration

    • Moombas
    • 26. Januar 2026 um 08:48

    Hier nun ein paar Beispiele für Lancom Cloud (um einen Standort anzulegen).
    Ich musste ein wenig Namen etc. entfernen ersetzen und die ein oder andere "Unterfunktion" ist natürlich zu speziell und müsste von jedem selber entspechend gebaut werden und fehlt hier daher.
    Das API_token ist bei mir global, daher wird dies nicht bei jeder Funktion übergeben.

    PowerShell
    Function SendRequest_LMC { #sends a request to Lancom Cloud API using a API token and returns the result
        param (
            [string]$Domain, 
            [string]$Method, 
            [string]$Request, 
            [string]$ContentType = 'application/json',
            [string]$ReturnType = 'Content', #Content, StatusCode
            [string]$AccountID = '',
            $OptionalData = $null,
            [bool]$Debug = $false
        ) 
        $Url = "https://$Domain$Request"
        
        $Token = $API_KEY
    
        $headers = @{
            Accept = $ContentType
            Authorization = "LMC-API-KEY $Token"
        }
    
        If ($Debug -eq $true) {
            LogWrite "$Domain - URL:          $Url" 'DEBUG' $Debug
            LogWrite "$Domain - Method:       $Method" 'DEBUG' $Debug
            LogWrite "$Domain - ContentType:  $ContentType" 'DEBUG' $Debug
            LogWrite "$Domain - ReturnType:   $ReturnType" 'DEBUG' $Debug
            Logwrite "$Domain - OptionalData: $OptionalData" 'DEBUG' $Debug
            Logwrite "$Domain - AccountID:    $AccountID" 'DEBUG' $Debug
            Logwrite "$Domain - Debug:        $Debug" 'DEBUG' $Debug
            LogWrite "$Domain - Headers:      $($headers | Out-String)" 'DEBUG' $Debug
        }
        
        if ($null -eq $OptionalData) {
            $response = Invoke-WebRequest -Uri $Url -Method $Method -Headers $headers -ContentType $ContentType
        } else {
            $response = Invoke-WebRequest -Uri $Url -Method $Method -Headers $headers -ContentType $ContentType -Body $OptionalData
        }
        if ($Debug -eq $true) { 
            LogWrite "$Domain - Response StatusCode: $($response.StatusCode)" 'DEBUG' $Debug
            LogWrite "$Domain - Response Content: $($response.$ReturnType)" 'DEBUG' $Debug
        }
        return $response.$ReturnType
    }
    
    Function LMC_Get_Variables { #returns configuration variables from Lancom Cloud
        param (
            [string]$Domain,
            [string]$AccountID,
            [bool]$Debug = $false
        )
        $Request = "/cloud-service-config/configvariable/accounts/$AccountID/variables"
    
        $Return = SendRequest_LMC $Domain 'GET' $Request 'application/json' 'Content' $AccountID $null $false
        if ($null -eq $Return) {
            return $null
        }
        If ($Debug) { LogWrite "Return: $Return" 'DEBUG' $false }
    
        $Return = $Return | ConvertFrom-Json
        $VarData = @(foreach ($Var in $Return) {
            New-Object -Type PSObject -Property @{
            'Name' = $Var.name
            'ID'   = $Var.id
            }
            if ($Debug) { LogWrite "Name: $($Var.name) - Value: $($Var.id)" 'DEBUG' $false }
        })
        if ($Debug) { LogWrite "$VarData" 'DEBUG' $false }
    
        return $VarData
    }
    
    Function LMC_Get_VLANs { #returns VLAN configuration variables from Lancom Cloud
        param (
            [string]$Domain,
            [string]$AccountID,
            [bool]$Debug = $false
        )
        $Request = "/cloud-service-config/confignetwork/accounts/$AccountID/networks"
    
        $Return = SendRequest_LMC $Domain 'GET' $Request 'application/json' 'Content' $AccountID $null $false
        if ($null -eq $Return) {
            return $null
        }
        If ($Debug) { LogWrite "Return: $Return" 'DEBUG' $false }
    
        $Return = $Return | ConvertFrom-Json
        $VLANData = @(foreach ($Var in $Return) {
            New-Object -Type PSObject -Property @{
            'Name' = $Var.name
            'ID'   = $Var.id
            }
            if ($Debug) { LogWrite "Name: $($Var.name) - Value: $($Var.id)" 'DEBUG' $false }
        })
        if ($Debug) { LogWrite "$VLANData" 'DEBUG' $false }
    
        return $VLANData
    }
    
    Function Create_Location { #creates a Location in Lancom Cloud based on given Location data
        param (
            [array]$LocationData,
            [string]$Domain,
            [string]$AccountID,
            [bool]$Debug = $false
        )
        $Request = "/cloud-service-devices/accounts/$AccountID/sites"
        $Data    = '{"name": "'        + $LocationData.Locationname + '",' +
                    '"address": {"city": "' + $LocationData.City + '",' +
                                '"zipCode": "' + $LocationData.ZIP + '"},' +
                                '"street": "' + $LocationData.Street + '",' +                    
                                '"countryCode": "' + $LocationData.Country + '"' +
                                '},' +
                        '"position": {"latitude": ' + $LocationData.Latitude.Replace(',', '.') + ',' +
                                     '"longitude": ' + $LocationData.Longitude.Replace(',', '.') + 
                        '}' +
                    '}'
        if ($Debug) { 
            LogWrite "Create_Location - Request: $Request" 'DEBUG' $false
            LogWrite "Create_Location - Data: $Data" 'DEBUG' $false 
        }
        $Return = SendRequest_LMC $Domain 'POST' $Request 'application/json' 'Content' $AccountID $Data $false | ConvertFrom-Json
        if ($null -eq $Return) {
            return $null
        }
        return $Return
    }
    
    Function Add_Network_to_Location { #adds a network to a Location in Lancom Cloud
        param (
            [string]$LocationNumber,
            [string]$SubNetGroupId,
            [array]$VLANData,
            [string]$Domain,
            [string]$AccountID,
            [bool]$Debug = $false
        )
        $VLAN = 3, 'VLAN1', 'VLAN2', 'VLAN3' #,...
    
        $Request = "/cloud-service-config/confignetwork/accounts/$AccountID/networks/subnetgroups/$SubNetGroupId/bulk-create"
        if ($Debug) {
    		LogWrite "Add_Network_to_Location - SubnetgroupID: $SubNetGroupId" 'DEBUG' $false
    		LogWrite "Add_Network_to_Location - LocationNumber: $LocationNumber" 'DEBUG' $false 
    	}
    
    
        For ($v=1; $v -le $VLAN[0]; $v++) {
            $VLANName = $VLAN[$v]
            $VLANId   = ''
            For ($vd=0; $vd -lt $VLANData.Count; $vd++) {
                if ($VLANData[$vd].Name -eq $VLANName) {
                    $VLANId = $VLANData[$vd].ID
                }
            }
            if ($VLANId -eq '') {
                LogWrite "VLAN $VLANName not found in Lancom Cloud!" 'ERROR' $false
                Return $null
            }
    
            $Data = '{"networkIds":["' + $VLANId + '"]}' #"id","id"
            if ($Debug) { 
                LogWrite "Add_Network_to_Location - Request: $Request" 'DEBUG' $false
                LogWrite "Add_Network_to_Location - Data: $Data" 'DEBUG' $false 
            }
            $Return = SendRequest_LMC $Domain 'POST' $Request 'application/json' 'StatusCode' $AccountID $Data $false
            if ($Return -eq 200) {
                LogWrite "Add_Network_to_Location - Successfully added network $VLANName to Location $LocationNumber." 'INFO' $false
            } else {
                LogWrite "Add_Network_to_Location - Failed to add network $VLANName to Location $LocationNumber. Return code: $Return ($(EncodeStatusCode $Return))" 'ERROR' $false
            }
        }
    }
    
    Function Add_Variables_to_Location { #sets a configuration variable in a Location in Lancom Cloud
        param (
            [string]$LocationNumber,
            [string]$SubNetGroupId,
            [array]$VariableData,
            [string]$Domain,
            [string]$AccountID,
            [bool]$Debug = $false
        )
    
        $SSIDVal = Location_to_SSID $LocationNumber
    
        if ($Debug) { 
            LogWrite "Add_Variables_to_Location - LocationNumber: $LocationNumber" 'DEBUG' $false 
            Logwrite "Add_Variables_to_Location - SubnetgroupID: $SubNetGroupId" 'DEBUG' $false
            LogWrite "Add_Variables_to_Location - SSIDVal: $SSIDVal" 'DEBUG' $false
        }
    
        Foreach ($Var in $VariableData) {
            if ($Var.Name -eq 'SSID') { $SSIDID = $Var.ID }
        }
        if ('' -eq $SSIDID) {
            LogWrite "Add_Variables_to_Location - Variable not found! SSID:$SSIDID" 'ERROR' $false
            Return $null
        }
    
        $Data = '{"value":"' + $SSIDVal + '"}'
        if ($Debug) { LogWrite "Add_Variables_to_Location - Data send to LMC: $Data" 'DEBUG' $false }
        $Request = "/cloud-service-config/configvariable/accounts/$AccountID/subnetgroups/$SubNetGroupId/variables/$SSIDID"
        $Return = SendRequest_LMC $Domain 'PUT' $Request 'application/json' 'StatusCode' $AccountID $Data $false
        if ($Return -eq 200) {
            LogWrite "Successfully set SSID to $SSIDVal for Location $LocationNumber." 'INFO' $false
        } else {
            LogWrite "Failed to set SSID for Location $LocationNumber. Return code: $Return ($(EncodeStatusCode $Return))" 'ERROR' $false
        }
    }
    Alles anzeigen
  • Kleine PS Sammlung durch Migration

    • Moombas
    • 19. Januar 2026 um 07:57

    Kein Ding, den API Bereich werde ich ggf. noch erweitern auf Lancom Management Cloud, wie gesagt alles sehr speziell bei mir.

    Aber ggf. hilft das dem ein oder anderem. Und ja die integrierte Co-Pilot Vervollständigung hat doch das ein oder andere Mal geholfen aber auch oft zu Verwirrung und tlw. Überforderung ("zu Viel Code auf einen Schlag ergänzt/vorgeschlagen") gesorgt.

  • Kleine PS Sammlung durch Migration

    • Moombas
    • 16. Januar 2026 um 12:55

    Moin,

    da das Thema so ein bisschen durch mich aufgeploppt ist, wollte ich ein paar Powershell Funktionen, die ich mir beim Migrieren von AutoIt zu PS geschrieben habe teilen.
    Vielleicht hilft dies anderen, egal ob fürs Migrieren oder weil er/sie einfach das für PS sucht.

    Achtung: Es sind auch ein paar sehr spezielle API Funktionen für Soti Mobicontrol dabei.

    PowerShell
    $Logfile = ".\Output_$((Get-Date).ToString("yyyy-MM-dd_HH-mm-ss")).log"
    
    Function LogWrite{
        Param (
            [string]$logstring,
            [string]$Type = 'INFO',
            [bool]$Debug = $false
        )
        If ($Debug) {
            Write-Host "$Type`: $logstring"
        }
        Add-content $Logfile -value "$((Get-Date).ToString("yyyy-MM-dd_HH-mm-ss")) - $Type - $logstring"
    }
    
    Function SendMail {
        Param (
            [string]$Path,
            [string]$To,
            [string]$CC,
            [string]$Subject,
            [string]$Body,
            [string]$Attachments = '',
            [bool]$Debug = $false
        )
        Set-Variable olMailItem -option Constant -value 0 -ErrorAction Ignore
        Set-Variable olFormatHTML -option Constant -value 2 -ErrorAction Ignore
    
        If ($Debug) { LogWrite "$Path - Sending mail to: $To, CC: $CC, Subject: $Subject, Body: $Body, Attachments: $Attachments" 'DEBUG' $Debug }
    
        $outlook = New-Object -ComObject Outlook.Application
        $mail = $outlook.CreateItem($olMailItem)
        $mail.To = $To
        $mail.CC = $CC
        $mail.Subject = $Subject
        $mail.BodyFormat = $olFormatHTML 
        $mail.HTMLBody = $Body
        $mail.Attachments.Add($Attachments)
        $Result = $mail.Send()
    
        [System.Runtime.Interopservices.Marshal]::ReleaseComObject($mail) | Out-Null
        [System.Runtime.Interopservices.Marshal]::ReleaseComObject($outlook) | Out-Null
        return $Result
    }
    
    Function EncodeStatusCode { #returns true/false based on the response code
        param (
            [string]$ResponseValue,
            [bool]$Debug = $false
        )
    	Switch ($ResponseValue) {
            '200'   { 
                        if ($Debug) { LogWrite "EncodeStatusCode - Data retrieved successfully" 'INFO' $false }
                        Return $true 
                    }
            '204'   { 
                        if ($Debug) { LogWrite "EncodeStatusCode - Data permitted successfully" 'INFO' $false }
                        Return $true 
                    }
            '400'   { 
                        if ($Debug) { LogWrite "EncodeStatusCode - Contract validation error" 'ERROR' $false }
                        Return $false 
                    }
            '401'   { 
                        if ($Debug) { LogWrite "EncodeStatusCode - Authentication error" 'ERROR' $false }
                        Return $false 
                    }
            '403'   { 
                        if ($Debug) { LogWrite "EncodeStatusCode - No user permission to read the data" 'ERROR' $false }
                        Return $false 
                    }
            '422'   { 
                        if ($Debug) { LogWrite "EncodeStatusCode - Logic error" 'ERROR' $false }
                        Return $false 
                    }
            '500'   { 
                        if ($Debug) { LogWrite "EncodeStatusCode - Internal Server Error" 'ERROR' $false }
                        Return $false 
                    }
            Default {
                        if ($Debug) { LogWrite "EncodeStatusCode - Unknown error: $ResponseValue" 'ERROR' $false }
                        Return $false 
                    }
        }
    }
    
    # MobiControl API
    # https://servername/MobiControl/api/token
    function SendTokenRequest { #returns an access token
        param (
            [string]$Target, 
            [string]$Method, 
            [string]$Request, 
            $OptionalData = $null, 
            [bool]$Debug = $false
        ) 
        $Url = "https://$Target$Request"
        $Authorization = ConvertIntoBase64("$ID`:$Secret")
    
        $headers = @{
            Authorization = "Basic $Authorization"
        }
        
        If ($Debug -eq $true) {
            LogWrite "$Target - URL: $Url" 'DEBUG' $Debug
            LogWrite "$Target - Headers: $($headers | Out-String)" 'DEBUG' $Debug
            LogWrite "$Target - Data: $OptionalData" 'DEBUG' $Debug
        }
    
        $response = Invoke-WebRequest -Uri $Url -Method $Method -Headers $headers -ContentType 'application/x-www-form-urlencoded' -Body $OptionalData
        $response = $response | Select-String -Pattern '"access_token":"([^"]+)"' -CaseSensitive -AllMatches
        return $response.Matches.Groups[1].Value
    }
    
    # https://servername/MobiControl/api/...
    function SendRequest {
        param (
            [string]$Target, 
            [string]$Method, 
            [string]$Request, 
            [string]$ContentType = 'application/json',
            [string]$ReturnType = 'Content',
            $OptionalData = $null, 
            [bool]$Debug = $false
        ) 
        $Url = "https://$Target$Request"
        
        $headers = @{
            Accept = $ContentType
            Authorization = "Bearer $accessToken"
        }
    
        If ($Debug -eq $true) {
            LogWrite "$Target - URL: $Url" 'DEBUG' $Debug
            LogWrite "$Target - Headers: $($headers | Out-String)" 'DEBUG' $Debug
        }
        
        if ($null -eq $OptionalData) {
            $response = Invoke-WebRequest -Uri $Url -Method $Method -Headers $headers -ContentType $ContentType
        } else {
            If ($Debug -eq $true) { LogWrite "$Target - Data: $OptionalData" 'DEBUG' $Debug}
            $response = Invoke-WebRequest -Uri $Url -Method $Method -Headers $headers -ContentType $ContentType -Body $OptionalData
        }
        if ($Debug -eq $true) { 
            LogWrite "$Target - Response StatusCode: $($response.StatusCode)" 'DEBUG' $Debug
            LogWrite "$Target - Response Content: $($response.$ReturnType)" 'DEBUG' $Debug
        }
        return $response.$ReturnType
    }
    
    # https://servername/MobiControl/api/customattributes
    Function GetCustomAttributes{ #returns an array of all custom attributes with their names and IDs: Name | ID
        param (
            [bool]$Debug = $false
        )
        $Attributes = @(,0)
    
    	$Return = SendRequest $API 'GET' "/MobiControl/api/customattributes" 'application/json' 'Content' $null $false
        If ($Debug) { LogWrite "$Path - Return: $Return" 'DEBUG' $Debug }
    
        $Return = $Return | Select-String -Pattern '"Name": "([^"]+)"|"ReferenceId": "([^"]+)"' -CaseSensitive -AllMatches
        For ($i = 0; $i -gt $Return.Matches.Count; $i++) {
            If ($Debug) { LogWrite "$Path - Name: $($Return.Matches[$i].Groups[1].Value) - Value: $($Return.Matches[$i+1].Groups[2].Value)" 'DEBUG' $Debug }
            $Attributes += ''
            $Attributes[0] += 1
            $Attributes[$Attributes[0]] = @("$($Return.Matches[$i].Groups[1].Value)", "$($Return.Matches[$i+1].Groups[2].Value)")
            $i++
        }
        return $Attributes
    }
    
    # https://servername/MobiControl/api/customdata
    Function GetCustomData{ #returns an array of all custom data with their names and IDs: Name | ID
        param (
            [bool]$Debug = $false
        )
        $Data = @(,0)
    
    	$Return = SendRequest $API 'GET' "/MobiControl/api/customdata" 'application/json' 'Content' $null $false
        If ($Debug) { LogWrite "$Path - Return: $Return" 'DEBUG' $Debug }
    
        $Return = $Return | Select-String -Pattern '"Name": "([^"]+)"|"ReferenceId": "([^"]+)"' -CaseSensitive -AllMatches
        For ($i = 0; $i -lt $Return.Matches.Count; $i++) {
            If ($Debug) { LogWrite "$Path - Name: $($Return.Matches[$i].Groups[1].Value) - ID: $($Return.Matches[$i+1].Groups[2].Value)" 'DEBUG' $Debug }
            $Data += ''
            $Data[0] += 1
            $Data[$Data[0]] = @("$($Return.Matches[$i].Groups[1].Value)", "$($Return.Matches[$i+1].Groups[2].Value)")
            $i++
        }
        return $Data
    }
    
    Function GetCustomAttributeValues{ #returns an array of all custom attributes with their names and Values: Name | Value
        param (
            [string]$Path,
            [bool]$Debug = $false
        )
        $Values = @(,0)
        $SotiPath = [URI]::EscapeUriString([URI]::EscapeUriString($Path))
    
    	$Return = SendRequest $API 'GET' "/MobiControl/api/devicegroups/$SotiPath/customAttributes" 'application/json' 'Content' $null $false
        If ($Debug) { LogWrite "$Path - Return: $Return" 'DEBUG' $Debug }
    
        $Pattern = '"Name": "([^"]+)"|"Value": "([^"]+)"|"Value": ([^"]+),'
        If ($Debug) { LogWrite "$Path - Pattern: $Pattern" 'DEBUG' $Debug }
        $Return = $Return | Select-String -Pattern $Pattern -CaseSensitive -AllMatches
        If ($Debug) { LogWrite "$Path - Matches: $($Return.Matches)" 'DEBUG' $Debug }
    
        For ($i = 0; $i -lt $Return.Matches.Count; $i++) {
            If ($Debug) { LogWrite "$Path - Name: $($Return.Matches[$i].Groups[1].Value) - Value: $($Return.Matches[$i+1].Groups[2].Value)" 'DEBUG' $Debug }
            $Values += ''
            $Values[0] += 1
            $Values[$Values[0]] = @("$($Return.Matches[$i].Groups[1].Value)", "$($Return.Matches[$i+1].Groups[2].Value)")
            $i++
        }
        return $Values
    }
    
    function SetCustomAttribute { #sets the custom attribute for all devices in a group
        param (
            [string]$Path,
            [string]$AttributeName,
            [string]$Value,
            [bool]$Debug = $false
        )
        $SotiPath = [URI]::EscapeUriString([URI]::EscapeUriString($Path))
    
        $Content = "{`"Attributes`":[{`"AttributeName`":`"$AttributeName`",`"AttributeValue`":`"$Value`"}]}"
        If ($Debug) { 
            LogWrite "$Path - Content: $Content" 'DEBUG' $true
            LogWrite "$Path - /MobiControl/api/devicegroups/$SotiPath/customAttributes" 'DEBUG' $true
        }
    
        $Return = SendRequest $API 'PUT' "/MobiControl/api/devicegroups/$SotiPath/customAttributes" 'application/json' 'StatusCode' $Content $false
        $EncodeStatusCode = EncodeStatusCode $Return $Debug
        If ($Debug) { LogWrite "$Path - Return: $EncodeStatusCode" 'DEBUG' $true}
        LogWrite "$Path - Set $AttributeName to $Value" 'INFO' $false
        
        return $EncodeStatusCode
    }
    
    Function SetCustomAttribute_Path { #sets the custom attribute for all devices in a group
        param (
            [string]$Path,
            $Values,
            [string]$ValueName,
            [string]$Value,
            [bool]$Debug = $false
        )
        If ($null -eq $Value) {
            LogWrite "$Path - No value provided for $ValueName`: $Value" 'ERROR' $false
            return $false
        }
    
        For ($a = 1; $a -le $Values[0]; $a++) {
            if ($Values[$a][0] -eq $ValueName -and $Values[$a][1] -ne $Value) {
                LogWrite "$Path - Setting $ValueName to $Value" 'INFO' $false
                $Values[$a][1] = $Value
                if (SetCustomAttribute $Path $ValueName $Value $false) {
                    LogWrite "$Path - $ValueName set successfully" 'INFO' $false
                    return $true
                } else {
                    LogWrite "$Path - Failed to set $ValueName" 'ERROR' $false
                    return $false
                }
            } elseif ($Values[$a][0] -eq $ValueName -and $Values[$a][1] -eq $Value) {
                LogWrite "$Path - Name: $($Values[$a][0]) - Value: $($Values[$a][1]) (no change needed)" 'INFO' $false
                return $true
            }
        }
        LogWrite "$Path - $ValueName not found in custom attributes" 'ERROR' $false
        return $false
    }
    
    function GetDevices {
        param (
            [string]$Path,
            [string]$Filtertype = 'DeviceName', #DeviceName, IMEI_MEID_ESN, HardwareSerialNumber, LastAgentConnectTime, LastAgentDisconnectTime, DeviceId
            [string]$Filter = '',
            [string]$OrderType = '+', # + -> %2B
            [string]$OrderField = $Filtertype,
            [bool]$Debug = $false
        )
        if ($OrderType -eq "+") {
            $OrderType = '%2B'
        }
        $Order    = "$OrderType$OrderField"
        $SotiPath = [System.Uri]::EscapeDataString($Path)
    
        $Return = SendRequest $API 'GET' "/MobiControl/api/devices?path=$SotiPath&order=$Order" 'application/json' 'Content' $null $Debug
        If ($Debug) { LogWrite "$Path - Return: $Return" 'DEBUG' $Debug }
        $Return = $Return | ConvertFrom-Json
        $Devices = @(:Loop for($i = 0; $i -lt $Return.DeviceName.Count; $i += 1){
            Switch ($Filtertype) {
                'DeviceName' {
                    If ($Return.DeviceName[$i] -notlike "*$Filter*") {
                        continue Loop
                    }
                }
                'IMEI_MEID_ESN' {
                    If ($Return.IMEI_MEID_ESN[$i] -notlike "*$Filter*") {
                        continue Loop
                    }
                }
                'HardwareSerialNumber' {
                    If ($Return.HardwareSerialNumber[$i] -notlike "*$Filter*") {
                        continue Loop
                    }
                }
                'LastAgentConnectTime' {
                    If ($Return.LastAgentConnectTime[$i] -notlike "*$Filter*") {
                        continue Loop
                    }
                }
                'LastAgentDisconnectTime' {
                    If ($Return.LastAgentDisconnectTime[$i] -notlike "*$Filter*") {
                        continue Loop
                    }
                }
            }
            [pscustomobject]@{
                DeviceName = $Return.DeviceName[$i]
                IMEI = $Return.IMEI_MEID_ESN[$i]
                SerialNumber = $Return.HardwareSerialNumber[$i]
                LastConnect = $Return.LastAgentConnectTime[$i]
                LastDisconnect = $Return.LastAgentDisconnectTime[$i]
                DeviceId = $Return.DeviceId[$i]
            }
        })
        if ($Debug) { LogWrite "$Path - Devices: $Devices" 'DEBUG' $Debug }
    
        return $Devices
    }
    
    Function GetOfflineDevices {
        Param (
            [string]$Path,
            [int]$DurationValue = 30,
            [string]$DurationType = 'DAYS', #DAYS, HOURS, MINUTES
            [bool]$Debug = $false
        )
        $SotiPath = [URI]::EscapeUriString([URI]::EscapeUriString($Path))
        if ($Debug) { LogWrite "$Path - Getting offline devices for more than $DurationValue $DurationType" 'DEBUG' $Debug }
    
        $Return = SendRequest $API 'GET' "/MobiControl/api/devices/search?groupPath=$SotiPath&filter=LastAgentDisconnectTime%2520NOT%2520WITHIN%2520$DurationValue%2520$DurationType%2520AND%2520IsAgentOnline%2520%253D%2520FALSE&includeSubgroups=true&verifyAndSync=true&order=%2BDeviceName" 'application/json' 'Content' $null $false
        If ($Debug) { LogWrite "$Path - Return: $Return" 'DEBUG' $Debug }
        $Return = $Return | ConvertFrom-Json 
    
        $timeformat = 'MM/dd/yyyy HH:mm:ss'
        $Devices = @(for($i = 0; $i -lt $Return.DeviceName.Count; $i++){    
            $Now = Get-Date
            $Offline = [datetime]::ParseExact(($Return.LastAgentDisconnectTime[$i]), $timeformat, [System.Globalization.CultureInfo]::InvariantCulture)
            $DaysOffline = NEW-TIMESPAN -Start $Offline -End $Now
            $DaysOffline = $DaysOffline.Days
    
            if ($Return.DeviceName.Count -eq 1) {
                if ($Debug) { 
                    LogWrite "$Path\$($Return.DeviceName) - $($Return.LastAgentDisconnectTime)" 'DEBUG' $Debug
                    LogWrite "$Path\$($Return.DeviceName) - Online: $Now - Offline: $Offline - Days offline: $($DaysOffline)" 'DEBUG' $Debug 
                }
                [pscustomobject]@{
                    DeviceName = $Return.DeviceName
                    Path = $Return.Path
                    Offline = $DaysOffline
                    IMEI = $Return.IMEI_MEID_ESN
                    SerialNumber = $Return.HardwareSerialNumber
                }
            } else {
                if ($Debug) { 
                    LogWrite "$Path\$($Return.DeviceName[$i]) - $($Return.LastAgentDisconnectTime[$i])" 'DEBUG' $Debug 
                    LogWrite "$Path\$($Return.DeviceName[$i]) - Online: $Now - Offline: $Offline - Days offline: $($DaysOffline)" 'DEBUG' $Debug 
                }
                [pscustomobject]@{
                    DeviceName = $Return.DeviceName[$i]
                    Path = $Return.Path[$i]
                    Offline = $DaysOffline
                    IMEI = $Return.IMEI_MEID_ESN[$i]
                    SerialNumber = $Return.HardwareSerialNumber[$i]
                }
            }
        })
        return $Devices
    }
    
    Function Getgroup {
        Param (
            [string]$Path,
            [string]$GroupNumber,
            [bool]$Debug
        )
        $Return = GetGroups $Path 'group' $false
        If ($Debug) { LogWrite "Return: $Return" 'DEBUG' $Debug }
        If ($Return -contains $GroupNumber) {
            Return $true
        }
        Return $false
    }
    
    Function GetGroups{ #returns an array of all groups in a given path and mode: Name
        param (
            [string]$Path,
            [string]$Mode,
            [bool]$Debug = $false
        )
        if ($Mode -eq 'A') { # replaced our expectations, so need to be aligned for own usage
           $Length = 10
        } elseif ($Mode -eq 'B') {
           $Length = 11
        } elseif ($Mode -eq 'C') {
           $Length = 12
        } elseif ($Mode -eq 'D') {
           $Length = 99
        }
    
        $SotiPath = [URI]::EscapeUriString([URI]::EscapeUriString($Path))
        $Groups = @(,0)
    
    	$Return = SendRequest $API 'GET' "/MobiControl/api/devicegroups?parentPath=$SotiPath" 'application/json' 'Content' $null $false
        If ($Debug) { LogWrite "$Path - Return: $Return" 'DEBUG' $Debug }
    
        $Return = $Return | Select-String -Pattern '"Name": "([^"]+)"' -CaseSensitive -AllMatches
        For ($i = 0; $i -lt $Return.Matches.Count; $i++) {
            If ($Return.Matches[$i].Groups[1].Value.Length -le $Length) {
                $Groups += "$($Return.Matches[$i].Groups[1].Value)"
                $Groups[0] += 1
                if ($Debug) { LogWrite "$Path - Added: $($Return.Matches[$i].Groups[1].Value)" 'DEBUG' $Debug }
            }
        }
        return $Groups
    }
    
    Function AddGroup {
        Param (
            [string]$Path,
            [string]$GroupNumber,
            [bool]$Debug
        )
        $SotiPath = "$Path\$GroupNumber" -replace '\\','\\'
        If ($Debug) { LogWrite "SotiPath: $SotiPath" 'DEBUG' $Debug }
        $Data = '{"Name":"' + $GroupNumber + '","Path":"' + $SotiPath + '","Icon":"None","Kind": "Regular"}'
        If ($Debug) { LogWrite "Data: $Data" 'DEBUG' $Debug }
    
        $Return = SendRequest $API 'POST' '/MobiControl/api/devicegroups' 'application/json' 'Content' $Data $False
        If ($Debug) { LogWrite "Return: $Return" 'DEBUG' $Debug }
        $Return = $Return | Select-String -Pattern '"ReferenceId": "([^"]+)"' -CaseSensitive -AllMatches
        return $Return.Matches.Groups[1].Value
    }
    
    Function GetDeviceGroupID {
        Param (
            [string]$Path,
            [bool]$Debug = $false
        )
        $SotiPath = [URI]::EscapeUriString([URI]::EscapeUriString($Path))
    
        $Return = SendRequest $API 'GET' "/MobiControl/api/devicegroups/$SotiPath" 'application/json' 'Content' $null $false
        If ($Debug) { LogWrite "$Path - Return: $Return" 'DEBUG' $Debug }
    
        $Return = $Return | Select-String -Pattern '"ReferenceId": "([^"]+)"' -CaseSensitive -AllMatches
        $ID = $Return.Matches.Groups[1].Value
        return $ID
    }
    
    Function GetRelocationID {
        Param (
            [string]$Name,
            [bool]$Debug = $false
        )
    
    	$Return = SendRequest $API 'GET' "/MobiControl/api/deviceRelocationPolicies?searchString=$Name&statuses=Assigned" 'application/json' 'Content' $null $false
        If ($Debug) { LogWrite "$Name - Return: $Return" 'DEBUG' $Debug }
    
        $Return = $Return | Select-String -Pattern '"ReferenceId": "([^"]+)"' -CaseSensitive -AllMatches
        $ID = $Return.Matches.Groups[1].Value
        return $ID
    }
    
    Function GetRelocationData {
        Param (
            [string]$RelocationRuleID,
            [string]$GroupID,
            [string]$Group,
            [bool]$Debug = $false
        )
        $Values = @(,0)
        
    
        $Return = SendRequest $API 'GET' "/MobiControl/api/deviceRelocationPolicies/$RelocationRuleID" 'application/json' 'Content' $null $false
        If ($Debug) { LogWrite "$Group - GetRelocationData Response: $Return" 'DEBUG' $Debug }
        
        $Return = $Return | Select-String -Pattern '"DeviceGroupReferenceId": "([^"]+)"|"DeviceGroupPath": "([^"]+)"' -CaseSensitive -AllMatches
        For ($i = 0; $i -le $Return.Matches.Count-1; $i++) {
            If ($Debug) { LogWrite "$Group - DeviceGroupReferenceId: $($Return.Matches[$i].Groups[1].Value) - DeviceGroupPath: $($Return.Matches[$i+1].Groups[2].Value)" 'DEBUG' $Debug }
            $Values += ''
            $Values[0] += 1
            $Values[$Values[0]] = @("$($Return.Matches[$i].Groups[1].Value)", "$($Return.Matches[$i+1].Groups[2].Value)")
            if ($Debug) { LogWrite "$Group - Added Data Values ($i/$($i+1)/$($Return.Matches.Count)): $($Return.Matches[$i].Groups[1].Value) | $($Return.Matches[$i+1].Groups[2].Value)" } 
            $i++
        }
    
        $Values += ''
        $Values[0] += 1
        $Values[$Values[0]] = @("$GroupID", "$Group")   
        if ($Debug) { 
            LogWrite "$Group - Added Data Values ($i/$($i+1)/$($Return.Matches.Count)): $($Return.Matches[$i].Groups[1].Value) | $($Return.Matches[$i+1].Groups[2].Value)"
            LogWrite "$Group - Relocation Data Values: $Values" 'DEBUG' $Debug 
        }
        return $Values
    }
    
    $login = Get-Credential
    $accessToken = SendTokenRequest $API 'POST' '/MobiControl/api/token' "grant_type=password&username=$($login.UserName)&password=$($login.GetNetworkCredential().Password)" $false
    Alles anzeigen

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™