# File System

# Get Drive/Folder Owner

```none
GET-ACL “$Path”| Select-Object path, Owner -expand access | Select-Object @{n=”Path”;e={$_.Path.replace(“Microsoft.PowerShell.Core\FileSystem::”,””)}}, Owner, IdentityReference, FileSystemRights, AccessControlType, IsInherited
```

<div class="code-toolbar" id="bkmrk-copy-13"></div>[Original Article](http://winplat.net/2014/08/23/find-file-folder-owner-information-using-powershell-or-command-prompt)

# Remove Folder With . At End Of It

```
rd /s "\\?\C:\Documents and Settings\User\Desktop\Annoying Folder."
```

<div class="code-toolbar" id="bkmrk-"><div class="toolbar"><div class="toolbar-item">  
</div></div></div>From [https://stackoverflow.com/questions/4075753/how-to](https://stackoverflow.com/questions/4075753/how-to-delete-a-folder-that-name-ended-with-a-dot)

# Remove Font Cache

```
forfiles /P C:\Windows\ServiceProfiles\LocalService\AppData\Local /M FontCache* /D -30 /C "cmd /c del @path"
```

From [https://social.technet.microsoft.com/Forums/windows/en-US/3795364f-b66c-43ae-82d3-8ed5eb1aa2ce/local-service-system-profile-grown-to-extremely-large-size?forum=winserverTS](https://social.technet.microsoft.com/Forums/windows/en-US/3795364f-b66c-43ae-82d3-8ed5eb1aa2ce/local-service-system-profile-grown-to-extremely-large-size?forum=winserverTS)

# Shrink Windows Datastore.edb

```
esentutl.exe /d c:\Windows\SoftwareDistribution\DataStore\DataStore.edb
```

From [https://www.experts-exchange.com/questions/28712976/C-Windows-SoftwareDistribution-DataStore-DataStore-edb-file-getting-bigger-than-1-GB-in-my-Windows-Server.html](https://www.experts-exchange.com/questions/28712976/C-Windows-SoftwareDistribution-DataStore-DataStore-edb-file-getting-bigger-than-1-GB-in-my-Windows-Server.html)