I met an issue when remote executing: Join-AADIntDeviceToAzureAD -DeviceName "test" -DeviceType "Commodore" -OSVersion "Vic20" -JoinType Join
for some purpose, I need to setup my win10 computer to leave domain and then join AAD.
leave domain:
Invoke-Command -ComputerName $clientIp -Credential $domainCred -ScriptBlock {
param($domainCred)
Add-Computer -WorkgroupName test -Credential $domainCred -Restart -Force
} -ArgumentList $domainCred
After leave domain, I always failed to join AAD, then I found that private key is not generated in the pfx file.
Problem code is this line: $cspParameters.KeyContainerName ="AADInternals"
Looking forward to any workaround for this issue. Thanks a lot
In general, that error means that you do not have permission to access the private key. Could explain in more detail (step by step) when you get the error?
I met an issue when remote executing: Join-AADIntDeviceToAzureAD -DeviceName "test" -DeviceType "Commodore" -OSVersion "Vic20" -JoinType Join for some purpose, I need to setup my win10 computer to leave domain and then join AAD. leave domain: Invoke-Command -ComputerName $clientIp -Credential $domainCred -ScriptBlock { param($domainCred) Add-Computer -WorkgroupName test -Credential $domainCred -Restart -Force } -ArgumentList $domainCred After leave domain, I always failed to join AAD, then I found that private key is not generated in the pfx file. Problem code is this line: $cspParameters.KeyContainerName ="AADInternals" Looking forward to any workaround for this issue. Thanks a lot