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

Added Windows "Client" OS support. Fixes #47 #49

Closed
wants to merge 3 commits into from

Conversation

mnothh
Copy link

@mnothh mnothh commented Jun 24, 2019

Pull Request (PR) description

Added support for Windows "Client" operating systems in the
Assert-HasPrereqsForBitlocker function.

This Pull Request (PR) fixes the following issues

-Fixes #47

Task list

  • Added an entry under the Unreleased section of the change log in the CHANGELOG.md.
    Entry should say what was changed, and how that affects users (if applicable).
  • Resource documentation added/updated in README.md.
  • Resource parameter descriptions added/updated in README.md, schema.mof
    and comment-based help.
  • Comment-based help added/updated.
  • Localization strings added/updated in all localization files as appropriate.
  • Examples appropriately added/updated.
  • Unit tests added/updated. See DSC Resource Testing Guidelines.
  • Integration tests added/updated (where possible). See DSC Resource Testing Guidelines.
  • New/changed code adheres to DSC Resource Style Guidelines and Best Practices.

This change is Reviewable

@codecov-io
Copy link

codecov-io commented Jun 24, 2019

Codecov Report

Merging #49 into dev will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@         Coverage Diff         @@
##            dev    #49   +/-   ##
===================================
  Coverage   100%   100%           
===================================
  Files         3      3           
  Lines        96     96           
===================================
  Hits         96     96

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ebb676e...1cf4da1. Read the comment docs.

@mhendric
Copy link
Contributor

mhendric commented Jul 9, 2019

Hi @mnothh , thanks for the submission. And sorry for the late response, as I've been on vacation. I'll get this code reviewed ASAP.

@mhendric
Copy link
Contributor

mhendric commented Jul 9, 2019

    {
        $blFeature = Get-WindowsOptionalFeature BitLocker
        if ($blFeature.InstallState -ne 'Installed')
        {

Hi @mnothh, what specific Windows and PowerShell version did you test this on? This doesn't work on my Win10 machine. I have to add -Online and -FeatureName, and also need to look at the .State property, not the .InstallState property.

PS D:\> $blFeature = Get-WindowsOptionalFeature BitLocker
Get-WindowsOptionalFeature : A positional parameter cannot be found that accepts argument 'BitLocker'.
At line:1 char:14
+ $blFeature = Get-WindowsOptionalFeature BitLocker
+              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Get-WindowsOptionalFeature], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.Dism.Commands.GetWindowsOptionalFeatureCommand

Here's it working:

PS D:\> $blFeature = Get-WindowsOptionalFeature -Online -FeatureName BitLocker
PS D:\> $blFeature |fl


FeatureName      : BitLocker
DisplayName      : BitLocker Drive Encryption
Description      : Provides full volume disk encryption for both boot volumes and data volumes.
RestartRequired  : Possible
State            : Enabled
CustomProperties :
                   mum2:Version\Major : 8
                   mum2:Version\Minor : 0
                   ServerComponent\Description : BitLocker Drive Encryption helps to protect data on lost, stolen, or
                   inappropriately decommissioned computers by encrypting the entire volume and checking the integrity
                   of early boot components. Data is only decrypted if those components are successfully verified and
                   the encrypted drive is located in the original computer. Integrity checking requires a compatible
                   Trusted Platform Module (TPM).
                   ServerComponent\DisplayName : BitLocker Drive Encryption
                   ServerComponent\Id : 61
                   ServerComponent\Type : Feature
                   ServerComponent\UniqueName : BitLocker
                   ServerComponent\NonAncestorDependencies\ServerComponent\UniqueName : EnhancedStorage
                   ServerComponent\Deploys\Update\Name : BitLocker




PS D:\> $blFeature.InstallState
PS D:\> $blFeature.State
Enabled

PS D:\>     Get-ComputerInfo -Property @(
>>         'OsName',
>>         'OsOperatingSystemSKU',
>>         'OSArchitecture',
>>         'WindowsVersion',
>>         'WindowsBuildLabEx',
>>         'OsLanguage',
>>         'OsMuiLanguages')


OsName               : Microsoft Windows 10 Enterprise
OsOperatingSystemSKU : EnterpriseEdition
OsArchitecture       : 64-bit
WindowsVersion       : 1903
WindowsBuildLabEx    : 18362.1.amd64fre.19h1_release.190318-1202
OsLanguage           : en-US
OsMuiLanguages       : {en-US}



PS D:\> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.18362.145
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.18362.145
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

@mhendric mhendric added the waiting for author response The pull request is waiting for the author to respond to comments in the pull request. label Jul 9, 2019
@mnothh
Copy link
Author

mnothh commented Jul 10, 2019

Hey @mhendric. You are likely correct. I believe this was tested on 1709(off the top of my head). I'm currently out of office as well. As soon as I have access to my test machines I'll rework this to confirm it is compatible with newer releases as well.

@mnothh mnothh closed this Oct 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for author response The pull request is waiting for the author to respond to comments in the pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resource do not work on Windows 10
3 participants