Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Cleaning up the "Users" folder

$
0
0

We don't use Roaming Profiles, which means that we have lots of folders in our "Users" folders on our PCs that are created when a user may need to log in to a PC once for a specific task.

I know i can use the Advanced System Settings to clear user profiles from the local machine which in turn clears out their folder in the "Users" folder but I am trying to find a way to automate it.
Basically I would like the script to run on a schedule (once a month most likely) to remove users from the local machines if they haven't logged into that machine in more than x(most likely 90) days. I am sure Powershell can help me here, but I really have no idea where to start with it and was hoping someone may have a script that I could adjust to my needs.
Thanks
 

Viewing all articles
Browse latest Browse all 15370

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>