-
Notifications
You must be signed in to change notification settings - Fork 141
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
xADObjectPermissionEntry: Fails when applied in the same configuration as xADDomain #296
Comments
How come that importing the module does not create the PSDrive? 🤔 I curious if this is because the feature
Since the xADDomain resource is restarting the node, the Active Directory is running on the node once it comes back online, so next time the configuration runs it should import the module ActiveDirectory again, and PSDrive should be created. 🤔 What are you thoughts around this? |
Hi @johlju, when the DSC configuration first runs, the No other |
@X-Guardian Thanks for that! Appreciate the detailed run down! I will review the PR you sent in to resolve this issue. |
Yep agree, I added one so far https://github.com/PowerShell/xActiveDirectory/tree/dev/Tests/Integration. Another PR will add another. I'm working on instructions on how to set up a test environment that I will send in as a PR eventually (half way done). It will be one of ways to set it up, we need to work on alternatives too. |
Details of the scenario you tried and the problem that is occurring
When deploying an
xADObjectPermissionEntry
resource in the same configuration as a newxADDomain
resource, thexADObjectPermissionEntry
will fail with the errorCannot find drive. A drive with the name 'AD' does not exist
the first time the configuration is deployed.Verbose logs showing the problem
Suggested solution to the issue
The resource is attempting to use the
AD
PSDrive without first verifying that it is present. I believe it is normally created when theActiveDirectory
module is initially loaded, but only if the Active Directory is running at the time. In this scenario, the module is loaded prior to the Active Directory being installed, so no AD PSDrive is created. The resource therefore should check for the existence of theAD
PSDrive and create it if necessary.The DSC configuration that is used to reproduce the issue (as detailed as possible)
The operating system the target node is running
Version and build of PowerShell the target node is running
Version of the DSC module that was used ('dev' if using current dev branch)
2.26.0.0
The text was updated successfully, but these errors were encountered: