Hi @arwah abdalla ,
Thanks for contacting Microsoft Q&A platform.
Quick and short answer for your question is follow below steps to achieve.
- Create a Security Group. Add the relevant users to this security group.
- Navigate to the folders you want to restrict (e.g., Desktop, Documents, Pictures, Downloads) on the C Drive.
- Right-click each folder, select "Properties," and go to the "Security" tab.
- Remove the "Users" group and add the security group you created in
- Open Group Policy Management Console (GPMC) on your Windows Server 2022 instance.
- Create a new Group Policy Object (GPO) or edit an existing one that applies to the users who need restricted access.
- Navigate to User Configuration -> Policies -> Administrative Templates -> Windows Components -> File Explorer.
- Enable the policy "Prevent access to drives from My Computer.
Hope this helps you.