external help file | Module Name | online version | schema |
---|---|---|---|
Optimized.Mga-help.xml |
Optimized.Mga |
2.0.0 |
Add-Mga is an Alias for the method Put.
Add-Mga [-Uri] <String> [-Body <Object>] [-Api <String>] [-CustomHeader <Object>] [-ReturnAsJson]
[<CommonParameters>]
Creates a new object in the Azure AD tenant with the Microsoft Graph API.
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: String
Parameter Sets: (All)
Aliases: URL
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Body will accept a PSObject or a Json string.
Type: Object
Parameter Sets: (All)
Aliases: InputObject
Required: False
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: (All)
Aliases: Reference
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This not a not mandatory parameter, there is a default header containing application/json. By using this parameter you can add a custom header. The CustomHeader is reverted back to the original after the cmdlet has run.
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This is not a mandatory parameter. By using, this the output will be returned as Json. When it cannot be converted to json, it will be returned as is.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
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.
The method Put is currently only used for uploading files to Sharepoint. Examples: https://baswijdenes.com/how-to-upload-files-to-sharepoint-with-ms-graph-api-and-powershell/