Skip to content

Commit

Permalink
Update Get-SecureGroupNames.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
klennan authored Oct 21, 2021
1 parent d2206f8 commit a19ad8c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Get-SecureGroupNames.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 "'",""
Expand Down

0 comments on commit a19ad8c

Please sign in to comment.