{"id":20326065,"url":"https://github.com/matteoguadrini/psfstools","last_synced_at":"2025-06-18T14:38:03.135Z","repository":{"id":127250303,"uuid":"165882766","full_name":"MatteoGuadrini/PSFSTools","owner":"MatteoGuadrini","description":"Tools for File Server Role","archived":false,"fork":false,"pushed_at":"2020-05-20T13:55:04.000Z","size":119,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-04T10:45:24.317Z","etag":null,"topics":["backup-archivefiles","cmdlet","deduplication","disk-usage","duplicate-files","file-server","file-server-resource-manager","filesystem","fs","powershell","powershell-module","projectfolder","server-topology","topology"],"latest_commit_sha":null,"homepage":"https://matteoguadrini.github.io/PSFSTools/","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MatteoGuadrini.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-15T16:14:20.000Z","updated_at":"2023-03-04T10:27:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"fafc1ed7-105c-4f75-8970-782c2722bdd7","html_url":"https://github.com/MatteoGuadrini/PSFSTools","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/MatteoGuadrini/PSFSTools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatteoGuadrini%2FPSFSTools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatteoGuadrini%2FPSFSTools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatteoGuadrini%2FPSFSTools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatteoGuadrini%2FPSFSTools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MatteoGuadrini","download_url":"https://codeload.github.com/MatteoGuadrini/PSFSTools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatteoGuadrini%2FPSFSTools/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260572166,"owners_count":23030018,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup-archivefiles","cmdlet","deduplication","disk-usage","duplicate-files","file-server","file-server-resource-manager","filesystem","fs","powershell","powershell-module","projectfolder","server-topology","topology"],"created_at":"2024-11-14T19:42:47.979Z","updated_at":"2025-06-18T14:37:58.115Z","avatar_url":"https://github.com/MatteoGuadrini.png","language":"PowerShell","readme":"\u003cimg src=\"https://i.ibb.co/xq6c0Xj/psfstools.png\" alt=\"PSFSTools\"\u003e\n\n# PSFSTools is:\nSimple file server tools for complex task.\n## A powershell module\n**PSFSTools** is a powershell module. Download and copying it under `%Windir%\\System32\\WindowsPowerShell\\v1.0\\Modules` for all users or under `%UserProfile%\\Documents\\WindowsPowerShell\\Modules` for the current user or install through [PowershellGallery](https://www.powershellgallery.com/packages/PSFSTools).\n\u003e ATTENTION: This module is not signed. Before import or execute cmdlet on this module, see [about_signing](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_signing) session. Verify execution of scripts is allowed with `Get-ExecutionPolicy` (should be RemoteSigned or Unrestricted). If scripts are not enabled, run PowerShell as Administrator and call ```Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Confirm```.\n\nYou can also install it via git:\n```\ngit clone https://github.com/MatteoGuadrini/PSFSTools.git\ncd PSFSTools\ncopy /Y PSFSTools %Windir%\\System32\\WindowsPowerShell\\v1.0\\Modules\n```\n## A collection of tool\nVarious task on a file server, require execution complexity; how and when to archive, create folders assigned to certain groups or delete files older than one month or delete folders that are no longer used.\n\nThis module, with  \n## Tools:\n* New-ProjectFolder\n* Remove-OlderThan\n* Backup-ArchiveFiles\n* New-TemplateFileServer\n* Write-FileServerFromTemplate\n* Get-DedupFiles\n* Show-LatestCreatedFile\n* Show-LatestWritedFile\n* Show-LatestAccessedFile\n* Show-FolderLength\n* Backup-ACLFolders\n* Restore-ACLFolders\n\nFor more module info, run:\n```powershell\nGet-Help about_psfstools\n```\n\n### New-ProjectFolder\nCreates a project folder and assign ACL with three Active Directory groups: Owner, Writer, Reader. For example:\n```powershell\nNew-ProjectFolder -Name Test -LitheralPath C:\\Project -Permission Owner,Writer,Reader -OU \"OU=Test,DC=Test,DC=local\"\n```\nThe name of directory is *Test* and your path is *C:\\Project\\Test*. This cmdlet, creates a three Active Directory security group:\n* Test_Readers (Read, Execute)\n* Test_Writers (Read, Execute, Write, Modify)\n* Test_Owners (Full Control)\n\nAnd apply these on path with permission in brackets.\nFor more info, run:\n```powershell\nGet-Help New-ProjectFolder -Full\n```\n### Remove-OlderThan\n Removes files and folders older than days. In addition, also deletes empty folders. For example:\n```powershell\nRemove-OlderThan -Path C:\\Temp -Days 15 -Recurse\n```\nDelete file and empty folder in *C:\\Temp*, if creation date is older than 15 days.\nFor more info, run:\n```powershell\nGet-Help Remove-OlderThan -Full\n```\n### Backup-ArchiveFiles\nArchive files older than a number of years. For example:\n```powershell\nBackup-ArchivedFiles -Path C:\\Temp -Years 2 -ArchivePath D:\\Temp -Exclude C:\\Temp\\Docs,\"C:\\Temp\\Docs two\" -AllFiles\n```\nLooking for file with Access Date older than two years into path *C:\\Temp*; the destination path is *D:\\Temp*. With *Exclude* option you can skip file in specified paths. Flag *AllFiles* means than all files in a folder must be older than two years. This cmdlet performing a move.\nFor more info, run:\n```powershell\nGet-Help Backup-ArchiveFiles -Full\n```\n## File server topology configuration\nTo create and maintain a file server topology, use the following commands.\n### New-TemplateFileServer\nWith this command you can create an example topology file of a file server.\n```powershell\nNew-TemplateFileServer -Path C:\\Temp\\fs1.xml\n```\nChange the topology according to your needs.\n### Write-FileServerFromTemplate\nApplying topology means creating folders and assigning them permissions, specified in the topology template file.\nTo apply it, run this command:\n```powershell\nWrite-FileServerFromTemplate -Template C:\\Temp\\fs1.xml -RootPath D:\\FS\n```\nApplying the command a second time, the new folders in the topology will be created, while the existing ones will be ignored. All permissions will be overwritten, if `-Force` parameter is specified.\n\nFor more info, run:\n```powershell\nGet-Help New-TemplateFileServer -Full\nGet-Help Write-FileServerFromTemplate -Full\n```\n\n## Report cmdlet\nThese cmdlets are used to run reports\n### Get-DedupFiles\nTo recover files that are duplicated in a certain path\n```powershell\nGet-DedupFiles -Path C:\\Temp\n```\nOr to traverse the path, just specify the _-Recurse_ parameter: \n```powershell\nGet-DedupFiles -Path C:\\Temp -Recurse\n```\n\nFor more info, run:\n```powershell\nGet-Help Get-DedupFiles -Full\n```\n\n### Show-LatestCreatedFile\nShow the latest created files based on a date or size.\nThe size of the files can be specified in bytes 1, 1MB, 1GB, 1TB, 1PB.\n```powershell\nShow-LatestCreatedFile -Path C:\\Temp -Recurse -Size 50MB -CreationTime '05/29/2016'\n```\n\nFor more info, run:\n```powershell\nGet-Help Show-LatestCreatedFile -Full\n```\n\n### Show-LatestWritedFile\nShow the latest modified files based on a date or size.\nThe size of the files can be specified in bytes 1, 1MB, 1GB, 1TB, 1PB.\n```powershell\nShow-LatestWritedFile -Path C:\\Temp -Recurse -Size 50MB -CreationTime '05/29/2016'\n```\n\nFor more info, run:\n```powershell\nGet-Help Show-LatestWritedFile -Full\n```\n\n### Show-LatestAccessedFile\nShow the latest accessed files based on a date or size.\nThe size of the files can be specified in bytes 1, 1MB, 1GB, 1TB, 1PB.\n```powershell\nShow-LatestAccessedFile -Path C:\\Temp -Recurse -Size 50MB -CreationTime '05/29/2016'\n```\n\nFor more info, run:\n```powershell\nGet-Help Show-LatestAccessedFile -Full\n```\n\n### Show-FolderLength\nShow to estimate file space usage.\nTrack the directories which are consuming excessive amount of space on a drive.\n```powershell\nShow-FolderLength -Path C:\\Temp\n```\n\nFor more info, run:\n```powershell\nGet-Help Show-FolderLength -Full\n```\n\n## Backup/Restore ACL cmdlet\nThese cmdlets are used to backup and restore ACL on folder structure\n### Backup-ACLFolders\nBackup ACL traverse folders on specific path.\nThe backup csv header is:\n*\"Path\",\"FileSystemRights\",\"AccessControlType\",\"IdentityReference\",\"IsInherited\",\"InheritanceFlags\",\"PropagationFlags\"*.\n```powershell\nBackup-ACLFolders -Path C:\\Temp -OutputCSV C:\\Temp2\\acl_temp.csv\n```\n\nFor more info, run:\n```powershell\nGet-Help Backup-ACLFolders -Full\n```\n\n### Restore-ACLFolders\nRestore ACL traverse folders on specific path.\nThe backup csv header is:\n*\"Path\",\"FileSystemRights\",\"AccessControlType\",\"IdentityReference\",\"IsInherited\",\"InheritanceFlags\",\"PropagationFlags\"*.\n\u003e ATTENTION: For this operation, need administrative permissions\n\n```powershell\nRestore-ACLFolders -InputCSV C:\\Temp2\\acl_temp.csv\n```\n\nFor more info, run:\n```powershell\nGet-Help Restore-ACLFolders -Full\n```\n\n## Share cmdlet\nThese cmdlets are used to manage file server share\n### Suspend-FSShare\nTemporary suspension of a samba share. Permission will be maintained at the end of the suspension.\n\u003e ATTENTION: For this operation, need administrative permissions\n```powershell\nSuspend-FSShare -Share Temp\n```\n\nFor more info, run:\n```powershell\nGet-Help Suspend-FSShare -Full\n```\n\n\n**A great thanks**.\n\nFor donations, press this\n\nFor me\n\n[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.me/guos)\n\nFor [Telethon](http://www.telethon.it/)\n\nThe Telethon Foundation is a non-profit organization recognized by the Ministry of University and Scientific and Technological Research.\nThey were born in 1990 to respond to the appeal of patients suffering from rare diseases.\nCome today, we are organized to dare to listen to them and answers, every day of the year.\n\n\u003ca href=\"https://www.telethon.it/sostienici/dona-ora\"\u003e \u003cimg src=\"https://www.telethon.it/dev/_nuxt/img/c6d474e.svg\" alt=\"Telethon\" title=\"Telethon\" width=\"200\" height=\"104\" /\u003e \u003c/a\u003e\n\n[Adopt the future](https://www.ioadottoilfuturo.it/)","funding_links":["https://www.paypal.me/guos"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatteoguadrini%2Fpsfstools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatteoguadrini%2Fpsfstools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatteoguadrini%2Fpsfstools/lists"}