This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#=================================================================== | |
# Admin ToolBox | |
# Created by: Noah Peltier | |
# Version 4.0 | |
# Email: [email protected] | |
# | |
# Requires RSAT - https://www.microsoft.com/en-us/download/details.aspx?id=7887 | |
# | |
#=================================================================== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Servers = @("SERVER01","SERVER02","SERVER03") | |
$FolderPaths = $Servers | foreach { | |
Get-ChildItem "\\$_\DFSShare$" | |
} | Sort Path | |
$FolderPaths | Export-Csv "FolderPaths-$(Get-Date -format yyyy-MM-dd).csv" -NoTypeInformation | |
$TestPaths = (($FolderPaths).FullName | Sort-Object).Trimend('\') | |
$DFSPaths = ((Import-CSV "DFS-$(Get-Date -format yyyy-MM-dd).csv").TargetPath | Where-Object {($_ -ilike "*SERVER*") | Sort-Object).Trimend('\') |