This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-RecursiveGroupMembers { | |
[CmdletBinding(DefaultParametersetname="DomainGroup")] | |
param( | |
[Parameter(ValueFromPipeline=$true,ParameterSetName="LocalGroup")] | |
[String[]]$ComputerName, | |
[Parameter(ParameterSetName="DomainGroup")] | |
[String]$Domain, | |
[String]$Group = "Administrators" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create an app at https://apps.dev.microsoft.com | |
The only things you need are an app password ("Generate new password"), an app platform with a redirect url, ("https://login.live.com/oauth20_desktop.srf" works good as a default) and the delegated permissions Files.ReadWrite, User.Read, and offline_access. | |
Example: https://imgur.com/a/rd47l | |
Once you create the app, you will be given an Application ID. Enter this into your listener options. | |
"set ClientId <your application id>" | |
"set ClientSecret <you application secret/password>" | |
Then do "execute". This will not start the listener yet, but will give you an OAuth URL to sign in to. | |
You will be redirected to a URL like "https://login.live.com/oauth20_desktop.srf?code=M12ac16111-a605-42e9-9dbf-c155de30cfc6&lc=1033". Take the code parameter from that URL and enter it into the listener options. |