Skip to content

Instantly share code, notes, and snippets.

View apperrault's full-sized avatar

apperrault

  • Columbus, OH
  • 09:34 (UTC -04:00)
View GitHub Profile
@noahpeltier
noahpeltier / Admin Toolbox.ps1
Last active May 9, 2022 14:29
Admin tool box I created for work
#===================================================================
# Admin ToolBox
# Created by: Noah Peltier
# Version 4.0
# Email: noah.peltier@gmail.com
#
# Requires RSAT - https://www.microsoft.com/en-us/download/details.aspx?id=7887
#
#===================================================================
@markwragg
markwragg / Compare-DFStoFolders.ps1
Last active July 3, 2023 14:57
Powershell script to get a list of DFS folder targets for all DFS folders under a defined path and test if those paths are valid from the location running the script.
$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('\')