Need help to get special information from user as powershell script

Hello Community. 

Following problem i have.

We useing Blackberry Server as MDM.

I need a script that get the Username which have activated Blackberry UEM Android for Wor, Blackberry Work Dynamics and Blackberry allowExport Contacts.

Those information is in AD User.

It should be exported in CSV file.

For Example:

Username OU edsva_KBApps_UEM_Afw edsva_KBApps_UEM_Dynamics edsva_KBApps_UEM_Dynamics_allowExportContacts
Tom KLA Yes No No
Jones KFA No Yes No

How i can get the information?

Thanks in advance and for help.

Best Regards Eduard

Parents
  • Here's about 85% of what you need.... (I gave you sample filter syntax, you just need to fill out the rest)

    The tricky thing is adding the "included properties" because otherwise these values would not be returned.

    Import-Module ActiveRolesManagementShell
    Get-qaduser -proxy -includedproperties edsva_KBApps_UEM_Afw,edsva_KBApps_UEM_Dynamics,edsva_KBApps_UEM_Dynamics_allowExportContacts | select name,ParentContainer,edsva_KBApps_UEM_Afw,edsva_KBApps_UEM_Dynamics,edsva_KBApps_UEM_Dynamics_allowExportContacts | where {($_.edsva_KBApps_UEM_Afw -eq "Yes") -and (<next filter>) <add the rest of your filters here>} | Export-Csv "BB_MDM_Export.txt" -NoTypeInformation

Reply
  • Here's about 85% of what you need.... (I gave you sample filter syntax, you just need to fill out the rest)

    The tricky thing is adding the "included properties" because otherwise these values would not be returned.

    Import-Module ActiveRolesManagementShell
    Get-qaduser -proxy -includedproperties edsva_KBApps_UEM_Afw,edsva_KBApps_UEM_Dynamics,edsva_KBApps_UEM_Dynamics_allowExportContacts | select name,ParentContainer,edsva_KBApps_UEM_Afw,edsva_KBApps_UEM_Dynamics,edsva_KBApps_UEM_Dynamics_allowExportContacts | where {($_.edsva_KBApps_UEM_Afw -eq "Yes") -and (<next filter>) <add the rest of your filters here>} | Export-Csv "BB_MDM_Export.txt" -NoTypeInformation

Children
  • Hello Johnny.

    Thanks for answer. Slight smile

    Please can you verify, that i have filled out from the rest of them is right?

    Import-Module ActiveRolesManagementShell
    Get-qaduser -proxy -includedproperties edsva_KBApps_UEM_Afw,edsva_KBApps_UEM_Dynamics,edsva_KBApps_UEM_Dynamics_allowExportContacts | select UserPrincipalName,ParentContainer,edsva_KBApps_UEM_Afw,edsva_KBApps_UEM_Dynamics,edsva_KBApps_UEM_Dynamics_allowExportContacts | where {($_.edsva_KBApps_UEM_Afw -eq "Yes") -and ($_.edsva_KBApps_UEM_Dynamics -eq "Yes") -and ($_.edsva_KBApps_UEM_Dynamics_allowExportContacts -eq "Yes")} | Export-Csv "BB_MDM_Export.csv" -sizelimit "5000"-NoTypeInformation

    And when i run the script, i got some warnings? i have add -sizelimit "5000"    Is this correct??

    Here the Warnings:

    WARNING: The names of some imported commands from the module 'ActiveRolesManagementShell' include unapproved verbs that might make them less discoverable. To find the commands with unapproved
    verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb.
    WARNING: This search was configured to retrieve only the first 1000 results. To retrieve more results, increase the size limit using the -SizeLimit parameter or set the default size limit usi
    ng Set-QADPSSnapinSettings with the -DefaultSizeLimit parameter. Use 0 as the value of size limit to retrieve all possible search results.

    Thanks for help.

    Best Regards 

    Eduard

  • Hey Eduard

    Filters are good.

    The first warning can be ignored.

    You are on the right track with your 'SizeLimit' however it needs to be be placed just after Get-QADUser so....

    Get-QADUser -SizeLimit 5000 ...