Hi All,
I am new to powershell and so here.
Perhaps my question looks so ease for the experts but still I need your help.
I have a below script from the following link : Export Yammer group members to a .csv file
whenever I run it from Powershell ISE it exports csv to my local folder, but for stakeholders I should arrange user interface with button click to download the csv report.
#################################### # Export Yammer group members: https://support.microsoft.com/en-us/office/export-yammer-group-members-to-a-csv-file-201a78fd-67b8-42c3-9247-79e79f92b535 # Before running ensure the proxy is not in the way, either by updating the code, or by deactivating GRAS # update value with Yammer Community ID $GroupId=1234567 #my group_id $Token = "12345678-987asdf786adsf34xxxxx" #my token $Headers = @{ "Authorization" = "Bearer "+ $Token } $GroupCycle = 1 DO { $GetMoreGroupsUri = "https://www.yammer.com/api/v1/users/in_group/$GroupId.xml?page=$GroupCycle" write-host ("REST API CALL : $GetMoreGroupsUri") [xml]$Xml = ((Invoke-WebRequest -Uri $GetMoreGroupsUri -Method Get -Headers $Headers).content) $YammerGroups += $Xml.response.users.user $GroupCycle ++ $GroupCount += $Xml.response.users.user.count write-host ("GROUPMEMBER COUNT : $GroupCount") } While ($Xml.response.users.user.count -gt 0) $YammerGroups | Where {$_} | Export-Csv "YammerCommunity$GroupId.csv" -Delimiter "," ##############################
Can someone help to achieve this?
Thanks in advance.