Skip to content

Commit

Permalink
Operator to lower case following CodeFormatter
Browse files Browse the repository at this point in the history
  • Loading branch information
dpaulson45 committed Oct 24, 2024
1 parent 78f3e30 commit 8f4a09b
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function Get-ExchangeAuthCertificateStatus {
$allMailboxServers = Get-ExchangeServer | Where-Object {
((($_.IsMailboxServer) -or
($_.IsClientAccessServer)) -and
($_.AdminDisplayVersion -Match "^Version 15"))
($_.AdminDisplayVersion -match "^Version 15"))
}

$multipleExchangeSites = (($allMailboxServers.Site.Name | Sort-Object -Unique).Count -gt 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function Test-IsServerValidForAuthCertificateGeneration {
$exchangeServerDetails = Get-ExchangeServer -Identity $ComputerName -ErrorAction Stop

if (($exchangeServerDetails.IsMailboxServer) -and
(($exchangeServerDetails.AdminDisplayVersion -Match "^Version 15"))) {
(($exchangeServerDetails.AdminDisplayVersion -match "^Version 15"))) {
Write-Verbose ("Exchange Server role and version is VALID to renew the Auth Certificate")
$isValid = $true
} else {
Expand Down
16 changes: 8 additions & 8 deletions Calendar/Get-RBASummary.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -539,8 +539,8 @@ function RBALogSummary {
$LastDate = "[Unknown]"

if ($starts.count -gt 1) {
$LastDate = ($Starts[0] -Split ",")[0].Trim()
$FirstDate = ($starts[$($Starts.count) -1 ] -Split ",")[0].Trim()
$LastDate = ($Starts[0] -split ",")[0].Trim()
$FirstDate = ($starts[$($Starts.count) -1 ] -split ",")[0].Trim()
Write-Host "`tThe RBA Log for [$Identity] shows the following:"
Write-Host "`t $($starts.count) Processed events times between $FirstDate and $LastDate"
}
Expand All @@ -555,19 +555,19 @@ function RBALogSummary {
$Cancellations = $RBALog | Select-String -Pattern "It's a meeting cancellation."

if ($AcceptLogs.count -ne 0) {
$LastAccept = ($AcceptLogs[0] -Split ",")[0].Trim()
$LastAccept = ($AcceptLogs[0] -split ",")[0].Trim()
Write-Host "`t $($AcceptLogs.count) were Accepted between $FirstDate and $LastDate"
Write-Host "`t`t with the last meeting Accepted on $LastAccept"
}

if ($TentativeLogs.count -ne 0) {
$LastTentative = ($TentativeLogs[0] -Split ",")[0].Trim()
$LastTentative = ($TentativeLogs[0] -split ",")[0].Trim()
Write-Host "`t $($TentativeLogs.count) Tentatively Accepted meetings between $FirstDate and $LastDate"
Write-Host "`t`t with the last meeting Tentatively Accepted on $LastTentative"
}

if ($DeclineLogs.count -ne 0) {
$LastDecline = ($DeclineLogs[0] -Split ",")[0].Trim()
$LastDecline = ($DeclineLogs[0] -split ",")[0].Trim()
Write-Host "`t $($DeclineLogs.count) Declined meetings between $FirstDate and $LastDate"
Write-Host "`t`t with the last meeting Declined on $LastDecline"
}
Expand All @@ -577,7 +577,7 @@ function RBALogSummary {
}

if ($UpdatedLogs.count -ne 0) {
$LastUpdated = ($UpdatedLogs[0] -Split ",")[0].Trim()
$LastUpdated = ($UpdatedLogs[0] -split ",")[0].Trim()
Write-Host "`t $($UpdatedLogs.count) Updates to meetings between $FirstDate and $LastDate"
Write-Host "`t`t with the last meeting updated on $LastUpdated"
} else {
Expand All @@ -591,15 +591,15 @@ function RBALogSummary {
}

if ($DelegateReferrals.count -ne 0) {
$LastDelegateReferral = ($DelegateReferrals[0] -Split ",")[0].Trim()
$LastDelegateReferral = ($DelegateReferrals[0] -split ",")[0].Trim()
Write-Host "`t $($DelegateReferrals.count) Delegate Referrals were sent between $FirstDate and $LastDate"
Write-Host "`t`t with the last Delegate Referral sent on $LastDelegateReferral"
} else {
Write-Host "`t No Delegate Referrals were sent in the RBA Log."
}

if ($NonMeetingRequests.count -ne 0) {
$LastNonMeetingRequest = ($NonMeetingRequests[0] -Split ",")[0].Trim()
$LastNonMeetingRequest = ($NonMeetingRequests[0] -split ",")[0].Trim()
Write-Host "`t $($NonMeetingRequests.count) Non Meeting Requests were skipped between $FirstDate and $LastDate"
Write-Host "`t`t with the last Non Meeting Request skipped on $LastNonMeetingRequest"
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ function Get-LoadBalancingReport {
Write-Grey("Site filtering ON. Only Exchange 2013+ CAS servers in {0} will be used in the report." -f $SiteName)
$CASServers = $getExchangeServer | Where-Object {
($_.IsClientAccessServer -eq $true) -and
($_.AdminDisplayVersion -Match "^Version 15") -and
($_.AdminDisplayVersion -match "^Version 15") -and
([System.Convert]::ToString($_.Site).Split("/")[-1] -eq $SiteName) } | Select-Object Name, Site | Sort-Object Name
Write-Grey("Site filtering ON. Only Exchange 2013+ MBX servers in {0} will be used in the report." -f $SiteName)
$MBXServers = $getExchangeServer | Where-Object {
($_.IsMailboxServer -eq $true) -and
($_.AdminDisplayVersion -Match "^Version 15") -and
($_.AdminDisplayVersion -match "^Version 15") -and
([System.Convert]::ToString($_.Site).Split("/")[-1] -eq $SiteName) } | Select-Object Name, Site | Sort-Object Name
} else {
if ( ($null -eq $ServerList) ) {
Write-Grey("Filtering OFF. All Exchange 2013+ servers will be used in the report.")
$CASServers = $getExchangeServer | Where-Object { ($_.IsClientAccessServer -eq $true) -and ($_.AdminDisplayVersion -Match "^Version 15") } | Select-Object Name, Site | Sort-Object Name
$MBXServers = $getExchangeServer | Where-Object { ($_.IsMailboxServer -eq $true) -and ($_.AdminDisplayVersion -Match "^Version 15") } | Select-Object Name, Site | Sort-Object Name
$CASServers = $getExchangeServer | Where-Object { ($_.IsClientAccessServer -eq $true) -and ($_.AdminDisplayVersion -match "^Version 15") } | Select-Object Name, Site | Sort-Object Name
$MBXServers = $getExchangeServer | Where-Object { ($_.IsMailboxServer -eq $true) -and ($_.AdminDisplayVersion -match "^Version 15") } | Select-Object Name, Site | Sort-Object Name
} else {
Write-Grey("Custom server list is being used. Only servers specified after the -ServerList parameter will be used in the report.")
$CASServers = $getExchangeServer | Where-Object { ($_.IsClientAccessServer -eq $true) -and ( ($_.Name -in $ServerList) -or ($_.FQDN -in $ServerList) ) } | Select-Object Name, Site | Sort-Object Name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function InvestigateProbe {
param([String]$ProbeToInvestigate , [String]$MonitorToInvestigate , [String]$ResponderToInvestigate , [String]$ResourceNameToInvestigate , [String]$ResponderTargetResource )

TestFileOrCmd $ProbeDefinitionEventCmd
if (-Not ($ResponderTargetResource) -and ($ProbeToInvestigate.split("/").Count -gt 1)) {
if (-not ($ResponderTargetResource) -and ($ProbeToInvestigate.split("/").Count -gt 1)) {
$ResponderTargetResource = $ProbeToInvestigate.split("/")[1]
}
$ProbeDetailsCmd = '(' + $ProbeDefinitionEventCmd + '| % {[XML]$_.toXml()}).event.userData.eventXml| ? {$_.Name -like "' + $ProbeToInvestigate.split("/")[0] + '*" }'
Expand Down
2 changes: 1 addition & 1 deletion PublicFolders/Update-PublicFolderPermissions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ function FindFoldersToUpdate([string[]]$includeFolders, [bool]$recurseOnFolders,
continue
}

if ($folderToSkip -notContains $foundFolder.EntryId) {
if ($folderToSkip -notcontains $foundFolder.EntryId) {
Write-Verbose "$($MyInvocation.MyCommand): Returning found folder $($foundFolder.Identity) with EntryId $($foundFolder.EntryID)"
#Return found folder
$foundFolder
Expand Down
4 changes: 2 additions & 2 deletions Security/src/Test-ProxyLogon.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ begin {
[Void]$allResults.FileList.Add( $files[$i] )

Import-Csv -Path $files[$i] -ErrorAction SilentlyContinue |
Where-Object { $_.AnchorMailbox -Like 'ServerInfo~*/*' -and $_.AnchorMailbox -notlike 'ServerInfo~*/autodiscover*' -and $_.AnchorMailbox -notlike 'ServerInfo~localhost*/*' } |
Where-Object { $_.AnchorMailbox -like 'ServerInfo~*/*' -and $_.AnchorMailbox -notlike 'ServerInfo~*/autodiscover*' -and $_.AnchorMailbox -notlike 'ServerInfo~localhost*/*' } |
Select-Object -Property $outProps |
ForEach-Object {
[Void]$allResults.Hits.Add( $_ )
Expand Down Expand Up @@ -219,7 +219,7 @@ begin {

if ((Get-ChildItem $files[$i] -ErrorAction SilentlyContinue | Select-String -Pattern "ServerInfo~").Count -gt 0) {

$hits = @(Import-Csv -Path $files[$i] -ErrorAction SilentlyContinue | Where-Object { $_.AnchorMailbox -Like 'ServerInfo~*/*Reset*VirtualDirectory#' -and $_.HttpStatus -eq 200 } |
$hits = @(Import-Csv -Path $files[$i] -ErrorAction SilentlyContinue | Where-Object { $_.AnchorMailbox -like 'ServerInfo~*/*Reset*VirtualDirectory#' -and $_.HttpStatus -eq 200 } |
Select-Object -Property $outProps)
if ($hits.Count -gt 0) {
$hits | ForEach-Object {
Expand Down

0 comments on commit 8f4a09b

Please sign in to comment.