From a19ad8c63510dc01be087d43b468ea9907b7eead Mon Sep 17 00:00:00 2001 From: Kevin Lennan Date: Thu, 21 Oct 2021 14:30:02 -0500 Subject: [PATCH] Update Get-SecureGroupNames.ps1 --- Get-SecureGroupNames.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Get-SecureGroupNames.ps1 b/Get-SecureGroupNames.ps1 index c73883e..d6a43be 100644 --- a/Get-SecureGroupNames.ps1 +++ b/Get-SecureGroupNames.ps1 @@ -14,11 +14,11 @@ function Get-SecureGroupNames { { $ShareHost = $FullPath.Split("\")[2] # \\ServerName $ShareRoot = $FullPath.Split("\")[3] # ..\RootShare - if (($env:USERDOMAIN -eq "KUHA") -and ( - ($FullPath.toLower().StartsWith("\\kuha.kumed.com\shares\departments")) -or - ($FullPath.toLower().StartsWith("\\kuha\shares\departments")) + if (($env:USERDOMAIN -eq "COMPANY") -and ( + ($FullPath.toLower().StartsWith("\\Server\shares")) -or + ($FullPath.toLower().StartsWith("\\FileServer\shares")) )) { - $ShareRoot = "Shares\Departments" + $ShareRoot = "Shares" } $ParentPath = Split-Path $FullPath -Parent $ShareGroupName = $FullPath -iReplace [regex]::Escape("\\$ShareHost\$ShareRoot\"),"" -Replace "_","" -Replace [regex]::Escape("\"),"_" -Replace " ","" -Replace ",","-" -Replace "'",""