GithubHelp home page GithubHelp logo

powershell / dscresources Goto Github PK

View Code? Open in Web Editor NEW
772.0 147.0 204.0 1.87 MB

Central repository for PowerShell Desired State Configuration (DSC) resources.

Home Page: http://blogs.msdn.com/b/powershell/

License: MIT License

dscresources's Introduction

DSC Resources

Join the chat on PowerShell Slack #DSC Join the chat on PowerShell Slack #DSC Discord

This is the central repository for the DSC Resource Kit, a collection of DSC resources maintained and released by Microsoft.

A dashboard of all open issues and pull requests across DSC Resource Kit is available on the DSC Resource Kit GitHub Project board.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Support

Please review the DSC Resource Kit support guidelines here.

New to PowerShell DSC

Desired State Configuration (DSC) is a declarative management platform in PowerShell to configure, deploy, and manage systems. If you are new to DSC, configurations, or resources, you can learn more about them here.

Resource Module Source Code

The DSC Resource Kit currently contains more than 55 different resource modules.

You can find the source code of a resource module by visiting its GitHub page at:

https://github.com/PowerShell/< module name >

For example, for the CertificateDsc module, go to:

https://github.com/PowerShell/CertificateDsc

All DSC resource modules are also listed as submodules of this repository (DscResources) in the xDscResources folder or DscResources folder. Read about the differences in naming under the High Quality Resource Module section.

To download the released source code for all DSC resource modules, clone this repository with this git command:

git clone https://github.com/PowerShell/DscResources.git --recursive

Alternatively, to download just the documentation provided in this repository, clone this repository with this git command:

git clone https://github.com/PowerShell/DscResources.git

Released DSC Resource Modules

To see a list of all released DSC Resource Kit modules, go to the PowerShell Gallery and display all modules tagged as DSCResourceKit.

To find a specific module, enter the module's name in the search box in the upper right corner of the PowerShell Gallery or go directly to its URL: http://www.powershellgallery.com/packages/< module name > For example: http://www.powershellgallery.com/packages/xWebAdministration

We recommend that you use PowerShellGet to install DSC resource modules:

Install-Module -Name < module name >

For example:

Install-Module -Name xWebAdministration

To update all previously installed modules at once, open an elevated PowerShell prompt and use this command:

Update-Module

After installing modules, you can discover all DSC resources available to your local system with this command:

Get-DscResource

Contributing to the Resource Modules

You are more than welcome to contribute to the development of the DSC Resource Kit. There are several different ways you can help. You can create new DSC resources or modules, add test automation, improve documentation, fix existing issues, or open new ones. See our contributing guide for more info on how to become a DSC Resource Kit contributor.

Resource Module Maintainers

To see a list of the maintainers for each resource modules as well as the instructions for maintaining a module, see our guidelines for DSC resource maintainers.

Questions, Comments, Concerns

If you're looking into using PowerShell DSC, have questions or issues with a current resource, or would like a new resource, let us know on Twitter (@PowerShell_Team) or by creating an issue on GitHub.

The PowerShell team also hosts DSC Resource Kit community calls to give updates, collect feedback, and answer questions. Find the date of the next call in our community agenda.

dscresources's People

Contributors

alexandair avatar athaynes avatar brianfarnhill avatar devopsjesus avatar gaelcolas avatar gitter-badger avatar iristyle avatar joeyaiello avatar johlju avatar jpogran avatar karolkaczmarek avatar kjacobsen avatar kwirkykat avatar ld0614 avatar mbreakey3 avatar mcollera avatar mgreenegit avatar nehrua avatar nikcharlebois avatar outek avatar plagueho avatar powershellteam avatar robbiddle avatar stephenwade avatar stevebanik-ndsc avatar timhaintz avatar travisez13 avatar vors avatar x-guardian avatar zjalexander avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dscresources's Issues

New DSC Resource, xPfxImport for existing xCertificate module

What system will your DSC resources be managing?

Public Key Infrastructure (PKI)

Will your module include MOF-based resources (compatible with PS/WMF 4.0 and 5.0+) or class-based resources (only compatible with PS/WMF 5.0+)

MOF-based

This is code I've been using for over a year internally. Currently the only resource is xPfxImport which is used to import a certificate and/or key to the cert store from a PFX file. It makes use of DSC's ability to encrypt credentials to keep the PFX extraction password safe.

