external help file | Module Name | online version | schema |
---|---|---|---|
Optimized.Mga-help.xml |
Optimized.Mga |
2.0.0 |
Invoke-Mga is a wrapper around the default Method cmdlets in the Mga module.
Invoke-Mga -Uri <Object> [-Body <Object>] -Method <Object> [-Api <String>] [<CommonParameters>]
Invoke-Mga [-Uri <Object>] -Body <Object> -Method <Object> [<CommonParameters>]
By using Invoke-Mga you do not have to change the way you use the default Method cmdlets in the Mga module.
Invoke-Mga -Uri 'https://graph.microsoft.com/v1.0/users' -Method 'GET'
Invoke-Mga -Uri '/users' -Method 'Post' -Api 'beta' -Body $Body
Invoke-Mga -Uri 'https://graph.microsoft.com/beta/groups' -Method 'Patch' -Api 'v1.0' -Body $Body
Invoke-Mga -Uri 'beta/groups' -Method 'Delete' -Api 'All'
Invoke-Mga -Method 'Batch' -Body $Body
Uri to the Microsoft Graph API. You can also use the last part of an Uri and the rest will be automatically added. Example: /users Example: https://graph.microsoft.com/v1.0/users Example: users?$filter=displayName eq 'Bas Wijdenes' Example: beta/users
Type: Object
Parameter Sets: Default
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: Object
Parameter Sets: Batch
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Body will accept a PSObject, or a Json string for Post, Patch, Put, and Delete. Body will accept an ArrayList for Batch.
Type: Object
Parameter Sets: Default
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: Object
Parameter Sets: Batch
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type of Method to the Microsoft Graph Endpoint. Methods are: Get, Post, Patch, Put, Delete, Batch.
Type: Object
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This is not a mandatory parameter. By using v1.0 or beta it will always overwrite the value given in the Uri. By using All it will first try v1.0 in a try and catch. and when it jumps to the catch it will use the beta Api.
Type: String
Parameter Sets: Default
Aliases: Reference
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.