< Back

Remove-ProvDyn365Entity

Sun Jan 19, 2020 5:39 pm

NAME Remove-ProvDyn365Entity



SYNOPSIS

Delete an entity from Dynamics365/ProvanceITSM.





SYNTAX

Remove-ProvDyn365Entity -AuthContext <object> -EntityName <string> -Id <string> [-APIVersion <string>]

[<CommonParameters>]



Remove-ProvDyn365Entity -AlternateKey <string> -AuthContext <object> -EntityName <string> [-APIVersion <string>]

[<CommonParameters>]





DESCRIPTION

This cmdlet deletes aentity in a Dynamics365/ProvanceITSM instance via the WEB API forever!





PARAMETERS

-AuthContext <object>

The Authentication context generated by Get-ProvAzureAuthContext



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-EntityName <string>

The logical name of the entity in Dynamics365/ProvanceITSM. This value is case sensitive !



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Id <string>

The GUID(id) of the entity generated by Dynamics365/ProvanceITSM.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-AlternateKey <string>

The Alternate Key of the entity in Dynamics365/ProvanceITSM.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-APIVersion <string>

The Web-API Version used to query. Default is 'v9.0'".



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

System.String





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



Remove a contact





Remove-ProvDyn365Entity -AuthContext $token -EntityName contact -Id $rc.contactid





ParameterSet name used is "Remove By Id"

The -Id Parameter requires the unique id of the contact which can be found by using the below example.

$rc = Get-ProvDyn365Entity -AuthContext $token -EntityName contact -FilterSection "contains(fullname,'max')"

-SelectSection fullname



The $token object is generated by the cmdlet Provance.AzureAuthcontext which can be found in the Provance.Azure

Module.



---------- EXAMPLE 2 ----------



Remove a Provance ITSM cloud tenant entity by alternate key





Remove-ProvDyn365Entity -AuthContext $token -EntityName apitil_cloudtenant -AlternateKey

'3b73821b-c07e-4c26-9b0a-2aea92fd4100'



ParameterSet name used is "Remove By Alternate Key", and we look for an entity of type "apitil_cloudtenant"

where the alternate key of the entity has the value of the above example.

The $token object is generated by the cmdlet Provance.AzureAuthcontext which can be found in the Provance.Azure

Module.





RELATED LINKS

Provance Technologies Inc. (http://provance.com)

Help (http://help.provance.com)