I use this to distribute commercial SSL certificates to web servers (the existing IIS resources can be used to set the bindings after that).

Remove Default x and MSFT_ from Unit/Integration Test templates

The Unit/Integration test templates are all configured to default to MSFT as the organization(?) code of the resource being tested (see https://github.com/PowerShell/DscResources/blob/master/Tests.Template/integration_config_template.ps1#L14).

They also default the module code to 'x' as well (see https://github.com/PowerShell/DscResources/blob/master/Tests.Template/integration_template.ps1#L16).

I think to make them more generic and usable for non-MSFT resources these codes should be removed from the defaults of these files.

The examples however should be left showing MSFT_ and x where appropriate (see https://github.com/PowerShell/DscResources/blob/master/Tests.Template/integration_template.ps1#L17).

Not all of the Modules that contain DSC Resources have a DSC Tag

Some of the modules that contain DSC resources do not have a DSC tag applied to them as can be found out using the below

find-module x* | Select-object Name,Author,Tags | Where-Object {($_.Tags -notcontains 'DSC') -and ($_.Name -notlike 'xb*') }

The $_.Name -notlike 'xb*' is to not find 2 Xbox related modules

Challenge with DSC resource

Not quite a bug but...

I've recently started improving the xHyper-V resource, but have been stumbling upon some interesting questions and challenges around DSC as a whole, challenges I know for a fact will affect other resources too, but am not quite sure whether this is something that Microsoft has already considered and/or has an answer for...

You can read more about it below, would appreciate some direction as I'm really keen to develop some resources, but want to make sure they're done properly and don't feel I can do that at the moment.

http://powershell.org/wp/forums/topic/creating-desired-state-configuration-resource-interesting-challenges/#post-24459

Regards,
Fausto

Appveyor.yml should use deploy_script instead of before_deploy

As @PlagueHO noted

Forgive me if I'm missing something: but has anyone noticed that Before_Deploy 
is no longer firing for any of the most recent DSC Module builds on AppVeyor? 
This looks to have started sometime in the last month. 
It results in Artifacts not being produced against the build (see https://ci.appveyor.com/project/PowerShell/xnetworking/branch/master).
Ok, after digging around in http://help.appveyor.com/ I found a similar issue (After_Deploy not firing) (http://help.appveyor.com/discussions/problems/3657-after-deployment-cmd-doesnt-run-at-all). 
What I get from this is that Before_Deploy shouldn't fire unless there is a Deploy_Script, but AppVeyor had a bug that allowed it to.
 They fixed this bug (appveyor/ci#494). 
All the DSC Resource AppVeyor.yml scripts took advantage of this bug. Solution: All AppVeyor.yml scripts should have Before_Deploy: changed to Deploy_Script:

We need to update appveyor.yml in all repos to use deploy_script instead of before_deploy

DSC Resource for managing W2K12+ File Server Resource Manager (FSRM)

I have created a DSC Resource Module for managing Windows Server 2012+ File Server Resource Manager (FSRM): https://github.com/PlagueHO/cFSRM

It contains MOF based resources for the following:

  • cFSRMSettings configures FSRM settings.
  • cFSRMClassification configures FSRM Classification settings.
  • cFSRMClassificationProperty configures FSRM Classification Property Definitions.
  • cFSRMClassificationPropertyValue configures FSRM Classification Property Definition Values. This resource only needs to be used if the Description of a Classification Property Definition Value must be set.
  • cFSRMClassificationRule configures FSRM Classification Rules.
  • cFSRMFileScreen configures FSRM File Screen.
  • cFSRMFileScreenAction configures FSRM File Screen Actions for File Screens.
  • cFSRMFileScreenTemplate configures FSRM File Screen Templates.
  • cFSRMFileScreenTemplateAction configures FSRM File Screen Template Actions for File Screen Templates.
  • cFSRMFileScreenExclusion configures FSRM File Screen Exclusions.
  • cFSRMFileGroup configures FSRM File Groups.
  • cFSRMQuota configures FSRM Quotas.
  • cFSRMQuotaAction configures FSRM Quota Actions for Quotas.
  • cFSRMQuotaTemplate configures FSRM Quota Templates.
  • cFSRMQuotaTemplateAction configures FSRM Quota Template Actions for Quota Templates.
  • cFSRMAutoQuota configures FSRM Auto Quotas.

It contains Unit and Integration tests for all resources, using the DSCResource.Test\TestHelper.psm1 functions.

Note about tests: Tests require Windows Server 2012 (or above) to pass because required File Server Resource Manager feature to be installed. Tests pass on AppVeyor because AppVeyor.yml is configured to ensure the FSRM feature is installed before invoking pester.

The module doesn't have resources for managing File Tasks and File Reports, but I do plan on getting to those at some point when I have more time.

Would there be interest in moving this module over to the community module library here?

If so, I'd need to convert the resources over from BMD_ to MSFT_ and other updates to the .PSD1,AppVeyor.yml etc before transferring the repo.

Thanks!

Missing DSC Module xOU

Hi all,
hope that's the right way for contributing my question.
Just wondering why the Module xOu from PowershellGallery.com is missing here?
Is there any reason for, which I haven't found yet?
I'm trying to configure my OUs and I thought I could do that with the xADOrganizationalUnit Resource.
Or is there an other way to configure Active Directory OUs?

Link to CLA in contribution guidelines

In the contribution guidelines, it states 'If this is your first contribution to DscResources, you may be asked to sign a Contribution Licensing Agreement (CLA) before your changes will be accepted.'. However, there is no mention of where to obtain the CLA. This would be helpful so organizations could review this before beginning to create pull requests.

DSC Resource for ngen.exe /executeQueuedItems

After installing a new version of .NET, the .NET Framework Optimization Service (mscorsvw.exe) kicks in and will start to generate native images of the .NET assemblies available on the PC. It does so in a background service. See [http://blogs.msdn.com/b/dotnet/archive/2013/08/06/wondering-why-mscorsvw-exe-has-high-cpu-usage-you-can-speed-it-up.aspx] for some more information.

When automating the deployment of .NET as part of a DSC Configuration, you may want to force the generation of native images. You do so by running ngen.exe /executeQueuedItems for each version of ngen installed on your PC (one per .NET version)

I've generated a DSC Resource that allows you to trigger the the ngen command, and would like to contribute it as a general DSC Resource.

You can find the current version at [https://github.com/quamotion/powershell-dsc/tree/master/vso-agent/NGen].

I would like to understand whether the PowerShell is interested in such a module. If yes, I'd be happy to go through the work to adapt the current module according to the PowerShell coding guidelines.

DSC Resource for managing W2K12+ Distributed File System (DFS) Namespaces and Replication

I have created a DSC Resource Module for managing Distributed File System (DFS) Namespaces and Replication on Windows Server 2012+: https://github.com/PlagueHO/cDFS

It contains MOF based resources for the following:

  • cDFSRepGroup - This resource is used to create, edit or remove DFS Replication Groups. If used to create a Replcation Group it should be combined with the cDFSRepGroupMembership resources.
  • cDFSRepGroupConnection - This resource is used to create, edit and remove DFS Replication Group connections. This resource should ONLY be used if the Topology parameter in the Resource Group is set to Manual.
  • cDFSRepGroupFolder - This resource is used to configure DFS Replication Group folders. This is an optional resource, and only needs to be used if the folder Description, FilenameToExclude or DirectoryNameToExclude fields need to be set. In most cases just setting the Folders property in the cDFSRepGroup resource will be acceptable.
  • cDFSRepGroupMembership - This resource is used to configure Replication Group Folder Membership. It is usually used to set the ContentPath for each Replication Group folder on each Member computer. It can also be used to set additional properties of the Membership. This resource shouldn't be used for folders where the Content Path is set in the cDFSRepGroup.
  • cDFSNamespaceRoot - This resource is used to create, edit or remove standalone or domain based DFS namespaces. When the server is the last server in the namespace, the namespace itself will be removed.
  • cDFSNamespaceFolder - This resource is used to create, edit or remove folders from DFS namespaces. When a target is the last target in a namespace folder, the namespace folder itself will be removed.
  • cDFSNameSpace - This resource is now deprecated. Use cDFSNamespaceRoot and cDFSNamespaceFolder instead. It will be removed from future versions.

It contains Unit and Integration tests for all resources, using the DSCResource.Test\TestHelper.psm1 functions. However, the integration tests for the DFS Replication require an Active Director domain and at least two servers with DFS installed.

Note about tests: Tests require Windows Server 2012 (or above) to pass because required DFS Namespace and DFS Replication features to be installed. Tests pass on AppVeyor because AppVeyor.yml is configured to ensure the required features are installed.

Would there be interest in moving this module over to the community module library here?

If so, I'd need to convert the resources over from BMD_ to MSFT_ and other updates to the .PSD1,AppVeyor.yml etc before transferring the repo.

Thanks!

Missing System Center Components

Hello,

My organization is working on PS DSC configurations over at @d9micromgmt i'd like to know if there are existing code bases for the missing system center dsc resources, such as config manager?

New resource module: xPrivacySettings

What system will your DSC resources be managing?

Windows 10 privacy settings (Start > Settings > Privacy)

Will your module include MOF-based resources (compatible with PS/WMF 4.0 and 5.0+) or class-based resources (only compatible with PS/WMF 5.0+)

class-based resources

Please let me know if I can go ahead with creating the resource module :-)

New resource module : SecurityPolicyDsc

What system will your DSC resource be managing?
Windows Local Security Policy

xSecedit is a wrapper around secedit.exe

  • xUserRightsAssignment to manage User Rights Assignment.

Add Unit and Integration Tests Templates

A set of Unit and Integration Test template files have been developed and are available as part of the xNetworking resource (https://github.com/PlagueHO/xNetworking/tree/dev/Templates). I'm just waiting on this PR for these changes to be moved into the upstream PowerShell repo.

These test templates use the *-TestEnvironment functions in DSCResource.Tests. They also automatically download or update DSCRsource.Tests using Git.exe to the root of the DSC resource being tested.

Ideally these Test templates could be added to this repo so that they are available to all DSC resources. The documentation would also need to be updated to instruct on the use of these Test Templates.

This change was initially discussed here.

Also, this change should also incorporate adding a .gitignore file to the DSCResource.Template folder containing DSCResources.Tests to ensure that the DSCResources.Tests folder is never accidentally added to a DSC Resource.

I've actually made the changes above to my fork of this repo and will submit a PR for this if this is agreeable?

Cheers!

Drop c/x nomenclature

A couple of days ago @smurawski made a blog post about dropping the c nomenclature from the resources. I think this is a great idea and think we should drop x as well. All my arguements boil down to, "why do we really need it?" It's on GitHub now, everyone can contriubte, and IMO we should be trying to push more stuff into these repros/projects and an forks that occur can be easily traceable through GitHub.

Thoughts?

HEAD for modules should always point to module's 'master' branch

Trond Hindenes (Tue, Jun 23 2015 3:14 PM)

"Just a note regarding submodules in git: Remember that the parent repo points to a certain commit in the submodule. This means that whenever a submodule is updated, the parent repo must be updated with the updated commit id in order to reflect the HEAD of the submodule branch. For example, looking at the master branch of the xActiveDirectory resource, the parent repo points to a commit in there that's a couple of months old. If someone simply clones the parent repo with included submodules they'll be looking at fairly out-of-date code.

(it's pretty easy to script auto-updating the parent repo using git and powershell :-) )"

Enable Integration_tests.ps1 template to allow credentials to be used in Integration_config_tests.ps1

Currently the integration tests template (Integration_tests.ps1) will not support credentials to be used in the integration test config file (integration_config_tests.ps1) because they would need to be encrypted (or allowed to be stored unencrypted).

Although most integration tests do not require the use of credentials (specifically the PSDSCRunAsCredential parameter) there are some that do (e.g. resources that will need to connect to an AD domain). This of course isn't applicable to any Integration tests that should be run in AppVeyor, however I do create many integration tests that can be run manually on a local users machine or non-cloud CI that do require credentials to be configured.

To support this I would propose that the Integration test template be changed so that a -ConfigurationData parameter is always passed to the Integration_test_config.ps1 when it is compiled.

E.g. Change
https://github.com/PowerShell/DscResources/blob/master/Tests.Template/integration_template.ps1#L51

Should be changed to:

                $ConfigData = @{
                    AllNodes = @(
                        @{
                            NodeName = 'localhost'
                            PSDscAllowPlainTextPassword = $true
                        }
                    )
                }
                Invoke-Expression -Command "$($Global:DSCResourceName)_Config -OutputPath `$TestEnvironment.WorkingFolder -ConfigurationData `$ConfigData"

The above code would allow unencrypted credentials to be used.

It would probably be possible to automatically create a self-signed certificate on the test machine of course and use that to encrypt the credentials as well - is it worth looking at automating credential encryption in the integration tests instead?

Does anyone have any thoughts on doing this?

Thanks!

We should add guidance on how to properly throw and test throws in resources.

Here is an example @tysonjhayes gave in a review

Instead of calling a throw here, can you use the following construct to throw the exception?
https://github.com/PowerShell/xNetworking/blob/dev/DSCResources/MSFT_xFirewall/MSFT_xFirewall.psm1#L708

I know this is a bit longer winded, but it creates a custom exception object that we can actually test for in unit tests.

So you'd end up with this:

        $errorId = 'TeamCreateError'
        $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidOperation
        $errorMessage = $localizedData.failedToCreateTeam
        $exception = New-Object -TypeName System.InvalidOperationException `
            -ArgumentList $errorMessage
        $errorRecord = New-Object -TypeName System.Management.Automation.ErrorRecord `
            -ArgumentList $exception, $errorId, $errorCategory, $null
        $PSCmdlet.ThrowTerminatingError($errorRecord)

Test Example:

            Context 'testing with firewall that somehow occurs more than once' {
                Mock Get-NetFirewallRule -MockWith { $FirewallRules }

                $errorId = 'RuleNotUnique'
                $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidOperation
                $errorMessage = $($LocalizedData.RuleNotUniqueError) -f 2,$FirewallRule.Name
                $exception = New-Object -TypeName System.InvalidOperationException `
                    -ArgumentList $errorMessage
                $errorRecord = New-Object -TypeName System.Management.Automation.ErrorRecord `
                    -ArgumentList $exception, $errorId, $errorCategory, $null

                It "should throw RuleNotUnique exception on firewall rule $($FirewallRule.Name)" {
                    { $Result = Get-FirewallRule -Name $FirewallRule.Name } | Should Throw $errorRecord
                }
            }

DSC Resource for managing W2K12+ WS-Management HTTP/HTTPS Listeners

I have created a DSC Resource Module for managing HTTP and HTTPS WS-Management Listeners on Windows Server 2012+:

https://github.com/PlagueHO/cWSMan

It contains MOF based resources for the following:

cWSManListener - creates/removes HTTP or HTTPS WS-Management Listeners.

It contains Unit and Integration tests for all resources, using the DSCResource.Test\TestHelper.psm1 functions.

Would there be interest in moving this module over to the community module library here?

If so, I'd need to convert the resources over from BMD_ to MSFT_ and other updates to the .PSD1,AppVeyor.yml etc before transferring the repo. Just let me know and I'll make the applicable changes and then report and it the repo can be reviewed before transfer over.

Thanks!

AD DS and AD WS won't start

Using the 2.2 extension, the AD will not start the service. This results in failure when querying or adding another machine to the domain.

adds

Request to submit cMicrosoftUpdate

https://github.com/J0F3/cMicrosoftUpdate

cMicrosoftUpdate is a DSC Module and contains the contains the cMicrosoftUpdate resource. This resource can be used to enable/disable Microsoft Update in the Windows Update Settings. ("Give me update for other Microsoft products when I update Windows" checkbox)

MOF-based resources (compatible with PS/WMF 4.0 and 5.0+)

Thx
J0F3

DSC Resource for managing W2K12+ iSCSI VHDs/Targets and Initiators

have created a DSC Resource Module for managing iSCSI Virtual Disks and iSCSI Targets on Windows Server 2012+ as well as connecting iSCSI Initiators to iSCSI Targets on Windows Server 2012+: https://github.com/PlagueHO/ciSCSI

It contains MOF based resources for the following:

  • ciSCSIVirtualDisk - creates/removes iSCSI Virtual Hard disks.
  • ciSCSITarget - creates/removed iSCSI Targets using iSCSI Virtual Hard Disks.
  • ciSCSIInitiator - configured iSCSI Target Portals and manages connections/sessions to iSCSI Targets.

It contains Unit and Integration tests for all resources, using the DSCResource.Test\TestHelper.psm1 functions. However, the integration tests for iSCSI Initiators are currently disabled because although the documentation for MS iSCSI Initiators states that Loopback connections are supported, the documentation doesn't show how and I couldn't get it to work. Loopback is required for Integration tests. I have left the Integration test code there in case someone can find the documentation for iSCSI Loopback and get it working.

Note about tests: Tests require Windows Server 2012 (or above) to pass because required iSCSI Server feature to be installed. Tests pass on AppVeyor because AppVeyor.yml is configured to ensure the iSCSI Server is installed and the iSCSI Initiator service is started before invoking pester.

Would there be interest in moving this module over to the community module library here?

If so, I'd need to convert the resources over from BMD_ to MSFT_ and other updates to the .PSD1,AppVeyor.yml etc before transferring the repo.

Thanks!

Unable to install Exchange Server using DscResource

On a box that has all prerequisites and work-around installed and ready for installing Exchange Server, I was able to install Exchange Server 2013 using the below command line:
C:\exchange\setup.exe /mode:Install /role:Mailbox,ClientAccess /Iacceptexchangeserverlicenseterms /OrganizationName:PuppetLabs

However, I was unable to install Exchange Server 2013 using invoke-dscresource commands as below:

PS C:\exchange>
PS C:\exchange> $password = ConvertTo-SecureString ‘P@ssw0rd!’ -AsPlainText -Force

PS C:\exchange> $credentials = New-Object System.Management.Automation.PSCredential(‘Administrator’, $password)

PS C:\exchange> invoke-dscresource -Name xExchInstall -Method Set -ModuleName xExchange -Verbose -Property @{path=‘C:\exchange\setup.exe';arguments='/mode:Install /role:Mailbox,ClientAccess/Iacceptexchangeserverlicenseterms /OrganizationName:Puppetlabs’;credential=$credentials}

The output below does not have any error, but Exchange Server is NOT installed as expected.

Output:

VERBOSE: Performing the operation "Invoke-CimMethod: ResourceSet" on target "MSFT_DSCLocalConfigurationManager".
VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = ResourceSet,'className' =
MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'.
VERBOSE: An LCM method call arrived from computer OSKOULRAASJMYW8 with user sid
S-1-5-21-392757445-931416346-404708973-500.
VERBOSE: [OSKOULRAASJMYW8]: LCM:  [ Start  Set      ]  [[xExchInstall]DirectResourceAccess]
VERBOSE: [OSKOULRAASJMYW8]:                            [[xExchInstall]DirectResourceAccess] Entering function
'Set-TargetResource'. Notable parameters: Arguments = '/mode:Install /role:Mailbox,ClientAccess
/Iacceptexchangeserverlicenseterms /OrganizationName:Puppetlabs', Path = 'C:\exchange\setup.exe'
VERBOSE: [OSKOULRAASJMYW8]:                            [[xExchInstall]DirectResourceAccess] Initiating Exchange Setup.
Command: C:\exchange\setup.exe /mode:Install /role:Mailbox,ClientAccess /Iacceptexchangeserverlicenseterms
/OrganizationName:Puppetlabs
VERBOSE: [OSKOULRAASJMYW8]:                            [[xExchInstall]DirectResourceAccess] Created Scheduled Task with
 name: Install Exchange 96edadcd-83a0-434d-8f89-75d3b75d93f1
VERBOSE: [OSKOULRAASJMYW8]:                            [[xExchInstall]DirectResourceAccess] Task Action:
C:\exchange\setup.exe /mode:Install /role:Mailbox,ClientAccess /Iacceptexchangeserverlicenseterms
/OrganizationName:Puppetlabs
VERBOSE: [OSKOULRAASJMYW8]:                            [[xExchInstall]DirectResourceAccess] Starting task at:
10/07/2015 15:57:15
VERBOSE: [OSKOULRAASJMYW8]:                            [[xExchInstall]DirectResourceAccess] Waiting up to 60 seconds
before exiting to give time for ExSetup.exe to start
VERBOSE: [OSKOULRAASJMYW8]:                            [[xExchInstall]DirectResourceAccess] Detected that ExSetup.exe
is running
VERBOSE: [OSKOULRAASJMYW8]:                            [[xExchInstall]DirectResourceAccess] Setup is still running at
10/07/2015 15:57:24. Sleeping for 1 minute.
VERBOSE: [OSKOULRAASJMYW8]:                            [[xExchInstall]DirectResourceAccess] Setup is still running at
10/07/2015 15:58:24. Sleeping for 1 minute.
VERBOSE: [OSKOULRAASJMYW8]: LCM:  [ End    Set      ]  [[xExchInstall]DirectResourceAccess]  in 139.5630 seconds.
VERBOSE: [OSKOULRAASJMYW8]: LCM:  [ End    Set      ]    in  141.8910 seconds.
VERBOSE: Operation 'Invoke CimMethod' complete.

RebootRequired
--------------
False

PS C:\exchange>

Note that ExSetup.exe was running:

PS C:\Users\Administrator> get-process | where {$_.Name -like 'ExSetup*'}

Handles  NPM(K)    PM(K)      WS(K) VM(M)   CPU(s)     Id ProcessName
-------  ------    -----      ----- -----   ------     -- -----------
    356      96    79860      87552   731     8.19   4936 ExSetup

Suggestion: Guidelines on contributing tests

Hi all!

Wondering if it would be possible to provide some guidelines around contributing tests for the DSC Resources. You probably have a better idea of what would go in this, but a few example questions that might be helpful to answer:

  • Do you want integration tests? (e.g. the AppVeyor VM is configured with the resource and the desired state verified via Pester)
  • If you want integration tests, I'm assuming you might want a separate file and naming convention?
  • How do you want the tests themselves organized in general (e.g. describe/context/it)?

An initial complete test suite for a single repository might go a long way.

Cheers!

Request to transfer xDefender

I would like to transfer a new repo for managing Windows Defender to the PowerShell org. This module is based on the PowerShell module 'Defender' and gets/sets preferences via the *-MPPreference commands.

The module has complete documentation and passes the tests included in the DSCResources.Tests repo.

https://github.com/mgreenegit/xDefender

Please confirm or suggest changes. Thank you.

Request to expand DSC Log Resource to allow ship logs

The DSC Log Resource is a powerful tool in providing rich feedback from within the configuration process. However, this may not scale very well since the logs could potentially be spread across multiple DSC Servers or even LCM. I am familiar with gathering logs from Windows Event Log using NXLOG however we would have to install and configure such a tool using DSC before it would be of any use...

If you can support hooking into this log pipeline and direct this data elsewhere that would be great, but it is not clear in the documentation. Perhaps there is a way to leverage the 'DependsOn' property to pass configuration to Log Resource. Here is a fake example:

Log LogglyExample
{
    Message = "This message will be piped out to a configurable Loggly Resource for processing."
    DependsOn = "[ResourceType]myLoggly" 
} 

The end goal would be to send DSC logs from the LCM's and Push/Pull servers into a centralized log aggregation system like ELK Stack or Loggly which can easily consume logs in JSON format and have powerful dashboarding tools.

That just might save us all a little time...
Powershell DSC Logging
image from an article

New resource module: AuditPolicyDsc

What system will your DSC resources be managing?

Windows Advanced Audit Policy
  • xAuditOption to manage audit policy options
  • xAuditCategory to manage Subcategory 'Success' and 'Failure' flags
  • xAuditGlobalAccess to manage Registry and File system GlobalSACLs

Will your module include MOF-based resources or class-based resources

MOF-based resources

Changing Style Guide to specify Verb-Noun for funcitons

I'm finding loads of modules do not conform to the verb-noun standard of PowerShell. I would like to add to the style guide that we expect to conform to the PowerShell standard of verb-noun even for private functions.

Obviously this is purely a stylicstic thing so I'll be quite if no one wants to take this. 😆

Differing Authors for Resources - No Enforced Standard

Although I see the benefit for accrediting the original Author of DSC resources, if these are maintained by Microsoft then shouldn't Microsoft be the Author of the modules?

When you run the below you can see that there are resources that are Authored differently to 'Microsoft Corporation'

find-module x* -Tag DSC | Select-object Name,Author | Group-Object -Property Author 

This makes Discoverability for all these resources more difficult than it should be especially when you only want to download the x modules that are endorsed and developed by Microsoft

Many problems with style guide.

  1. Windows doesn't care about newlines. Only notepad.exe does. PowerShell doesn't care about CR+LF vs CR.
  2. Line length is too hard to do in ISE PoshCode/PowerShellPracticeAndStyle#30
  3. Variable name case rules are relics from languages that have *both case-sensitive and un-prefixed variables, where you can't tell a variable from a property in codes. In PowerShell you can tell a variable from a property because it has a $ in front of it -- there's no real reason why anyone should care about variables being camelCase while functions are PascalCase.

Oh, and I don't like your brace guidelines :-p and neither do most PowerShell power users 😛 PoshCode/PowerShellPracticeAndStyle#24

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.