Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use -Current LocalComputer for Get-ADDomain #72

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
4 changes: 2 additions & 2 deletions AzFilesHybrid/AzFilesHybrid.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -2665,7 +2665,7 @@ function Get-AzStorageAccountADObject {

if ($PSCmdlet.ParameterSetName -eq "ADObjectName") {
if ([System.String]::IsNullOrEmpty($Domain)) {
$domainInfo = Get-Domain
$domainInfo = Get-ADDomain -Current LocalComputer
$Domain = $domainInfo.DnsRoot
}
}
Expand Down Expand Up @@ -3749,7 +3749,7 @@ function Set-StorageAccountDomainProperties {
Write-Verbose "Set-StorageAccountDomainProperties: Enabling the feature on the storage account and providing the required properties to the storage service"

if ([System.String]::IsNullOrEmpty($Domain)) {
$domainInformation = Get-ADDomain
$domainInformation = Get-ADDomain -Current LocalComputer
$Domain = $domainInformation.DnsRoot
} else {
$domainInformation = Get-ADDomain -Server $Domain
Expand Down