Export devices from WMS 1.1

Tagged: , ,

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #46920
    MKAG
    Participant
    • Total Post: 1
    • Newbie

    Hello, everybody,
    we currently use the WMS version 1.1 for the administration of our thin clients. i’ve been trying to export the devices listed in it for a while now, according to the documentation this should work, but I can’t find the specified button. I also tried to access the MongoDB and the MariaDB to access the information from there. With the MariaDB a connection can be established, with the MongoDB not, here the access data is missing.

    Maybe someone can give me a good tip on how to get the information after all.

    Thank you very much

    Many greetings,
    Patrick

    #46951
    VNad
    Participant
    • Total Post: 35
    • Frequent Flyer
    • ★★★

    Hi Patrick,

    are you using the Cloud Version of Wyse Management Suite or an OnPrem installation…?!

    If OnPrem, is it the Standard or Pro version..?

    Regards

    Volker

    #47278
    elproducto
    Participant
    • Total Post: 94
    • Back Stage Pass
    • ★★★★

    You can export WMS data from the Mongodb using command mongoexport.  You should create a readonly user account and create a a text file with what fields you want information from.

    #49421
    dougblack3684
    Participant
    • Total Post: 34
    • Frequent Flyer
    • ★★★

    Have you a step by step that could help people not familiar with Mongo on how to export? I myself am looking to export the fleet details with the basics – last user, IP, serial, MAC etc but struggling…..

    #49425
    SysLuza
    Participant
    • Total Post: 12
    • Regular Joe
    • ★★

    I have done it like elproducto wrote in his early post.

    I will write down step by step, how I had done it. I’m not familiar with mongo db, so I used for the part to create the read only user a GUI tool: NoSQLBooster, that was easier for me.

    1. Login to your WMS Server
    2. Install the Tool NoSQLBooster
    3. Create a connection to localhost with Authentication method: Basic (Username/Password) Note: Password was set during installation of WMS!autehtication
    4. After that you will connect to the mongodb
    5. Go to Stratus DB and there go on to: Users
    6. Right click > Add User .. > Read this Database
    7. On the Rightsite will show a script where you can set username and password for the new Read-only user.
    8. Click on Run and the new User will be created.
    9. After that I used a small powershell script on the WMS (at the end)
    10. My JSON File is created

    CSV is possible too, but you have to know the fields first which you want in your export.

    I hope it’s clear and it will help.

    kind regards

    SysLuza

     

    $database = “stratus”
    $collection = “devices”
    $user = “yourUSER”
    $pw = “yourUSERPassword”
    $path = “c:\temp”

    mongoexport -d $database -c $collection -u $user -p $pw -o $path

     

    #49428
    ConfGen
    Keymaster
    • Total Post: 10692
    • Jedi Master
    • ★★★★★★★

    Thanks Lukas 🙂

    CG

    #49454
    elproducto
    Participant
    • Total Post: 94
    • Back Stage Pass
    • ★★★★

    For CVS export I used the following command in a batch file, but I do like the the Powershell approach by SysLuza.  I have included below the contents of my field file, these are the field pulled from DB in the CSV file.

    Batch File
    “C:\Program Files\DELL\WMS\MongoDB\bin\mongoexport” –db stratus –collection devices –type=csv –out C:\WMSREPORTS\wmsreport.csv -u youruser -p youruserpassword –authenticationDatabase “stratus” /fieldFile:”C:\WMSREPORTS\fields.txt”

    Fields.txt
    name
    groupName
    modelName
    macAddress
    ip
    subnet
    serialNum
    devicePlatformType
    cpuFamily
    registrationTime
    isOnline
    isCompliant
    isCheckinCompliant
    isInstalledAppCompliant
    isConfigCompliant
    isCaValidationOn
    isActive
    flashSize
    lastCheckinTime
    lastConfigTime
    timezoneName
    lastLoggedInUser
    hasAlerts
    osCaption
    osBuildVersion
    mandatoryAppCompliantStatus
    uptime

    #49460
    dougblack3684
    Participant
    • Total Post: 34
    • Frequent Flyer
    • ★★★

    That batch file massively helps, I’m on WMS 1.3, and the one field not pulling is lastLoggedInUser, is this an updated field name, if so… what’s the chances you know the new value?

    #49461
    SysLuza
    Participant
    • Total Post: 12
    • Regular Joe
    • ★★

    Try the field name: lastUser

    #49462
    dougblack3684
    Participant
    • Total Post: 34
    • Frequent Flyer
    • ★★★

    Yes I did lastUser and it pulls back below:

    Yes the domain\user is there, but is there a tweak to just return that value and not the rest?

    {“_id”:{“$oid”:”5ca23250b8a5b30b0ca690c4″},”started”:{“$date”:”2019-04-01T15:46:24.000Z”},”userId”:{“$numberLong”:”0″},”userName”:”DOMAIN\USERNAME“,”device”:{“_id”:{“$oid”:”5c73e65b891655111ced509e”},”isOnline”:false,”name”:”WT8cec4b42677b”,”macAddress”:”8cec4b42677b”,”checkinInterval”:0,”cellularTechnology”:0,”timezone”:0,”wyseIdentifier”:”wyse8746011571271688465″,”ownership”:0,”hasAlerts”:false,”isJailBroken”:false,”isRealJailBroken”:0,”isLocAllow”:false,”isCompliant”:true,”compliantStatus”:1,”isInstalledAppCompliant”:true,”isConfigCompliant”:true,”isRoaming”:false,”isDataRoamingEnabled”:true,”isEmployeeOwned”:false,”isNameChanged”:false,”deviceEncryptionCompliantStatus”:1,”jailBrokenCompliantStatus”:1,”networkInterfaces”:[],”storages”:[],”wifis”:[],”mailAccounts”:[],”packageInfos”:[],”notes”:[],”nonCompliantConfigParamCatalogs”:[],”supervisedModeEnabled”:0,”androidForWorkMode”:0,”activationLockEnabled”:0,”harewareEncryptionCaps”:0,”isPasscodePresent”:true,”isPasscodeCompliant”:true,”isPasscodeCompliantWithProfiles”:true,”isCheckinCompliant”:true,”installedAppCompliantStatus”:1,”restrictedAppCompliantStatus”:1,”mandatoryAppCompliantStatus”:1,”configCompliantStatus”:1,”isVoiceRoamingEnabled”:true,”deviceProfiles”:[],”deviceProvisioningProfiles”:[],”deviceCertificates”:[],”flashSize”:0,”hasOwnerChangedSinceLastCheckIn”:false,”isCaValidationOn”:false,”isAssigned”:false,”isUsingLatestFirmware”:false,”iTunesStoreAccountIsActive”:0,”isDeviceLocatorServiceEnabled”:0,”isDoNotDisturbInEffect”:0,”personalHotspotEnabled”:0,”isCloudBackupEnabled”:0,”hasSDcard”:false,”wiFiRadio”:false,”vpnStatus”:false,”deviceSleeping”:false,”maxConcurrentDownloads”:0,”currentDownloads”:0,”supportWol”:false,”writeFilterType”:0,”writeFilterStatus”:0,”windowsAgentQueryDevice”:false,”allowFasterImageDownload”:false,”isQuarantined”:false,”adminPwd”:false,”appSandbox”:false,”onlineStatus”:1,”vendorId”:{“$numberLong”:”0″},”osBootDisk”:{“$numberLong”:”0″},”connectedServer”:0,”registrationStatus”:3,”dayNum”:0,”id”:{“$numberLong”:”2″},”updatedAt”:{“$date”:”2019-04-01T14:55:38.000Z”},”isActive”:true,”createdAt”:{“$date”:”2019-02-25T12:58:03.022Z”}},”dayNum”:0,”id”:{“$numberLong”:”0″},”updatedAt”:{“$date”:”2019-04-01T15:46:24.354Z”},”isActive”:true,”createdAt”:{“$date”:”2019-04-01T15:46:24.354Z”}}

    #49464
    SysLuza
    Participant
    • Total Post: 12
    • Regular Joe
    • ★★

    I don’t know, I get the same value in this field. That’s a lot of information which are unnecessary.

    One thing you can do is: you open the csv file in excel and you trim this field by comma. That’s more a manuelly way to get the user. For a one time job I think enough.

    But if you need the information more often, then better write a script to automate this.

    #49465
    dougblack3684
    Participant
    • Total Post: 34
    • Frequent Flyer
    • ★★★

    Yes, scripting a cleanup was my second option, but thought I’d ask in case anyone had already worked it out 🙂

     

    Thanks for the help though, this has saved me a whole heap of time!

    #107915
    Tuborg
    Participant
    • Total Post: 7
    • Newbie

    Have you an Idea or what you make lastUser to a normal field without the many informaltions ?

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.