Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Microsoft Identity Manager Metaverse PowerShell Reporting. Associated blog post is located here https://blog.darrenjrobinson.com/simple-reporting-from-the-fim-mim-metaverse-to-powerbi-using-the-lithnet-fim-mim-sync-service-powershell-module/
# Import the MVPSModule
Import-Module LithnetMIISAutomation
# Output for the report data
$downloadDirectory = 'C:\Program Files\Microsoft Forefront Identity Manager\2010\Synchronization Service\MaData\Twitter'
# Metaverse Data Query
$queryfilter = @();
$queryfilter += New-MVQuery -Attribute location -Operator Contains 'Sydney'
$queryfilter += New-MVQuery -Attribute employeeStatus -Operator isPresent
# Execute query and get results
$results = Get-MVObject -Queries $queryfilter | Select-Object -Property Attributes | select -expand *
# Get a subset of the attribures
[int]$i=0
$userdetails = $results | foreach {
New-Object PSObject -prop @{
IDAnchor = $results[$i].employeeid.values.valuestring;
TwitterName = $results[$i].uid.Values.valuestring;
Location = $results[$i].location.Values.valuestring;
Status = $results[$i].employeeStatus.Values.valuestring;
Description = $results[$i].description.Values.valuestring;
NumFriends = $results[$i].FriendsCount.values.valueinteger;
NumFollowers = $results[$i].FollowersCount.values.valueinteger;
}
$i++
}
# Output to CSV
$userdetails | Export-Csv -NoTypeInformation -Path $downloadDirectory"\TweetersOut.csv"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.