Delete User and Delegate Profile/Data with Powershell

%3CLINGO-SUB%20id%3D%22lingo-sub-1432634%22%20slang%3D%22de-DE%22%3EDelete%20User%20and%20Delegate%20Profile%2FData%20with%20Powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1432634%22%20slang%3D%22de-DE%22%3E%3CP%3EHello%20Everybody%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ei%20want%20to%20ask%20if%20someone%20have%20an%20idea%20how%20i%20can%20set%20the%20tasks%20for%20delegating%20data%20of%20an%20removed-user%20to%20another%20person%20by%20PowerShell%20(or%20Flow)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20want%20to%20set%20these%20steps%20by%20Powershell%2C%20is%20that%20possible%3F%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222020-06-02%2008_11_03-Window.png%22%20style%3D%22width%3A%20644px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F195871i718581F85BF1BF9E%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%222020-06-02%2008_11_03-Window.png%22%20alt%3D%222020-06-02%2008_11_03-Window.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1432634%22%20slang%3D%22de-DE%22%3E%3CLINGO-LABEL%3EAdmin%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%20Administration%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%20Management%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1432665%22%20slang%3D%22en-US%22%3ERe%3A%20Delete%20User%20and%20Delegate%20Profile%2FData%20with%20Powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1432665%22%20slang%3D%22en-US%22%3E%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20inherit%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%3B%22%3EIt%20is%2C%20however%20you%20will%20have%20to%20use%20cmdlets%20from%20different%20PowerShell%20modules%2C%20and%2For%20use%20the%20corresponding%20Graph%20endpoints.%20License%20management%20can%20be%20done%20via%20the%20MSOnline%2FAzure%20AD%20module%20or%20the%20Graph%20API.%20Mailbox%20permissions%2Femail%20address%20management%2Fforwarding%20can%20be%20configured%20via%20the%20Exchange%20Online%20PowerShell%20cmdlets.%20Delegating%20OneDrive%20can%20be%20done%20via%20SPO%20PowerShell.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1432672%22%20slang%3D%22de-DE%22%3ERe%3A%20Delete%20User%20and%20Delegate%20Profile%2FData%20with%20Powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1432672%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F58%22%20target%3D%22_blank%22%3E%40Vasil%20Michev%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethank%20you%20for%20the%20fast%20response%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20found%20sample%20scripts%20for%20licensing%20and%20exchange%20delegation.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20not%20for%20the%20OneDrive%20Delegation%20Functions.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDo%20you%20have%20some%20examples%20or%20links%20for%20me%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1434044%22%20slang%3D%22en-US%22%3ERe%3A%20Delete%20User%20and%20Delegate%20Profile%2FData%20with%20Powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1434044%22%20slang%3D%22en-US%22%3E%3CP%3EHere%20you%20go%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fpetri.com%2F4-ways-add-secondary-administrator-onedrive-business%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fpetri.com%2F4-ways-add-secondary-administrator-onedrive-business%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Hello Everybody,

 

i want to ask if someone have an idea how i can set the tasks for delegating data of an removed-user to another person by PowerShell (or Flow)

 

I want to set these steps by Powershell, is that possible?

2020-06-02 08_11_03-Window.png

3 Replies
Highlighted

It is, however you will have to use cmdlets from different PowerShell modules, and/or use the corresponding Graph endpoints. License management can be done via the MSOnline/Azure AD module or the Graph API. Mailbox permissions/email address management/forwarding can be configured via the Exchange Online PowerShell cmdlets. Delegating OneDrive can be done via SPO PowerShell.

Highlighted

@Vasil Michev 

thank you for the fast response

 

I found sample scripts for licensing and exchange delegation.

 

But not for the OneDrive Delegation Functions.

 

Do you have some examples or Links for me?