Forum Discussion
Need a PowerShell script for the query given below
Can anyone help me make a PowerShell script for cleaning the desktop policy and nothing to be saved in C: drive for multiple users in name.edu domain
2 Replies
- Chirayu1988Copper Contributor
Cleaning the desktop” generally refers to enforcing a non‑persistent or centrally‑controlled desktop — for example clearing user desktop files at logoff or redirecting the desktop to a different location. Completely blocking users from saving anything on the entire C:\ drive is usually not practical because Windows and many apps rely on writing to local system paths.
If the goal is a clean environment on each login, profile management (roaming/mandatory profiles or deleting local profiles on logoff) is normally the correct solution. These configurations are best handled via GPO or Intune, not custom scripts.
Could you explain what the 'cleaning the desktop' policy means? And blocking users from saving anything on the whole C:\ drive sounds like something that won't work/be easy? Do you want the profile to be removed on logoff? GPO or Intune is better for setting those things...
And most important... What have you tried yourself already? What scripts did you try? (This forum is not a ask us to build you everything you want place)