Quick Support

Für den Fernsupport von nicht verwalteten Geräten verwenden wir die sichere und schnelle Support-Software von AnyDesk.

Sie können unseren angepassten Client für Windows, MacOS und Linux unten herunterladen.

Windows Quicksupport
MacOS Quicksupport
Linux 64-Bit Quicksupport
Skip to content

XenMobile Script: Set all unknown ownership devices to BYOD

A friend wanted to know how he can change the ownership of devices for an existing XenMobile Deployment.

This scripts sets all devices, which don’t have any ownership assigned (aka „unknown“), to BYOD devices.

#Parameter
#Server address
$xmserver = "hostedXenMobileAT.vsqloud.de"

#Module https://github.com/wvanbesien/XenMobileShell
Import-Module XenMobileShell

#Request Credentials
$credentials = Get-Credential

#Connecto to Server
$xmsession = new-XMSession -credential $credentials -server $xmserver -port 4443

#Load all devices
$xmdesvices = get-XMDevice

#loop though devices
foreach ($xmdevice in $xmdesvices){
    
    #get properties
    $xmdeviceproperty = get-XMDeviceProperty -id $xmdevice.id

    #extract ownership
    # no value = ownership not set
    # 0 = ownership is BYOD
    # 1 = ownership is COORP
    $xmdeviceownership = $xmdeviceproperty | where {$_.Name -eq "CORPORATE_OWNED"}
 
 
    
    if (!($xmdeviceownership)){
        Write-Host "ID  $($xmdevice.id), Username $($xmdevice.userName) Serial: $($xmdevice.serialNumber) has no Owner attribute, setting to BYOD" -ForegroundColor Yellow
        set-XMDeviceProperty $xmdevice.id  -name "CORPORATE_OWNED" -value "0" -Confirm:$false
    }

}

 

Dieser Beitrag hat 0 Kommentare

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

ERROR: si-captcha.php plugin: securimage.php not found.

An den Anfang scrollen
Translate »