Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions AzFilesHybrid/AzFilesHybrid.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -3388,7 +3388,7 @@ function Debug-KerberosTicketEncryption
if(
$null -eq $kerberosTicketEncryptionClient -or `
0 -eq $kerberosTicketEncryptionClient.Count -or `
'None' -eq $kerberosTicketEncryptionClient.Value.ToString()
($kerberosTicketEncryptionClient.Value -and 'None' -eq $kerberosTicketEncryptionClient.Value.ToString())
)
{
# Now try to look for the supported kerberos ticket encryption using klist
Expand Down Expand Up @@ -3805,7 +3805,7 @@ function Debug-AzStorageAccountAuth {
$checks["CheckChannelEncryption"].Result = "Skipped"
}

if(!(Get-SmbServerConfiguration).PSobject.Properties.Name -contains "EncryptionCiphers")
if(!((Get-SmbServerConfiguration).PSobject.Properties.Name -contains "EncryptionCiphers"))
{
Write-Verbose -Message "Your operating system does not support the property 'EncryptionCiphers' of the cmdlet 'Get-SmbServerConfiguration'. Please refer to 'https://docs.microsoft.com/en-us/powershell/module/smbshare/set-smbserverconfiguration?view=windowsserver2022-ps'"
$checks["CheckChannelEncryption"].Result = "Skipped"
Expand Down Expand Up @@ -3981,10 +3981,10 @@ function Debug-AzStorageAccountAuth {

$sidNames = @{}
$user = Get-OnPremAdUser -Identity $UserName -Domain $Domain -ErrorAction Stop
$sidNames[$user.SID.Value] = $user.DistinguishedName
$sidNames[$user.SID] = $user.DistinguishedName

$groups = Get-OnPremAdUserGroups -Identity $user.SID -Domain $Domain -ErrorAction Stop
$groups | ForEach-Object { $sidNames[$_.SID.Value] = $_.DistinguishedName }
$groups | ForEach-Object { $sidNames[$_.SID] = $_.DistinguishedName }

# The user needs following role assignments to have the share-level access.
# Currently only three roles are defined, but new ones may be added in future,
Expand Down Expand Up @@ -4282,11 +4282,11 @@ function Set-StorageAccountDomainProperties {
-SPNValue $spnValue `
-Domain $Domain `
-ErrorAction Stop
$azureStorageSid = $azureStorageIdentity.SID.Value
$azureStorageSid = $azureStorageIdentity.SID
$samAccountName = $azureStorageIdentity.SamAccountName.TrimEnd("$")
$domainGuid = $domainInformation.ObjectGUID.ToString()
$domainName = $domainInformation.DnsRoot
$domainSid = $domainInformation.DomainSID.Value
$domainSid = $domainInformation.DomainSID
$forestName = $domainInformation.Forest
$netBiosDomainName = $domainInformation.DnsRoot
$accountType = ""
Expand Down Expand Up @@ -4615,7 +4615,7 @@ function Update-AzStorageAccountADObjectPassword {
# if ($Force.ToBool()) {
Write-Verbose -Message ("Attempt reset on " + $adObj.SamAccountName + " to $RotateToKerbKey")
Set-ADAccountPassword `
-Identity $adObj `
-Identity $adObj.DistinguishedName `
-Reset `
-NewPassword $newPassword `
-Server $domain `
Expand Down