< Back

Invoke-MgaRestMethodDelete

Sat Jan 18, 2020 4:41 pm

NAME Invoke-MgaRestMethodDelete



SYNOPSIS

Performs a REST DELETE against the graph API





SYNTAX

Invoke-MgaRestMethodDelete [-Field] <String> [[-User] <String>] [[-Body] <String>] [[-ContentType] <String>]

[[-ApiConnection] <String>] [[-ApiVersion] <String>] [[-Token] <AzureAccessToken>] [-Force] [[-FunctionName]

<String>] [-WhatIf] [-Confirm] [<CommonParameters>]





DESCRIPTION

Performs a REST DELETE against the graph API.

Primarily used for internal commands.





PARAMETERS

-Field <String>

The api child item under the username in the url of the api call.

If this didn't make sense to you, you probably shouldn't be using this command



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-User <String>

The user to execute this under. Defaults to the user the token belongs to.



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Body <String>

JSON date as string to send as body on the REST call



Required? false

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ContentType <String>

Nature of the data in the body of an entity. Required.



Required? false

Position? 4

Default value application/json

Accept pipeline input? false

Accept wildcard characters? false



-ApiConnection <String>

The URI for the Microsoft Graph connection



Required? false

Position? 5

Default value (Get-PSFConfigValue -FullName 'MSGraph.Tenant.ApiConnection' -Fallback

'https://graph.microsoft.com')

Accept pipeline input? false

Accept wildcard characters? false



-ApiVersion <String>

The version used for queries in Microsoft Graph connection



Required? false

Position? 6

Default value (Get-PSFConfigValue -FullName 'MSGraph.Tenant.ApiVersion' -Fallback 'v1.0')

Accept pipeline input? false

Accept wildcard characters? false



-Token <AzureAccessToken>

The access token to use to connect.



Required? false

Position? 7

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Force [<SwitchParameter>]

If specified the user will not prompted on confirmation.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-FunctionName <String>

Name of the higher function which is calling this function.



Required? false

Position? 8

Default value $MyInvocation.MyCommand

Accept pipeline input? false

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

If this switch is enabled, no actions are performed but informational messages will be displayed that explain

what would happen if the command were to run.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

If this switch is enabled, you will be prompted for confirmation before executing any operations that change

state.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Invoke-MgaRestMethodDelete -Field "mailFolders/$($id)"



Delete a mailfolder with the id stored in variable $id.











RELATED LINKS