Forum Discussion

audi911111's avatar
audi911111
Copper Contributor
Feb 24, 2025

A powershell 7 script that will grant a global admin rights to users OneDrive

Hello, 

I'm wondering if this has ever been done, and if yes, can someone either give me the script or point me to where it is.

I have a CSV of users which I need to grant a global admin access to their One Drives. 

I've scoured the internet for scripts that will iterate through my CSV and grant me access but I am always getting errors no matter what I try to do. 

I am using PS7 for this.

Has this ever been done? If yes can someone please give me a script that can do it.

Thanks

  • audi911111's avatar
    audi911111
    Copper Contributor

    I should be clearer on what I'm actually trying to do

    1. Grant a global admin access to user one drives
    2. Download their OneDrive content
    • bart_vermeersch's avatar
      bart_vermeersch
      Steel Contributor

      If you provide us your code and error, it will be easier to answer your question. 

Resources