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

Get-TargetResource functions in all resources do not return current configuration #18

Open
MartinVokurek opened this issue Jun 7, 2018 · 3 comments
Labels
bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community.

Comments

@MartinVokurek
Copy link
Contributor

Get-TargetResource functions in all xBitlocker resources are currently implemented as mostly dummy functions that do not read current Bitlocker configuration. This makes the use of this resource for configuration reporting very limited.
It would be great if the Get-* resources could be enhanced to return configuration information such as AutoUnlock status, EncryptionMethod, list of Key Protectors, etc.

@johlju
Copy link
Member

johlju commented Jun 7, 2018

Thanks for this issue! That's a bug, Get-TargetResource should always return a hash table with keys same as the properties in schema.mof.

@johlju johlju added bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community. labels Jun 7, 2018
@mhendric
Copy link
Contributor

mhendric commented Nov 21, 2018

While it would be awesome to have the Get-TargetResource return the status of Bitlocker, I'm not sure that we can add members to the return Hashtable that are not also defined as parameters in the resource schema. Doing so would cause Get-DscConfiguration to return an error like the one listed below. That being the case, I'm not sure how we could implement Get-TargetResource in a way that would return useful Bitlocker information. @MartinVokurek or @johlju , do you have any ideas on how this could be done?

Error:
The PowerShell DSC resource returned results that are not valid from Get-TargetResource. The XXX key is not a valid property in the corresponding DSC resource schema file. The results from Get-TargetResource must be in a Hashtable format. The keys in the Hashtable must be the same as the properties in the corresponding DSC resource schema file.

@mhendric
Copy link
Contributor

Thought about this some more, and I think the solution is to implement additional properties for reporting purposes as [read] properties in the resource schema.

@SteveL-MSFT SteveL-MSFT added this to Help Wanted in powershell/dscresources May 14, 2019
@SteveL-MSFT SteveL-MSFT removed this from Help Wanted in powershell/dscresources Nov 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community.
Projects
None yet
Development

No branches or pull requests

3 participants