Gci -force ‘C:\Users’-ErrorAction Silentl圜ontinue | ? GB’ -f ($sum / 1Gb)įor instance, in our case the total size of all user profiles in the C:\Users directory is about 22 GB (see below). STEP 1: Calculate the size of the profile of each user in the C:\Users folder with the following script: U se a PowerShell script to find and delete user profiles for inactive or blocked users. How to Remove Old User Profiles via Powershell In this article, we’ll cover the question of how to delete a user profile remotely via PowerShell. Setting quotas on a directory and thus limiting the total amount of storage consumed on the directory ( using FSRM or NTFS quotas, roaming folders, etc.) can be somewhat of a solution. When it comes to cleaning up the C:\Users directory of old and obsolete user profiles on Windows workstations and servers, especially RDS (Remote Desktop Services) terminal servers, you can remotely delete a user profile from the command line tool using PowerShell.Īs for the terminal servers, in the C:\Users folder, there accumulates a huge number of directories with out-of-date user profiles on a regular basis. Among its contents are the NTUSER.DAT file (user profile settings), user-specific folders (My Documents, Desktop, etc.), and Application Data.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |