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

Microsoft365DSC Drift Report #1768

Closed
datanet76 opened this issue Feb 17, 2022 · 7 comments
Closed

Microsoft365DSC Drift Report #1768

datanet76 opened this issue Feb 17, 2022 · 7 comments

Comments

@datanet76
Copy link

No description provided.

@NikCharlebois
Copy link
Collaborator

Can you provide additional details as to what the issue at hand is?

@datanet76
Copy link
Author

datanet76 commented Feb 17, 2022 via email

@NikCharlebois
Copy link
Collaborator

What errors are you getting when running it from a Scheduled Task?

@datanet76
Copy link
Author

datanet76 commented Feb 17, 2022 via email

@Kirikou974
Copy link
Contributor

Hello,

Every -CliXml command uses data protection API to encrypt data using current user information.
So my guess is that you have some sort of secure string in your creddev.xml file.
The secure string was encrypted using a key tied to a specific account on a specific machine hence the error message you get.
You need to create a key and store it somewhere your scheduled task account has access to.
Have a look at this discussion: https://stackoverflow.com/questions/54923903/powershell-script-not-working-using-import-clixml-command
And this article : https://www.altaro.com/msp-dojo/encrypt-password-powershell/
This doesn't have much to do with M365DSC IMHO.

@ykuijs
Copy link
Member

ykuijs commented May 20, 2022

This is about a custom script, but the script itself isn't provided. This makes troubleshooting or providing pointers very difficult.

Also, as mentioned by Kirikou974, this issue isn't related to M365DSC specific, but is about the DPAPI. That is why I am closing the issue now.

If you have any more questions, please reopen the issue and provide a little more information, preferably the script you are having issues with.

@ykuijs ykuijs closed this as completed May 20, 2022
@Nilas1994
Copy link

i precisely got this problem too when the script is at startup it looks like it is relying on some services that aren't fully initialized at startup so i implemented a event based check until all services are running and delay the script for some time. try to implement at retry mechanism in your script could help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants