?
Solved

Does anyone have a good PS Script to ser users Desktop folder to 'Read Only'?

Posted on 2011-09-09
3
Medium Priority
?
214 Views
Last Modified: 2012-05-12
Does anyone have a good PS Script to ser users Desktop folder to 'Read Only'?

(C:\users\%username%\desktop)
0
Comment
Question by:MOSADMIN
3 Comments
 
LVL 35

Expert Comment

by:YZlat
ID: 36511732
$(Get-Item “your folder here”).Attributes = ‘Readonly’

0
 

Author Comment

by:MOSADMIN
ID: 36511835
Thanks YZLat - but I naivelty thought that this would stop users saving files to their desktop, but obviosuly it hasn't...

Do you have a script that would set NTFS Permissons for the logged on user to Read Access only on their Desktop folder (I'm sure this is slightly more complicated)

Thanks very much!

Mike
0
 
LVL 66

Accepted Solution

by:
johnb6767 earned 2000 total points
ID: 36511900
I *really* would not do this.... Or at least test THOROUGHLY. Have seen negative consequences of this in the past.....

Desktop is a System Shell Folder, for the user, and any Shell Folders that have permissions restricted/missing etc. can have a negative impact on performance.

Check to see if there are no excessive delays when opening My Computer. ANYthing that might enumerate the Desktop namespace.  Check to make sure that your Common Dialogs work in EACH application. Office/Adobe/ETC. I have seen instances where severe delays happened when the Desktop was restricted. If you are trying to make sure that data is NOT saved locally, you would probably be better off with Folder Redirection.

I know this isn't what you asked, but I wanted to at least relay my experiences...

$.02



0

Featured Post

What Security Threats Are We Predicting for 2018?

Cryptocurrency, IoT botnets, MFA, and more! Hackers are already planning their next big attacks for 2018. Learn what you might face, and how to defend against it with our 2018 security predictions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Previously, on our Nano Server Deployment series, we've created a new nano server image and deployed it on a physical server in part 2. Now we will go through configuration.
In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question