I'm trying to join an Az Storage Account to Domain. The parameters are giving me a problem.
VERBOSE: Setting AD properties on **********001stg in ************-*-***-001-rg :
EnableActiveDirectoryDomainServicesForFile=True, ActiveDirectoryDomainName=******.org,
ActiveDirectoryNetBiosDomainName=******.org, ActiveDirectoryForestName=******.org
ActiveDirectoryDomainGuid=************************************, ActiveDirectoryDomainSid=,
ActiveDirectoryAzureStorageSid=,
ActiveDirectorySamAccountName=testfileshbrjqu,
ActiveDirectoryAccountType=Computer
Set-AzStorageAccount: Cannot validate argument on parameter 'ActiveDirectoryDomainSid'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.
VERBOSE: Set-StorageAccountDomainProperties: Complete
VERBOSE: Perform operation 'Enumerate CimInstances' with following parameters, ''namespaceName' = root\cimv2,'className' = win32_computersystem'.
VERBOSE: Operation 'Enumerate CimInstances' complete.
VERBOSE: Session is running in a domain-joined environment.
VERBOSE: Get storage account object for StorageAccountName=*********share001stg.
What parameter needs to be passed here in order for this to run? https://github.com/Azure-Samples/azure-files-samples/releases
Expecting it to work normally as defined in article https://github.com/Azure-Samples/azure-files-samples/releases
According to your error message, the issue is being caused by the 'ActiveDirectoryDomainSid' argument being empty or null.
You can follow this Ms-Docs to join domain with a storage account.
You can get the
ActiveDirectoryDomainSidby using the following command.Command:
Once you run the above command you can get the
ActiveDirectoryDomainSidvalue.Output:
Now you can config using the below command.
Output:
Now, you can check to confirm whether Active Directory is enabled on your storage account by using following command.
Output: