GithubHelp home page GithubHelp logo

psdscresources's Introduction

PSDscResources

PSDscResources is the new home of the in-box resources from PSDesiredStateConfiguration. The resources in this module are maintained and supported by Microsoft.

These resources are a combination of those in the in-box PSDesiredStateConfiguration module as well as community contributions from our experimental xPSDesiredStateConfiguration module on GitHub. These resources have also recently been updated to meet the DSC Resource Kit High Quality Resource Module (HQRM) guidelines.

In-box resources not currently included in this module should not be affected and can still load from the in-box PSDesiredStateConfiguration module.

Because PSDscResources overwrites in-box resources, it is only available for WMF 5.1. Many of the resource updates provided here are also included in the xPSDesiredStateConfiguration module which is still compatible with WMF 4 and WMF 5 (though this module is not supported and may be removed in the future).

To update your in-box resources to the newest versions provided by PSDscResources, first install PSDscResources from the PowerShell Gallery:

Install-Module PSDscResources

Then, simply add this line to your DSC configuration:

Import-DscResource -ModuleName PSDscResources

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.

Branches

master

Build status codecov

This is the branch containing the latest release - no contributions should be made directly to this branch.

dev

Build status codecov

This is the development branch to which contributions should be proposed by contributors as pull requests. This development branch will periodically be merged to the master branch, and be released to PowerShell Gallery.

Contributing

This module does not accept breaking changes.

Please check out the common DSC Resources contributing guidelines.

Change log

A full list of changes in each version can be found in the change log.

Resources

  • Archive: Provides a mechanism to expand an archive (.zip) file to a specific path or remove an expanded archive (.zip) file from a specific path on a target node.
  • Environment: Provides a mechanism to configure and manage environment variables for a machine or process.
  • Group: Provides a mechanism to manage local groups on a target node.
  • GroupSet: Provides a mechanism to configure and manage multiple Group resources with common settings but different names.
  • MsiPackage: Provides a mechanism to install and uninstall MSI packages.
  • Registry: Provides a mechanism to manage registry keys and values on a target node.
  • Script: Provides a mechanism to run PowerShell script blocks on a target node.
  • Service: Provides a mechanism to configure and manage Windows services on a target node.
  • ServiceSet: Provides a mechanism to configure and manage multiple Service resources with common settings but different names.
  • User: Provides a mechanism to manage local users on a target node.
  • WindowsFeature: Provides a mechanism to install or uninstall Windows roles or features on a target node.
  • WindowsFeatureSet: Provides a mechanism to configure and manage multiple WindowsFeature resources on a target node.
  • WindowsOptionalFeature: Provides a mechanism to enable or disable optional features on a target node.
  • WindowsOptionalFeatureSet: Provides a mechanism to configure and manage multiple WindowsOptionalFeature resources on a target node.
  • WindowsPackageCab: Provides a mechanism to install or uninstall a package from a Windows cabinet (cab) file on a target node.
  • WindowsProcess: Provides a mechanism to start and stop a Windows process.
  • ProcessSet: Provides a mechanism to configure and manage multiple WindowsProcess resources on a target node.

Resources that Work on Nano Server

Archive

Provides a mechanism to expand an archive (.zip) file to a specific path or remove an expanded archive (.zip) file from a specific path on a target node.

Requirements

  • The System.IO.Compression type assembly must be available on the machine.
  • The System.IO.Compression.FileSystem type assembly must be available on the machine.

Parameters

  • [String] Path (Key): The path to the archive file that should be expanded to or removed from the specified destination.
  • [String] Destination (Key): The path where the specified archive file should be expanded to or removed from.
  • [String] Ensure (Write): Specifies whether or not the expanded content of the archive file at the specified path should exist at the specified destination. To update the specified destination to have the expanded content of the archive file at the specified path, specify this property as Present. To remove the expanded content of the archive file at the specified path from the specified destination, specify this property as Absent. The default value is Present. { Present | Absent }.
  • [Boolean] Validate (Write): Specifies whether or not to validate that a file at the destination with the same name as a file in the archive actually matches that corresponding file in the archive by the specified checksum method. If the file does not match and Ensure is specified as Present and Force is not specified, the resource will throw an error that the file at the desintation cannot be overwritten. If the file does not match and Ensure is specified as Present and Force is specified, the file at the desintation will be overwritten. If the file does not match and Ensure is specified as Absent, the file at the desintation will not be removed. The default value is false.
  • [String] Checksum (Write): The Checksum method to use to validate whether or not a file at the destination with the same name as a file in the archive actually matches that corresponding file in the archive. An invalid argument exception will be thrown if Checksum is specified while Validate is specified as false. ModifiedDate will check that the LastWriteTime property of the file at the destination matches the LastWriteTime property of the file in the archive. CreatedDate will check that the CreationTime property of the file at the destination matches the CreationTime property of the file in the archive. SHA-1, SHA-256, and SHA-512 will check that the hash of the file at the destination by the specified SHA method matches the hash of the file in the archive by the specified SHA method. The default value is ModifiedDate. { ModifiedDate | CreatedDate | SHA-1 | SHA-256 | SHA-512 }
  • [System.Management.Automation.PSCredential] Credential (Write): The credential of a user account with permissions to access the specified archive path and destination if needed.
  • [Boolean] Force (Write): Specifies whether or not any existing files or directories at the destination with the same name as a file or directory in the archive should be overwritten to match the file or directory in the archive. When this property is false, an error will be thrown if an item at the destination needs to be overwritten. The default value is false.

Read-Only Properties from Get-TargetResource

None

Examples

Environment

Provides a mechanism to configure and manage environment variables for a machine or process.

Requirements

None

Parameters

  • [String] Name (Key): The name of the environment variable to create, modify, or remove.
  • [String] Value (Write): The desired value for the environment variable. The default value is an empty string which either indicates that the variable should be removed entirely or that the value does not matter when testing its existence.
  • [String] Ensure (Write): Specifies if the environment varaible should exist. { Present | Absent }.
  • [Boolean] Path (Write): Indicates whether or not the environment variable is a path variable. If the variable being configured is a path variable, the value provided will be appended to or removed from the existing value, otherwise the existing value will be replaced by the new value. The default value is False.
  • [String[]] Target (Write): Indicates the target where the environment variable should be set. { Process | Machine | Process, Machine }.

Read-Only Properties from Get-TargetResource

None

Examples

Group

Provides a mechanism to manage local groups on a target node. This resource works on Nano Server.

Requirements

None

Parameters

  • [String] GroupName (Key): The name of the group to create, modify, or remove.
  • [String] Ensure (Write): Indicates if the group should exist or not. To add a group or modify an existing group, set this property to Present. To remove a group, set this property to Absent. The default value is Present. { Present | Absent }.
  • [String] Description (Write): The description the group should have.
  • [String[]] Members (Write): The members the group should have. This property will replace all the current group members with the specified members. Members should be specified as strings in the format of their domain qualified name (domain\username), their UPN (username@domainname), their distinguished name (CN=username,DC=...), or their username (for local machine accounts). Using either the MembersToExclude or MembersToInclude properties in the same configuration as this property will generate an error.
  • [String[]] MembersToInclude (Write): The members the group should include. This property will only add members to a group. Members should be specified as strings in the format of their domain qualified name (domain\username), their UPN (username@domainname), their distinguished name (CN=username,DC=...), or their username (for local machine accounts). Using the Members property in the same configuration as this property will generate an error.
  • [String[]] MembersToExclude (Write): The members the group should exclude. This property will only remove members from a group. Members should be specified as strings in the format of their domain qualified name (domain\username), their UPN (username@domainname), their distinguished name (CN=username,DC=...), or their username (for local machine accounts). Using the Members property in the same configuration as this property will generate an error.
  • [System.Management.Automation.PSCredential] Credential (Write): A credential to resolve non-local group members.

Read-Only Properties from Get-TargetResource

None

Examples

GroupSet

Provides a mechanism to configure and manage multiple Group resources with common settings but different names

Requirements

None

Parameters

  • [String] GroupName (Key): The names of the groups to create, modify, or remove.

The following parameters will be the same for each group in the set:

  • [String] Ensure (Write): Indicates if the groups should exist or not. To add groups or modify existing groups, set this property to Present. To remove groups, set this property to Absent. { Present | Absent }.
  • [String[]] MembersToInclude (Write): The members the groups should include. This property will only add members to groups. Members should be specified as strings in the format of their domain qualified name (domain\username), their UPN (username@domainname), their distinguished name (CN=username,DC=...), or their username (for local machine accounts).
  • [String[]] MembersToExclude (Write): The members the groups should exclude. This property will only remove members groups. Members should be specified as strings in the format of their domain qualified name (domain\username), their UPN (username@domainname), their distinguished name (CN=username,DC=...), or their username (for local machine accounts).
  • [System.Management.Automation.PSCredential] Credential (Write): A credential to resolve non-local group members.

Read-Only Properties from Get-TargetResource

None

Examples

MsiPackage

Provides a mechanism to install and uninstall MSI packages.

Requirements

None

Parameters

  • [String] ProductId (Key): The identifying number used to find the package, usually a GUID.
  • [String] Path (Required): The path to the MSI file that should be installed or uninstalled.
  • [String] Ensure (Write): Specifies whether or not the MSI file should be installed or not. To install the MSI file, specify this property as Present. To uninstall the .msi file, specify this property as Absent. The default value is Present. { Present | Absent }.
  • [String] Arguments (Write): The arguments to be passed to the MSI package during installation or uninstallation if needed.
  • [System.Management.Automation.PSCredential] Credential (Write): The credential of a user account to be used to mount a UNC path if needed.
  • [String] LogPath (Write): The path to the log file to log the output from the MSI execution.
  • [String] FileHash (Write): The expected hash value of the MSI file at the given path.
  • [String] HashAlgorithm (Write): The algorithm used to generate the given hash value.
  • [String] SignerSubject (Write): The subject that should match the signer certificate of the digital signature of the MSI file.
  • [String] SignerThumbprint (Write): The certificate thumbprint that should match the signer certificate of the digital signature of the MSI file.
  • [String] ServerCertificateValidationCallback (Write): PowerShell code that should be used to validate SSL certificates for paths using HTTPS.
  • [System.Management.Automation.PSCredential] RunAsCredential (Write): The credential of a user account under which to run the installation or uninstallation of the MSI package.

Read-Only Properties from Get-TargetResource

  • [String] Name (Read): The display name of the MSI package.
  • [String] InstallSource (Read): The path to the MSI package.
  • [String] InstalledOn (Read): The date that the MSI package was installed on or serviced on, whichever is later.
  • [UInt32] Size (Read): The size of the MSI package in MB.
  • [String] Version (Read): The version number of the MSI package.
  • [String] PackageDescription (Read): The description of the MSI package.
  • [String] Publisher (Read): The publisher of the MSI package.

Examples

Registry

Provides a mechanism to manage registry keys and values on a target node.

Requirements

None

Parameters

  • [String] Key (Key): The path of the registry key to add, modify, or remove. This path must include the registry hive/drive (e.g. HKEY_LOCAL_MACHINE, HKLM:).
  • [String] ValueName (Key): The name of the registry value. To add or remove a registry key, specify this property as an empty string without specifying ValueType or ValueData. To modify or remove the default value of a registry key, specify this property as an empty string while also specifying ValueType or ValueData.
  • [String] Ensure (Write): Specifies whether or not the registry key or value should exist. To add or modify a registry key or value, set this property to Present. To remove a registry key or value, set this property to Absent. { Present | Absent }.
  • [String] ValueData (Write): The data the specified registry key value should have as a string or an array of strings (MultiString only).
  • [String] ValueType (Write): The type the specified registry key value should have. { String | Binary | DWord | QWord | MultiString | ExpandString }
  • [Boolean] Hex (Write): Specifies whether or not the specified DWord or QWord registry key data is provided in a hexadecimal format. Not valid for types other than DWord and QWord. The default value is $false.
  • [Boolean] Force (Write): Specifies whether or not to overwrite the specified registry key value if it already has a value or whether or not to delete a registry key that has subkeys. The default value is $false.

Read-Only Properties from Get-TargetResource

None

Examples

Script

Provides a mechanism to run PowerShell script blocks on a target node. This resource works on Nano Server.

Requirements

None

Parameters

  • [String] GetScript (Key): A string that can be used to create a PowerShell script block that retrieves the current state of the resource. This script block runs when the Get-DscConfiguration cmdlet is called. This script block should return a hash table containing one key named Result with a string value.
  • [String] SetScript (Key): A string that can be used to create a PowerShell script block that sets the resource to the desired state. This script block runs conditionally when the Start-DscConfiguration cmdlet is called. The TestScript script block will run first. If the TestScript block returns False, this script block will run. If the TestScript block returns True, this script block will not run. This script block should not return.
  • [String] TestScript (Key): A string that can be used to create a PowerShell script block that validates whether or not the resource is in the desired state. This script block runs when the Start-DscConfiguration cmdlet is called or when the Test-DscConfiguration cmdlet is called. This script block should return a boolean with True meaning that the resource is in the desired state and False meaning that the resource is not in the desired state.
  • [PSCredential] Credential (Write): The credential of the user account to run the script under if needed.

Read-Only Properties from Get-TargetResource

  • [String] Result (Read): The result from the GetScript script block.

Examples

Service

Provides a mechanism to configure and manage Windows services on a target node. This resource works on Nano Server.

Requirements

None

Parameters

  • [String] Name (Key): Indicates the service name. Note that sometimes this is different from the display name. You can get a list of the services and their current state with the Get-Service cmdlet.
  • [String] Ensure (Write): Indicates whether the service is present or absent. Defaults to Present. { Present | Absent }.
  • [String] Path (Write): The path to the service executable file.
  • [String] StartupType (Write): Indicates the startup type for the service. { Automatic | Disabled | Manual }.
  • [String] BuiltInAccount (Write): Indicates the sign-in account to use for the service. { LocalService | LocalSystem | NetworkService }.
  • [PSCredential] Credential (Write): The credential to run the service under.
  • [Boolean] DesktopInteract (Write): Indicates whether the service can create or communicate with a window on the desktop. Must be false for services not running as LocalSystem. Defaults to False.
  • [String] State (Write): Indicates the state you want to ensure for the service. Defaults to Running. { Running | Stopped | Ignore }.
  • [String] DisplayName (Write): The display name of the service.
  • [String] Description (Write): The description of the service.
  • [String[]] Dependencies (Write): An array of strings indicating the names of the dependencies of the service.
  • [Uint32] StartupTimeout (Write): The time to wait for the service to start in milliseconds. Defaults to 30000.
  • [Uint32] TerminateTimeout (Write): The time to wait for the service to stop in milliseconds. Defaults to 30000.

Read-Only Properties from Get-TargetResource

None

Examples

ServiceSet

Provides a mechanism to configure and manage multiple Service resources with common settings but different names. This resource can only modify or delete existing services. It cannot create services.

Requirements

None

Parameters

  • [String[]] Name (Key): The names of the services to modify or delete. This may be different from the service's display name. To retrieve a list of all services with their names and current states, use the Get-Service cmdlet.

The following parameters will be the same for each service in the set:

  • [String] Ensure (Write): Indicates whether the services are present or absent. { Present | Absent }.
  • [String] BuiltInAccount (Write): The built-in account the services should start under. Cannot be specified at the same time as Credential. The user account specified by this property must have access to the service executable paths in order to start the services. { LocalService | LocalSystem | NetworkService }.
  • [PSCredential] Credential (Write): The credential of the user account the services should start under. Cannot be specified at the same time as BuiltInAccount. The user specified by this credential will automatically be granted the Log on as a Service right. The user account specified by this property must have access to the service executable paths in order to start the services.
  • [String] StartupType (Write): The startup type of the services. { Automatic | Disabled | Manual }.
  • [String] State (Write): The state the services. { Running | Stopped | Ignore }.

Read-Only Properties from Get-TargetResource

None

Examples

User

Provides a mechanism to manage local users on a target node. This resource works on Nano Server.

Requirements

None

Parameters

  • [String] UserName (Key): Indicates the account name for which you want to ensure a specific state.
  • [String] Description (Write): Indicates the description you want to use for the user account.
  • [Boolean] Disabled (Write): Indicates if the account is disabled. Set this property to true to ensure that this account is disabled, and set it to false to ensure that it is enabled. The default value is false.
  • [String] Ensure (Write): Ensures that the feature is present or absent { Present | Absent }.
  • [String] FullName (Write): Represents a string with the full name you want to use for the user account.
  • [PSCredential] Password (Write): Indicates the password you want to use for this account.
  • [Boolean] PasswordChangeNotAllowed (Write): Indicates if the user can change the password. Set this property to true to ensure that the user cannot change the password, and set it to false to allow the user to change the password. The default value is false.
  • [Boolean] PasswordChangeRequired (Write): Indicates if the user must change the password at the next sign in. Set this property to true if the user must change their password. The default value is true.
  • [Boolean] PasswordNeverExpires (Write): Indicates if the password will expire. To ensure that the password for this account will never expire, set this property to true. The default value is false.

Read-Only Properties from Get-TargetResource

None

Examples

WindowsFeature

Provides a mechanism to install or uninstall Windows roles or features on a target node. This resource is not supported on Nano Server.

Requirements

  • Target machine must be running Windows Server 2008 or later.
  • Target machine must have access to the DISM PowerShell module.
  • Target machine must have access to the ServerManager module (provided by default on Windows Server).

Parameters

  • [String] Name (Key): Indicates the name of the role or feature that you want to ensure is added or removed. This is the same as the Name property from the Get-WindowsFeature cmdlet, and not the display name of the role or feature.
  • [PSCredential] Credential (Write): Indicates the credential to use to add or remove the role or feature if needed.
  • [String] Ensure (Write): Specifies whether the feature should be installed (Present) or uninstalled (Absent) { Present | Absent }.
  • [Boolean] IncludeAllSubFeature (Write): Specifies whether or not all subfeatures should be installed with the specified role or feature. The default value is false.
  • [String] LogPath (Write): Indicates the path to a log file to log the operation.

Read-Only Properties from Get-TargetResource

  • [String] DisplayName (Read): The display name of the retrieved role or feature.

Examples

WindowsFeatureSet

Provides a mechanism to configure and manage multiple WindowsFeature resources on a target node.

Requirements

  • Target machine must be running Windows Server 2008 or later.
  • Target machine must have access to the DISM PowerShell module.
  • Target machine must have access to the ServerManager module.

Parameters

  • [String] Name (Key): The names of the roles or features to install or uninstall. This may be different from the display name of the feature/role. To retrieve the names of features/roles on a machine use the Get-WindowsFeature cmdlet.
  • [String] Ensure (Write): Specifies whether the feature should be installed or uninstalled. To install features, set this property to Present. To uninstall features, set this property to Absent. { Present | Absent }.
  • [Boolean] IncludeAllSubFeature (Write): Specifies whether or not all subfeatures should be installed or uninstalled alongside the specified roles or features. If this property is true and Ensure is set to Present, all subfeatures will be installed. If this property is false and Ensure is set to Present, subfeatures will not be installed or uninstalled. If Ensure is set to Absent, all subfeatures will be uninstalled.
  • [PSCredential] Credential (Write): The credential of the user account under which to install or uninstall the roles or features.
  • [String] LogPath (Write): The custom file path to which to log this operation. If not passed in, the default log path will be used (%windir%\logs\ServerManager.log).

Read-Only Properties from Get-TargetResource

  • [String] DisplayName (Read): The display names of the retrieved roles or features.

Examples

WindowsOptionalFeature

Provides a mechanism to enable or disable optional features on a target node. This resource works on Nano Server.

Requirements

  • Target machine must be running a Windows client operating system, Windows Server 2012 or later, or Nano Server.
  • Target machine must have access to the DISM PowerShell module

Parameters

  • [String] Name (Key): The name of the Windows optional feature to enable or disable.
  • [String] Ensure (Write): Specifies whether the feature should be enabled or disabled. To enable the feature, set this property to Present. To disable the feature, set the property to Absent. The default value is Present. { Present | Absent }.
  • [Boolean] RemoveFilesOnDisable (Write): Specifies that all files associated with the feature should be removed if the feature is being disabled.
  • [Boolean] NoWindowsUpdateCheck (Write): Specifies whether or not DISM contacts Windows Update (WU) when searching for the source files to enable the feature. If $true, DISM will not contact WU.
  • [String] LogPath (Write): The path to the log file to log this operation. There is no default value, but if not set, the log will appear at %WINDIR%\Logs\Dism\dism.log.
  • [String] LogLevel (Write): The maximum output level to show in the log. ErrorsOnly will log only errors. ErrorsAndWarning will log only errors and warnings. ErrorsAndWarningAndInformation will log errors, warnings, and debug information). The default value is "ErrorsAndWarningAndInformation". { ErrorsOnly | ErrorsAndWarning | ErrorsAndWarningAndInformation }.

Read-Only Properties from Get-TargetResource

  • [String[]] CustomProperties (Read): The custom properties retrieved from the Windows optional feature as an array of strings.
  • [String] Description (Read): The description retrieved from the Windows optional feature.
  • [String] DisplayName (Read): The display name retrieved from the Windows optional feature.

Examples

WindowsOptionalFeatureSet

Provides a mechanism to configure and manage multiple WindowsOptionalFeature resources on a target node. This resource works on Nano Server.

Requirements

  • Target machine must be running a Windows client operating system, Windows Server 2012 or later, or Nano Server.
  • Target machine must have access to the DISM PowerShell module.

Parameters

  • [String[]] Name (Key): The names of the Windows optional features to enable or disable.

The following parameters will be the same for each Windows optional feature in the set:

  • [String] Ensure (Write): Specifies whether the Windows optional features should be enabled or disabled. To enable the features, set this property to Present. To disable the features, set this property to Absent. { Present | Absent }.
  • [Boolean] RemoveFilesOnDisable (Write): Specifies whether or not to remove the files associated with the Windows optional features when they are disabled.
  • [Boolean] NoWindowsUpdateCheck (Write): Specifies whether or not DISM should contact Windows Update (WU) when searching for the source files to restore Windows optional features on an online image.
  • [String] LogPath (Write): The file path to which to log the operation.
  • [String] LogLevel (Write): The level of detail to include in the log. { ErrorsOnly | ErrorsAndWarning | ErrorsAndWarningAndInformation }.

Read-Only Properties from Get-TargetResource

None

Examples

WindowsPackageCab

Provides a mechanism to install or uninstall a package from a Windows cabinet (cab) file on a target node. This resource works on Nano Server.

Requirements

  • Target machine must have access to the DISM PowerShell module

Parameters

  • [String] Name (Key): The name of the package to install or uninstall.
  • [String] Ensure (Required): Specifies whether the package should be installed or uninstalled. To install the package, set this property to Present. To uninstall the package, set the property to Absent. { Present | Absent }.
  • [String] SourcePath (Required): The path to the cab file to install or uninstall the package from.
  • [String] LogPath (Write): The path to a file to log the operation to. There is no default value, but if not set, the log will appear at %WINDIR%\Logs\Dism\dism.log.

Read-Only Properties from Get-TargetResource

None

Examples

WindowsProcess

Provides a mechanism to start and stop a Windows process.

Requirements

None

Parameters

  • [String] Path (Key): The executable file of the process. This can be defined as either the full path to the file or as the name of the file if it is accessible through the environment path. Relative paths are not supported.
  • [String] Arguments (Key): A single string containing all the arguments to pass to the process. Pass in an empty string if no arguments are needed.
  • [PSCredential] Credential (Write): The credential of the user account to run the process under. If this user is from the local system, the StandardOutputPath, StandardInputPath, and WorkingDirectory parameters cannot be provided at the same time.
  • [String] Ensure (Write): Specifies whether or not the process should be running. To start the process, specify this property as Present. To stop the process, specify this property as Absent. { Present | Absent }.
  • [String] StandardOutputPath (Write): The file path to which to write the standard output from the process. Any existing file at this file path will be overwritten. This property cannot be specified at the same time as Credential when running the process as a local user.
  • [String] StandardErrorPath (Write): The file path to which to write the standard error output from the process. Any existing file at this file path will be overwritten.
  • [String] StandardInputPath (Write): The file path from which to receive standard input for the process. This property cannot be specified at the same time as Credential when running the process as a local user.
  • [String] WorkingDirectory (Write): The file path to the working directory under which to run the file. This property cannot be specified at the same time as Credential when running the process as a local user.

Read-Only Properties from Get-TargetResource

  • [UInt64] PagedMemorySize (Read): The amount of paged memory, in bytes, allocated for the process.
  • [UInt64] NonPagedMemorySize (Read): The amount of nonpaged memory, in bytes, allocated for the process.
  • [UInt64] VirtualMemorySize (Read): The amount of virtual memory, in bytes, allocated for the process.
  • [SInt32] HandleCount (Read): The number of handles opened by the process.
  • [SInt32] ProcessId (Read): The unique identifier of the process.
  • [SInt32] ProcessCount (Read): The number of instances of the given process that are currently running.

Examples

ProcessSet

Provides a mechanism to configure and manage multiple WindowsProcess resources on a target node.

Requirements

None

Parameters

  • [String[]] Path (Key): The file paths to the executables of the processes to start or stop. Only the names of the files may be specified if they are all accessible through the environment path. Relative paths are not supported.

The following parameters will be the same for each process in the set:

  • [PSCredential] Credential (Write): The credential of the user account to run the processes under. If this user is from the local system, the StandardOutputPath, StandardInputPath, and WorkingDirectory parameters cannot be provided at the same time.
  • [String] Ensure (Write): Specifies whether or not the processes should be running. To start the processes, specify this property as Present. To stop the processes, specify this property as Absent. { Present | Absent }.
  • [String] StandardOutputPath (Write): The file path to which to write the standard output from the processes. Any existing file at this file path will be overwritten. This property cannot be specified at the same time as Credential when running the processes as a local user.
  • [String] StandardErrorPath (Write): The file path to which to write the standard error output from the processes. Any existing file at this file path will be overwritten.
  • [String] StandardInputPath (Write): The file path from which to receive standard input for the processes. This property cannot be specified at the same time as Credential when running the processes as a local user.
  • [String] WorkingDirectory (Write): The file path to the working directory under which to run the process. This property cannot be specified at the same time as Credential when running the processes as a local user.

Read-Only Properties from Get-TargetResource

  • [UInt64] PagedMemorySize (Read): The amount of paged memory, in bytes, allocated for the processes.
  • [UInt64] NonPagedMemorySize (Read): The amount of nonpaged memory, in bytes, allocated for the processes.
  • [UInt64] VirtualMemorySize (Read): The amount of virtual memory, in bytes, allocated for the processes.
  • [SInt32] HandleCount (Read): The number of handles opened by the processes.
  • [SInt32] ProcessId (Read): The unique identifier of the processes.
  • [SInt32] ProcessCount (Read): The number of instances of the given processes that are currently running.

Examples

psdscresources's People

Contributors

andreassobczyk avatar avkaur avatar corydwood avatar duracellko avatar johlju avatar kevinobee avatar kwirkykat avatar mbreakey3 avatar mgreenegit avatar mhendric avatar nanalakshmanan avatar narrieta avatar plagueho avatar timhaintz avatar travisez13 avatar x-guardian 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

psdscresources's Issues

File times are not restored correctly on a German system

I currently use this resource to extract archives on a german system. Files with dates october to december are extracted but throw an exception while updating the timestamp, the others are tagged with timestamps where month and day are switched.

This is a problem with regional settings / time conversion [lines 1300++]

Get-ArchiveEntryLastWriteTime returns a regional string, while Set-ItemProperty seems to require an input in en-US format, at least a small local repro suggests this.


`Add-Type -AssemblyName 'System.IO.Compression';
Add-Type -AssemblyName 'System.IO.Compression.FileSystem';

$Path = ".\test.zip"
$newFile = ".\somefile.txt ";

$archive = [System.IO.Compression.ZipFile]::OpenRead($Path);

$archive.Entries[10]

$newDate = (Get-Date -Date $archive.Entries[10].LastWriteTime.DateTime -Format "G");
Set-ItemProperty -LiteralPath $newFile -Name "LastWriteTime" -Value $newDate; # <-- this line throws an exception on a german system

$newDate = (Get-Date -Date $archive.Entries[10].LastWriteTime.DateTime -Format "s");
Set-ItemProperty -LiteralPath $newFile -Name "LastWriteTime" -Value $newDate; # <-- this line works fine`

Might it be a solution to this problem, to switch the date formatting string 'G' (which is a regional string) to 's'?

Windows 10 Creators Update: Resource name 'Archive' is already being used by another Resource or Configuration

Tried to import the PSDscResources module as described here but I keep getting this both on my local Windows 10 Creators Update machine and in a Windows 10 Creators Update based Azure VM that uses the Azure DSC Extension:

  • Import-DscResource -ModuleName PSDscResources
    

2017-05-03T20:29:55.0542055Z VERBOSE: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2017-05-03T20:29:55.0542055Z VERBOSE: Resource name 'Archive' is already being used by another Resource or Configuration..
2017-05-03T20:29:55.0542055Z VERBOSE: Please correct the input and retry executing the extension.".

Are there any known issues with DSC and Windows 10 Creators Update?

Group: Allow compounding of 'MembersToInclude'

I'm not sure 'compounding' is the proper word, but this is the challenge I'm facing with the Group resource:

for all computers I would like to check for accounts A + B are in the local Administrators
on a specific computer, I would to check Account C is part of local Administrators

It seems I can't declare Group multiple times for one computer. To workaround, I build a Script for the additional account.

I think newer DSC modules have a 'Name' attribute, so it allows multiple Group declarations on the same Group.

Windows 10 Creators Update: Importing module MSFT_GroupResource failed with error - Method invocation failed because [System.Collections.Hashtable] does not contain a method named 'Replace'

Tried to run my DSC configuration on a Windows 10 Creators Update Azure VM and got this error:

"DSC Configuration completed with error(s). Following are the first few: Importing module MSFT_GroupResource failed with error - Method invocation failed because [System.Collections.Hashtable] does not contain a method named 'Replace'.

This is using the built in desired state configuration module via the Azure DSC Extension version 2.24. The specific resource that causes the problem is this:

    Group AddTestUserToLocalAdminGroup
    {
        DependsOn = "[User]AddTestUser"
        GroupName='Administrators'   
        Ensure= 'Present'             
        MembersToInclude= "SomeUsername"
    }  

Are there any issues with the DSC Resources on Windows 10 Creators Update?

Warning when using File resource from PSDesiredStateConfiguration

Would it be possible to include the File resource in PSDscResources, even if nothing has changed from PSDesiredStateConfiguration?

Otherwise, you get a bunch of conflict warnings when you try to Import-Module PSDscResources and Import-Module PSDesiredStateConfiguration into the same config.

Cannot manage registry key with forward slash

I'm working on PowerShell DSC module to manage FogBugz application. Their registry keys contains forward slashes. This cannot be managed by DSC right now.

Sample registry key used by FogBugz web app
screenshot_060817_100444_pm

Sample configuration:

  Registry FogBugzRegistry_fDebug
  {
      Key         = "HKEY_LOCAL_MACHINE\SOFTWARE\Fog Creek Software\FogBugz\C:/Program Files (x86)/FogBugz/website"
      ValueName   = "fDebug"
      ValueData   = "0"
      Ensure      = "Present"
  }

The error message when applying DSC:

PowerShell DSC resource MSFT_RegistryResource  failed to execute Test-TargetResource functionality with error message: (ERROR) Invalid PSDrive 'HKEY_LOCAL_MACHINE\SOFTWARE\Fog
Creek Software\FogBugz\C' specified in registry key 'HKEY_LOCAL_MACHINE\SOFTWARE\Fog Creek Software\FogBugz\C:/Program Files (x86)/FogBugz/website'
    + CategoryInfo          : InvalidOperation: (:) [], CimException
    + FullyQualifiedErrorId : ProviderOperationExecutionFailure
    + PSComputerName        : localhost

Expected behavior: I should be able to manage any valid registry key value by DSC.

Reference: https://msdn.microsoft.com/en-us/library/ms724946(VS.85).aspx

Each key has a name consisting of one or more printable characters. Key names are not case sensitive. Key names cannot include the backslash character (), but any other printable character can be used. Value names and data can include the backslash character.

One-two of the Process tests fail intermittently due to log file issues

There seems to be a timing issue with log file creation in the Process tests.
Re-triggering the build fixes it sometimes, but it's really annoying.

Sometimes only the first test fails and the second is fine.

Here's the error from AppVeyor:
Context Should start a new testProcess instance as running [+] Should not have a logfile already present 52ms The 'Microsoft.PowerShell.Management' module was not imported because the 'Microsoft.PowerShell.Management' snap-in was already imported. [+] Should compile without throwing 433ms [+] Should be able to call Get-DscConfiguration without throwing 122ms [+] Should return the correct configuration 145ms [-] Should create a logfile 77ms Expected: {True} But was: {False} at <ScriptBlock>, C:\projects\psdscresources\Tests\Integration\MSFT_WindowsProcess.Integration.Tests.ps1: line 114 114: $pathResult | Should Be $true Context Should not start a second new testProcess instance when one is already running [-] Should have a logfile already present 77ms Expected: {True} But was: {False} at <ScriptBlock>, C:\projects\psdscresources\Tests\Integration\MSFT_WindowsProcess.Integration.Tests.ps1: line 124 124: $pathResult | Should Be $true [-] Should not throw when removing the log file 42ms Expected: the expression not to throw an exception. Message was {Cannot find path 'C:\projects\psdscresources\Tests\TestHelpers\processTestLog.txt' because it does not exist.} from C:\projects\psdscresources\Tests\Integration\MSFT_WindowsProcess.Integration.Tests.ps1:128 char:19 + { Remove-Item -Path $logFilePath } | Should not Throw + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ at <ScriptBlock>, C:\projects\psdscresources\Tests\Integration\MSFT_WindowsProcess.Integration.Tests.ps1: line 128 128: { Remove-Item -Path $logFilePath } | Should not Throw The 'Microsoft.PowerShell.Management' module was not imported because the 'Microsoft.PowerShell.Management' snap-in was already imported. [+] Should compile without throwing 362ms [+] Should be able to call Get-DscConfiguration without throwing 122ms [+] Should return the correct configuration 168ms [+] Should not create a logfile 25ms

Resolve clashes between PSDesiredStateConfiguration & PsDscResources

Hi,

I'm working with a configuration that uses resources from both PSDesiredStateConfiguration (specifically the File resource) & also PsDscResources (which doesn't have its own version of the File resource). I can get this working by having an Import-DscResource statement for PsDscResources & PSDesiredStateConfiguration is implicitly imported as needed. However, this results in a warning along the lines of "WARNING: The configuration '...' is loading one or more built-in resources without explicitly importing associated modules. Add Import-DscResource –ModuleName 'PSDesiredStateConfiguration' to your configuration to avoid this message.", & I'd like to avoid that if I can.

Questions:

  1. Is there any plan to migrate the File resource into PsDscResources so I can solely use that? Per this issue over at the xPSDesiredStateConfiguration repo it would appear not: Are there any plans or is anyone working on xFile?.
  2. Is there a way to explicitly import just the File resource from PSDesiredStateConfiguration? I can do this for other resources, e.g. Import-DscResource -ModuleName PSDesiredStateConfiguration -Name 'WindowsFeature', but attempting to do this with the File resource results in a "Resource does not exist" message.
  3. Is there a way I can suppress the just "implicit load" warning message?

My strong preference would be either 1 - Be able to use PsDscResources exclusively or 2 - Explicitly import just the File resource. If I need to resort to 3, I'd need a way to ignore this specific warning, but keep any other warnings...

Thanks heaps for help or suggestions,

Dave

Service: Resource missing the option to set the startup type to 'Automatic (Delayed Start)'

I would like to see that we add the option to be able to set the startup type to 'Automatic (Delayed Start)'
I propose that we add the value 'AutomaticDelayedStart' to the parameter StartupType.

To know if a service is set to delayed start the resource has to query the registry.

$service = Get-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Services\MSSQLSERVER'
$isDelayedAutostart = $service.DelayedAutostart -eq 1

And to set a resource to delayed start, we need to change that value in the registry to 1 which means 'Automatic (Delayed Start)'. And to remove delayed start we need to set the value to 0 which means that the startup type is set to 'Automatic'.

Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\MSSQLSERVER" `
    -Name "DelayedAutostart" -Value 1 -Type DWORD

Note: When changing this value in the registry it will not directly show in the service.msc (GUI). A restart seem to be necessary for the GUI to reflect the change. This has no bearing for us since we are only interested in the value in the registry and that the change actually are used when next restart occurs. And it does work in my tests, when changing the value to 1 for delayed start and restarting, the service will delay starting up.

invoke-dscresource says that a resource is not found

PS C:\Windows\system32> Invoke-DscResource -Method test -Name WindowsFeature -Property @{name='RSAT-AD-PowerShell';IncludeAllSubFeature=$true;ens
Present'} -module PSDscResources -Verbose
Invoke-DscResource : Resource WindowsFeature was not found.
At line:1 char:1

  • Invoke-DscResource -Method test -Name WindowsFeature -Property @{name ...
  •   + CategoryInfo          : NotSpecified: (:) [Invoke-DscResource], ArgumentException
      + FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.DesiredStateConfiguration.Commands.InvokeDscResourceMethodCommand
    

Avoid using the Win32_Product WMI class

This repository has reference to Win32_Product WMI class. As reported in issue PowerShell/DscResources#108, if possible then avoid using the Win32_Product.

If you are using a group policy with the WMIFilter that queries Win32_Product, modify the filter to use Win32reg_AddRemovePrograms
...
Win32reg_AddRemovePrograms is a much lighter and effective way to do this, which avoids the calls to do a resiliency check, especially in a locked down environment. So when using Win32reg_AddRemovePrograms we will not be calling on msiprov.dll and will not be initiating a resiliency check.
https://support.microsoft.com/en-us/kb/974524

There might not be possible to avoid using it, but for someone to determine that an issue is opened in very repository that has a reference to Win32_Product WMI class.

Group: Unable to add Different forest User to Local Group

I am running the following resource
       Group AddUser
    {
            GroupName = "Administrators"
            MembersToInclude = @("DOMAINB\USER1")
    Credential = $DomainBCredential
            Ensure = 'Present'
    }

There are two forests with a single domain each, Computer1 is in domainA and user1 is in domainB. There is a full trust relationship between domains, it should be noted that NETBIOS name is not the same as FQDN on either forest.

I am attempting to add User1 to the local administrators group on Computer1. It should be noted that a number of additional users from domainA are already added into the Computer1 administrative user group via Group Policy, there are also a number of orphaned SIDs. This operation succeeds if done manually.

The credential is to another account on DomainB and has domain admin rights. When running the code I get the following error:

VERBOSE: [COMPUTERNAME]: [[Group]AddUser] Resolving DOMAINB in the Domain Admins domain.
Exception calling "FindByIdentity" with "3" argument(s): "The user name or password is
incorrect.
"
+ CategoryInfo : NotSpecified: (:) [], CimException
+ FullyQualifiedErrorId : COMException,ResolveSidToPrincipal
+ PSComputerName : COMPUTERNAME.DOMAINA.com

When running the exact same configuration using the xGroup resource the configuration resolves and runs correctly. All parameters where kept in memory so the actual username and password couldn't have had a typo. Unfortunately there is a secondary issue with xGroup which I'll post separately.

TestScript is not returning the expected data

Hi,
I am using Script to run sn.ps1 only if the mentioned key below does not exist . In the first run, machine will not have this and expected sn.ps1 to run. Somehow it is not running. I am wondering if the logic in TestScript block is valid ? Appreciate your inputs.

Script RunSnbat
{

        GetScript =
        {
            # Do Nothing 

            $strongName = "hklm:\SOFTWARE\Microsoft\StrongName\Verification" 
            $IsStrongNameExists = Test-Path $strongName  
                       
        }

        SetScript = 
        {
            
            $runSnbat =  C:\SXS\sn.ps1 
         
        }

        TestScript = 
        {
    
          
            $IsExists = $GetScript
            if ($IsExists) {return $true} else {return $false}
        }          

   } 

Update Test-IsNanoServer to use reliable method

The current Test-IsNanoServer function is not using a reliable method of detection of Nano Server.

Please see this comment from @TravisEz13

This is the code we should be using:

function Test-IsNanoServer
{
    if(Test-Command -Name Get-ComputerInfo)
    {
        $computerInfo = Get-ComputerInfo

        if("Server" -eq $computerInfo.OsProductType -and "NanoServer" -eq $computerInfo.OsServerLevel)
        {
            return $true
        }
    }         

    return $false
} 

Registry: Resource needs to delete all values under a key

This scenario is from Bobby Reed for the Baseline Management scenario.
Group Policies sometimes have a *delval command which clears all values under a key and then inserts a new key.

Imagine if I allowed a compromised and outdated cipher suite in the Registry Key. Without **delval, DSC would never catch it, as it would just ensure that the ALLOWED cipher suites were present. GROUP POLICY however, WOULD catch it because it is still processing the **delval properly.

That made me think of another discussion @kwirkykat had for the SecurityPolicy module: dsccommunity/SecurityPolicyDsc#28 (comment)

I think the Registry resource needs something like an explicit “Include”/"Exclude" parameter along the lines the Group parameter Katie describes: https://github.com/powershell/psdscresources#group

Resource name '<resource>' is already being used by another Resource or Configuration.

I am attempting to use this resource on a Windows Server 2016 server. I am receiving an error telling me that the resource is already being used by another Resource or configuration.

I installed the resource per the documentation:

Install-Module PSDscResources

To troubleshoot, I've stripped out as much code as a I could to reproduce the error:

Configuration TerminalServer {

    Import-DscResource -ModuleName PSDscResources     
 }

When executing this configuration, I receive the following error:

At line:4 char:5
+     Import-DscResource -ModuleName PSDscResources
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Resource name 'Environment' is already being used by another Resource or Configuration.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : DuplicateKeywordDefinition

Prior to 2.4.0.0, the error message referenced 'Group' instead of environment. It seems like there is some sort of conflict with the inbox resoure, PSDesiredStateConfiguration.

For reference, here are the DSC Resources I have installed:

ImplementedAs   Name                      ModuleName                     Version    Properties               
-------------   ----                      ----------                     -------    ----------               
Binary          File                                                                {DestinationPath, Attr...
Binary          SignatureValidation                                                 {SignedItemType, Trust...
PowerShell      Archive                   PSDesiredStateConfiguration    1.1        {Destination, Path, Ch...
PowerShell      Environment               PSDesiredStateConfiguration    1.1        {Name, DependsOn, Ensu...
PowerShell      Group                     PSDesiredStateConfiguration    1.1        {GroupName, Credential...
Binary          Log                       PSDesiredStateConfiguration    1.1        {Message, DependsOn, P...
PowerShell      Package                   PSDesiredStateConfiguration    1.1        {Name, Path, ProductId...
PowerShell      Registry                  PSDesiredStateConfiguration    1.1        {Key, ValueName, Depen...
PowerShell      Script                    PSDesiredStateConfiguration    1.1        {GetScript, SetScript,...
PowerShell      Service                   PSDesiredStateConfiguration    1.1        {Name, BuiltInAccount,...
PowerShell      User                      PSDesiredStateConfiguration    1.1        {UserName, DependsOn, ...
PowerShell      WaitForAll                PSDesiredStateConfiguration    1.1        {NodeName, ResourceNam...
PowerShell      WaitForAny                PSDesiredStateConfiguration    1.1        {NodeName, ResourceNam...
PowerShell      WaitForSome               PSDesiredStateConfiguration    1.1        {NodeCount, NodeName, ...
PowerShell      WindowsFeature            PSDesiredStateConfiguration    1.1        {Name, Credential, Dep...
PowerShell      WindowsOptionalFeature    PSDesiredStateConfiguration    1.1        {Name, DependsOn, Ensu...
PowerShell      WindowsPackageCab         PSDesiredStateConfiguration    1.1        {Ensure, Name, SourceP...
PowerShell      WindowsProcess            PSDesiredStateConfiguration    1.1        {Arguments, Path, Cred...
PowerShell      Environment               PSDscResources                 2.4.0.0    {Name, DependsOn, Ensu...
PowerShell      Group                     PSDscResources                 2.4.0.0    {GroupName, Credential...
Composite       GroupSet                  PSDscResources                 2.4.0.0    {DependsOn, PsDscRunAs...
Composite       ProcessSet                PSDscResources                 2.4.0.0    {DependsOn, PsDscRunAs...
PowerShell      Registry                  PSDscResources                 2.4.0.0    {Key, ValueName, Depen...
PowerShell      Script                    PSDscResources                 2.4.0.0    {GetScript, SetScript,...
PowerShell      Service                   PSDscResources                 2.4.0.0    {Name, BuiltInAccount,...
Composite       ServiceSet                PSDscResources                 2.4.0.0    {DependsOn, PsDscRunAs...
PowerShell      User                      PSDscResources                 2.4.0.0    {UserName, DependsOn, ...
PowerShell      WindowsFeature            PSDscResources                 2.4.0.0    {Name, Credential, Dep...
Composite       WindowsFeatureSet         PSDscResources                 2.4.0.0    {DependsOn, PsDscRunAs...
PowerShell      WindowsOptionalFeature    PSDscResources                 2.4.0.0    {Name, DependsOn, Ensu...
Composite       WindowsOptionalFeatureSet PSDscResources                 2.4.0.0    {DependsOn, PsDscRunAs...
PowerShell      WindowsPackageCab         PSDscResources                 2.4.0.0    {Ensure, Name, SourceP...
PowerShell      WindowsProcess            PSDscResources                 2.4.0.0    {Arguments, Path, Cred...

Powershell Version Information:

PS C:\> $PSVersionTable

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

Service: Can the DSC User Resource change existing user account passwords?

Situation
Lets say I updated a partial to have user account X use and new password Y. This user and password already exists on the target node, And there existing services running with user X's credentials.
Can DSC update the password of user X when I push the mof ?

Issues
When I tried to do this, I have gotten password incorrect errors when i execute Start-DSCConfiguration and the services using the changed user account stop running.

System Information
OS Name: Microsoft Windows Server 2012 R2 Standard
Version 6.3.9600 Build 9600

if (-not (Test-IsNanoServer)) fails on 2008r2 systems

if (-not (Test-IsNanoServer)) calls Get-ComputerInfo

Get-ComputerInfo : Unable to find an entry point named 'GetFirmwareType' in DLL 'kernel32.dll'.

This only fails on 2008r2. Known issue: PowerShell/PowerShell#3023 Works on 2012 and above.

Need to add some sort of test for OS version first:

$osbuild = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name CurrentBuild).CurrentBuild

if $osbuild -lt "9200"

Replacement for xRemoteFile resource

Hi,

Updating a bunch of DSC configurations to remove experimental modules etc. What is the replacement (if any) for xRemoteFile from xPSDesiredStateConfiguration?

I thought I could use the File resource with the source being a URL but reading comments this doesn't seem to be the case.

Group: Resource failing when using 'MembersToInclude' to add members to a local group that contains a domain group

I have a DSC file with a resource hashtable configured similar to the following:

Group AdminGroupMembership {
    Ensure           = "Present"
    GroupName        = "Administrators"
    MembersToInclude = @("Member01")
}

When the DSC applies to a domain member server, it fails, even though 'Member01' was successfully added to the group.

What appears to be happening is that MembersToInclude has the resource iterating through all the members of the group to see if 'Member01' is present. Since this is a domain member server, and since PsDscRunAsCredential isn't specified, the failure is being generated when the script attempts to process the [DOMAIN]\Domain Admins group, as it doesn't have access.

The outcome I was is expecting is: since I'm only looking to validate that 'Member01' exists inside the Administrators local group, and since I'm not looking to remove any members from it, DSC would only validate that 'Member01' exists inside the Administrators local group, and it wouldn't try to resolve a domain member when it doesn't have access to Active Directory.

Is this "working as intended" or can this be resolved in a future update?

Group resource failing on Nano server.

I am trying to use the Group resource to manage members of the administrators group on nano server but getting an error on Test-TargetResource. The same configuration works fine on a GUI server.

It seems to be line 85 and 89 in the function Test-TargetResourceOnNanoServer that is failing if $groupMembers is only containing one Local user member. This could be because Get-MembersOnNanoServer is returning a string instead of a array. It is working i typecast the variable $groupMembers to array the .Count is working

Also the Function Get-MembersOnNanoServer is only returning local members and not including domain members. What is the reason for that?
As i see it the function will then never verify that domain users is added to the group and always add them.

#--- ERROR ---#
PowerShell DSC resource MSFT_GroupResource failed to execute Test-TargetResource functionality with error message: The property 'Count' cannot be found on this object. Verify that the property exists.
+ CategoryInfo : InvalidOperation: (:) [], CimException
+ FullyQualifiedErrorId : ProviderOperationExecutionFailure
+ PSComputerName : localhost

The SendConfigurationApply function did not succeed.
+ CategoryInfo : NotSpecified: (root/Microsoft/...gurationManager:String) [], CimException
+ FullyQualifiedErrorId : MI RESULT 1
+ PSComputerName : localhost
#--- ERROR ---#

Can't import a specific resource

I am finding this module challenging to use since there are naming conflicts with PSDesiredStateconfiguration. But for now I am trying to use this in a DSC Configuration

Import-DscResource -ModuleName "PSDscResources" -ModuleVersion "2.5.0.0" -Name "User"

But both the ISE and VSCode give me an error that the resource can't be found. I know the syntax is correct because this line parses correctly.

Import-DscResource -ModuleName "xTimeZone" -ModuleVersion "1.6.0.0" -name "xtimezone"

Environment: Multiple Path entries : a conflict was detected between resources [Environment]SetMySQLBinaryPathVariable and [Environment]PHPPathEnvironmentVariable

Fails because the name value must be 'Path' but this this is used as a unique key.
Couldn't find any issues raised regarding this, still a problem in 2.6.0.0.
Is the general accepted solution to use a custom Script resource?

Related:
https://windowsserver.uservoice.com/forums/301869-powershell/suggestions/11088876-dsc-environment-resource-does-not-allow-duplicate
https://powershell.org/forums/topic/why-are-the-resourcekey-combination-required-to-be-unique/

User: Docker windows container - UserResource FindByIdentity error

I am trying to use the UserResource in order to provision a windows docker container.

The error I see is:

VERBOSE: [7FA4183C543B]: LCM: [ Start Resource ] [[User]IisRemoteAdminUser]
VERBOSE: [7FA4183C543B]: LCM: [ Start Test ] [[User]IisRemoteAdminUser]
VERBOSE: [7FA4183C543B]: LCM: [ End Test ] [[User]IisRemoteAdminUser]
in 0.6100 seconds.
PowerShell DSC resource MSFT_UserResource failed to execute
Test-TargetResource functionality with error message:
System.InvalidOperationException: There could be a possible multiple matches
exception while trying to use the System.DirectoryServices API's.Exception
calling "FindByIdentity" with "2" argument(s): "The Server service is not
started.
"
+ CategoryInfo : InvalidOperation: (:) [], CimException
+ FullyQualifiedErrorId : ProviderOperationExecutionFailure
+ PSComputerName : localhost

My DSC script tries to create a user and assign to the local administrators group:

Note I import the PSDscResources module at the start of the script, due to the answer here which suggested importing PSDesiredStateConfiguration is older and PSDscResources may have this issue fixed: PowerShell/DscResources#235

Configuration BasicIIS
{  

    Import-DscResource -ModuleName PSDscResources 
    node localhost
    {       

 param(
    [Parameter(Mandatory = $true)][PSCredential]$credential,
    [Parameter(Mandatory = $true)][string]$userName
    )
        
        Group AdminGroupIncludeIisRemoteAdminUser
        {
            # This removes TestGroup, if present
            # To create a new group, set Ensure to "Present“            
            Ensure = "Present"
            GroupName = "Administrators"
            MembersToInclude= "$userName"
            Credential = $credential
            DependsOn = "[User]IisRemoteAdminUser"
        }
        User IisRemoteAdminUser # User for remote IIS administration
        {
            Ensure = "Present"  
            UserName = $userName
            Password = $credential# This needs to be a credential object           
        }    
       
    }
}

$userName= "Foo"
$secUserPassword = ConvertTo-SecureString "Passw0rd" -AsPlainText -Force
$userCreds = New-Object System.Management.Automation.PSCredential ($userName, $secUserPassword )

$cd = @{
    AllNodes = @(
        @{
            NodeName = 'localhost'
            PSDscAllowPlainTextPassword = $true
        }
    )
}

BasicIIS -credential $userCreds -userName $userName -ConfigurationData $cd

Start-DscConfiguration -Path .\BasicIIS -Wait -verbose -Force

My docker file looks like this:


# escape=`
FROM microsoft/aspnet

# Following script just does some prep to install some some tools like the nuget module provider for powershell, and chocolatey etc etc.
ADD ./SetupBasicTools.ps1 /SetupBasicTools.ps1
RUN powershell -NoProfile -File C:\SetupBasicTools.ps1

# The following runs the powershell script above with the user resource where I see the error.
ADD ./web/SetupBasicIIS.ps1 /SetupBasicIIS.ps1
RUN powershell -NoProfile -File C:\SetupBasicIIS.ps1 -logsDir C:/logs

Deploying archive results in error

I'm using PSDscResources 2.7.0 to configure my server - I deploy a website from a ZIP archive.

Error: PowerShell DSC resource MSFT_Archive failed to execute Set-TargetResource functionality with error message: System.InvalidOperationException: An error occurred while attempting copy from the archive to the destination path C:\inetpub\fogbugz\Accessories\API.

VERBOSE: [FB-MS01-LAB]: LCM:  [ Start  Resource ]  [[Archive]FogBugzDistZip]
VERBOSE: [FB-MS01-LAB]: LCM:  [ Start  Test     ]  [[Archive]FogBugzDistZip]
VERBOSE: [FB-MS01-LAB]:                            [[Archive]FogBugzDistZip] Retrieving the state of the archive with path C:\install\FogBugz-8.8.55.zip and
destination C:\inetpub\fogbugz...
VERBOSE: [FB-MS01-LAB]:                            [[Archive]FogBugzDistZip] A directory already exists at the destination path C:\inetpub\fogbugz.
VERBOSE: [FB-MS01-LAB]:                            [[Archive]FogBugzDistZip] Testing if the archive at the destination path C:\inetpub\fogbugz exists...
VERBOSE: [FB-MS01-LAB]:                            [[Archive]FogBugzDistZip] Opening the archive at path C:\install\FogBugz-8.8.55.zip...
VERBOSE: [FB-MS01-LAB]:                            [[Archive]FogBugzDistZip] An item with the same name as the archive entry exists at the destination path
C:\inetpub\fogbugz\Accessories\.
VERBOSE: [FB-MS01-LAB]:                            [[Archive]FogBugzDistZip] The item at the destination path C:\inetpub\fogbugz\Accessories\ has the same name as
 a file archive entry but is not a file.
VERBOSE: [FB-MS01-LAB]:                            [[Archive]FogBugzDistZip] Closing the archive at path C:\install\FogBugz-8.8.55.zip...
VERBOSE: [FB-MS01-LAB]:                            [[Archive]FogBugzDistZip] The archive at path C:\install\FogBugz-8.8.55.zip does not exist at the destination
C:\inetpub\fogbugz.
VERBOSE: [FB-MS01-LAB]:                            [[Archive]FogBugzDistZip] Testing whether or not the state of the archive with path
C:\install\FogBugz-8.8.55.zip and destination C:\inetpub\fogbugz matches the desired state...
VERBOSE: [FB-MS01-LAB]: LCM:  [ End    Test     ]  [[Archive]FogBugzDistZip]  in 0.2050 seconds.
VERBOSE: [FB-MS01-LAB]: LCM:  [ Start  Set      ]  [[Archive]FogBugzDistZip]
VERBOSE: [FB-MS01-LAB]:                            [[Archive]FogBugzDistZip] Setting the state of the archive with path C:\install\FogBugz-8.8.55.zip and
destination C:\inetpub\fogbugz...
VERBOSE: [FB-MS01-LAB]:                            [[Archive]FogBugzDistZip] A directory already exists at the destination path C:\inetpub\fogbugz.
VERBOSE: [FB-MS01-LAB]:                            [[Archive]FogBugzDistZip] Expanding the archive at C:\install\FogBugz-8.8.55.zip to the destination
C:\inetpub\fogbugz...
VERBOSE: [FB-MS01-LAB]:                            [[Archive]FogBugzDistZip] Opening the archive at path C:\install\FogBugz-8.8.55.zip...
VERBOSE: [FB-MS01-LAB]:                            [[Archive]FogBugzDistZip] An item with the same name as the archive entry exists at the destination path
C:\inetpub\fogbugz\Accessories\.
VERBOSE: [FB-MS01-LAB]:                            [[Archive]FogBugzDistZip] Overwriting the item at the path C:\inetpub\fogbugz\Accessories\...
VERBOSE: [FB-MS01-LAB]:                            [[Archive]FogBugzDistZip] Copying the corresponding archive entry to the path
C:\inetpub\fogbugz\Accessories\...
VERBOSE: [FB-MS01-LAB]:                            [[Archive]FogBugzDistZip] Opening the archive entry Accessories/...
VERBOSE: [FB-MS01-LAB]:                            [[Archive]FogBugzDistZip] Closing the archive at path C:\install\FogBugz-8.8.55.zip...
VERBOSE: [FB-MS01-LAB]: LCM:  [ End    Set      ]  [[Archive]FogBugzDistZip]  in 0.1250 seconds.
PowerShell DSC resource MSFT_Archive  failed to execute Set-TargetResource functionality with error message: System.InvalidOperationException: An error occurred
while attempting copy from the archive to the destination path C:\inetpub\fogbugz\Accessories\. ---> System.Management.Automation.MethodInvocationException:
Exception calling ".ctor" with "2" argument(s): "The filename, directory name, or volume label syntax is incorrect.
" ---> System.IO.IOException: The filename, directory name, or volume label syntax is incorrect.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions
options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean
bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode)
   --- End of inner exception stack trace ---
   at System.Management.Automation.DotNetAdapter.AuxiliaryConstructorInvoke(MethodInformation methodInformation, Object[] arguments, Object[] originalArguments)
   at System.Management.Automation.DotNetAdapter.ConstructorInvokeDotNet(Type type, ConstructorInfo[] constructors, Object[] arguments)
   at Microsoft.PowerShell.Commands.NewObjectCommand.CallConstructor(Type type, ConstructorInfo[] constructors, Object[] args)
   --- End of inner exception stack trace ---
    + CategoryInfo          : InvalidOperation: (:) [], CimException
    + FullyQualifiedErrorId : ProviderOperationExecutionFailure
    + PSComputerName        : localhost

"Resource name 'WindowsPackageCab' is already being used by another Resource or Configuration."

#34 Seems to be still happening for me on a newer version that mentioned, so opening a new issue to track it

OS: Windows Server 2012 R2

PS C:\dev\dsc> $PSVersionTable

Name Value


PSVersion 5.1.14409.1005
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14409.1005
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

test.ps1

Configuration test {
    [CmdletBinding()]
    param()

    Import-DscResource -ModuleName xWebAdministration, PSDesiredStateConfiguration
	   
        WindowsFeature Web-Server
		{
            Ensure = "Present"
            Name = "Web-Server"
		}
	}
test

PS C:\dev\dsc> . .\test.ps1
ImportClassResourcesFromModule : Exception calling "ImportClassResourcesFromModule" with "3" argument(s): "Resource name
'WindowsPackageCab' is already being used by another Resource or Configuration."
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1:2109 char:35

  • ... rcesFound = ImportClassResourcesFromModule -Module $mod -Resources $r ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [ImportClassResourcesFromModule], MethodInvocationException
    • FullyQualifiedErrorId : PSInvalidOperationException,ImportClassResourcesFromModule

Here is the list of installed DSC Resources

PS C:\dev\dsc> Get-DscResource

ImplementedAs   Name                      ModuleName                     Version    Properties
-------------   ----                      ----------                     -------    ----------
Binary          File                                                                {DestinationPath, Attributes, Checksum, Content...
Binary          SignatureValidation                                                 {SignedItemType, TrustedStorePath}
PowerShell      SQLServerLogin            dSQLServer                     1.0.0.0    {LoginName, DependsOn, Ensure, LoginType...}
PowerShell      SQLServerLoginRole        dSQLServer                     1.0.0.0    {LoginName, DependsOn, Ensure, PsDscRunAsCreden...
PowerShell      SQLServerMaxDop           dSQLServer                     1.0.0.0    {ServerInstance, DependsOn, Ensure, MaxDop...}
PowerShell      Archive                   PSDesiredStateConfiguration    1.1        {Destination, Path, Checksum, Credential...}
PowerShell      Environment               PSDesiredStateConfiguration    1.1        {Name, DependsOn, Ensure, Path...}
PowerShell      Group                     PSDesiredStateConfiguration    1.1        {GroupName, Credential, DependsOn, Description...}
Composite       GroupSet                  PSDesiredStateConfiguration    1.1        {DependsOn, PsDscRunAsCredential, GroupName, En...
Binary          Log                       PSDesiredStateConfiguration    1.1        {Message, DependsOn, PsDscRunAsCredential}
PowerShell      Package                   PSDesiredStateConfiguration    1.1        {Name, Path, ProductId, Arguments...}
Composite       ProcessSet                PSDesiredStateConfiguration    1.1        {DependsOn, PsDscRunAsCredential, Path, Credent...
PowerShell      Registry                  PSDesiredStateConfiguration    1.1        {Key, ValueName, DependsOn, Ensure...}
PowerShell      Script                    PSDesiredStateConfiguration    1.1        {GetScript, SetScript, TestScript, Credential...}
PowerShell      Service                   PSDesiredStateConfiguration    1.1        {Name, BuiltInAccount, Credential, Dependencies...
Composite       ServiceSet                PSDesiredStateConfiguration    1.1        {DependsOn, PsDscRunAsCredential, Name, Startup...
PowerShell      User                      PSDesiredStateConfiguration    1.1        {UserName, DependsOn, Description, Disabled...}
PowerShell      WaitForAll                PSDesiredStateConfiguration    1.1        {NodeName, ResourceName, DependsOn, PsDscRunAsC...
PowerShell      WaitForAny                PSDesiredStateConfiguration    1.1        {NodeName, ResourceName, DependsOn, PsDscRunAsC...
PowerShell      WaitForSome               PSDesiredStateConfiguration    1.1        {NodeCount, NodeName, ResourceName, DependsOn...}
PowerShell      WindowsFeature            PSDesiredStateConfiguration    1.1        {Name, Credential, DependsOn, Ensure...}
Composite       WindowsFeatureSet         PSDesiredStateConfiguration    1.1        {DependsOn, PsDscRunAsCredential, Name, Ensure...}
PowerShell      WindowsOptionalFeature    PSDesiredStateConfiguration    1.1        {Name, DependsOn, Ensure, LogLevel...}
Composite       WindowsOptionalFeatureSet PSDesiredStateConfiguration    1.1        {DependsOn, PsDscRunAsCredential, Name, Ensure...}
PowerShell      WindowsPackageCab         PSDesiredStateConfiguration    1.1        {Ensure, Name, SourcePath, DependsOn...}
PowerShell      WindowsProcess            PSDesiredStateConfiguration    1.1        {Arguments, Path, Credential, DependsOn...}
PowerShell      Environment               PSDscResources                 2.4.0.0    {Name, DependsOn, Ensure, Path...}
PowerShell      Group                     PSDscResources                 2.4.0.0    {GroupName, Credential, DependsOn, Description...}
PowerShell      Registry                  PSDscResources                 2.4.0.0    {Key, ValueName, DependsOn, Ensure...}
PowerShell      Script                    PSDscResources                 2.4.0.0    {GetScript, SetScript, TestScript, Credential...}
PowerShell      Service                   PSDscResources                 2.4.0.0    {Name, BuiltInAccount, Credential, Dependencies...
PowerShell      User                      PSDscResources                 2.4.0.0    {UserName, DependsOn, Description, Disabled...}
PowerShell      WindowsFeature            PSDscResources                 2.4.0.0    {Name, Credential, DependsOn, Ensure...}
PowerShell      WindowsOptionalFeature    PSDscResources                 2.4.0.0    {Name, DependsOn, Ensure, LogLevel...}
PowerShell      WindowsPackageCab         PSDscResources                 2.4.0.0    {Ensure, Name, SourcePath, DependsOn...}
PowerShell      WindowsProcess            PSDscResources                 2.4.0.0    {Arguments, Path, Credential, DependsOn...}
PowerShell      xDisk                     xStorage                       2.9.0.0    {DiskNumber, DriveLetter, AllocationUnitSize, D...
PowerShell      xDiskAccessPath           xStorage                       2.9.0.0    {AccessPath, DiskNumber, AllocationUnitSize, De...
PowerShell      xMountImage               xStorage                       2.9.0.0    {ImagePath, Access, DependsOn, DriveLetter...}
PowerShell      xWaitForDisk              xStorage                       2.9.0.0    {DiskNumber, DependsOn, PsDscRunAsCredential, R...
PowerShell      xWaitForVolume            xStorage                       2.9.0.0    {DriveLetter, DependsOn, PsDscRunAsCredential, ...
PowerShell      xIisFeatureDelegation     xWebAdministration             1.17.0.0   {OverrideMode, SectionName, DependsOn, PsDscRun...
PowerShell      xIisHandler               xWebAdministration             1.17.0.0   {Ensure, Name, DependsOn, PsDscRunAsCredential}
PowerShell      xIisLogging               xWebAdministration             1.17.0.0   {LogPath, DependsOn, LogFlags, LogFormat...}
PowerShell      xIisMimeTypeMapping       xWebAdministration             1.17.0.0   {Ensure, Extension, MimeType, DependsOn...}
PowerShell      xIisModule                xWebAdministration             1.17.0.0   {Name, Path, RequestPath, Verb...}
PowerShell      xSSLSettings              xWebAdministration             1.17.0.0   {Bindings, Name, DependsOn, Ensure...}
PowerShell      xWebApplication           xWebAdministration             1.17.0.0   {Name, PhysicalPath, WebAppPool, Website...}
PowerShell      xWebAppPool               xWebAdministration             1.17.0.0   {Name, autoShutdownExe, autoShutdownParams, aut...
PowerShell      xWebAppPoolDefaults       xWebAdministration             1.17.0.0   {ApplyTo, DependsOn, IdentityType, ManagedRunti...
PowerShell      xWebConfigKeyValue        xWebAdministration             1.17.0.0   {ConfigSection, Key, WebsitePath, DependsOn...}
PowerShell      xWebsite                  xWebAdministration             1.17.0.0   {Name, ApplicationPool, ApplicationType, Authen...
PowerShell      xWebSiteDefaults          xWebAdministration             1.17.0.0   {ApplyTo, AllowSubDirConfig, DefaultApplication...
PowerShell      xWebVirtualDirectory      xWebAdministration             1.17.0.0   {Name, PhysicalPath, WebApplication, Website...}


PS C:\dev\dsc>

Do I miss some patch ?
Update for Windows (KB3191564) is already installed.

Thanks

Cannot Import PSDscResources

I have the same issue as was described in #47 . But I'm not using any insider build

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

As soon as I install PSDscResources, I am not able to compile any mof anymore(wheter I try to load PSDscResources or not), I always get the error

ImportClassResourcesFromModule : Exception calling "ImportClassResourcesFromModule" with "3" argument(s): "Resource name 'WindowsPackageCab' is already being used by another Resource or
Configuration."
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1:2109 char:35
+ ... rcesFound = ImportClassResourcesFromModule -Module $mod -Resources $r ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [ImportClassResourcesFromModule], MethodInvocationException
    + FullyQualifiedErrorId : PSInvalidOperationException,ImportClassResourcesFromModule

The server is a Windows 2012 R2

User resource fails if "Server" service is not running

"Server" service required for "User" resource to operate. If that service is stopped User resource fails.
Steps to reproduce

Get-service Server | Stop -Service

If you use user resource now it will fail with error below

[A-MOBL3]: LCM:  [ Start  Set      ]
[A-MOBL3]: LCM:  [ Start  Resource ]  [[User]LocalAdmin]
[A-MOBL3]: LCM:  [ Start  Test     ]  [[User]LocalAdmin]
[A-MOBL3]: LCM:  [ End    Test     ]  [[User]LocalAdmin]  in 0.0930 seconds.
PowerShell DSC resource MSFT_UserResource  failed to execute Test-TargetResource functionality with error message: The 
variable '$user' cannot be retrieved because it has not been set. 
    + CategoryInfo          : InvalidOperation: (:) [], CimException
    + FullyQualifiedErrorId : ProviderOperationExecutionFailure
    + PSComputerName        : localhost
 
[A-MOBL3]: LCM:  [ End    Set      ]
The SendConfigurationApply function did not succeed.
    + CategoryInfo          : NotSpecified: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : MI RESULT 1
    + PSComputerName        : localhost
 
Operation 'Invoke CimMethod' complete.
Time taken for configuration job to complete is 0.336 seconds

WindowsProcess: Intermittent failure in MSFT_WindowsProcess.Integration.Tests.ps1

I ran into this failure in one of my builds.

[00:18:54] [-] Should be able to find the log file after configuration 64ms
[00:18:54] Expected: {True}
[00:18:54] But was: {False}
[00:18:54] at , C:\projects\psdscresources\Tests\Integration\MSFT_WindowsProcess.Integration.Tests.ps1: line 145
[00:18:54] 145: $pathResult | Should Be $true

Attaching build log.

log.txt

Renaming an existing user with DSC

Hello,

I'm interested in renaming an existing user with DSC. As I saw so far, the only thing you can do with the module PSDscResources is creating or deleting users.

I'm thinking of creating a resource for this purpose. Is this the right repo for this or is there any other?

Service: Resource doesn't support setting recovery actions

When creating a new Windows Service, you might want to specify the Recovery Action settings. The Service resource doesn't support those, which forces you to implement it manually using a Script resource, that executes:

sc failure <ServiceName> reset=120 actions=restart/60000/restart/120000/restart/180000
sc failureflag <ServiceName> 1

Script: Cannot Schedule Job using Script Resource

I've been trying to use a DSC Script resource to toggle the RebootNodeIfNeeded flag in LCM based on datetime so that I can control the patching reboot window.

Since I don't seem to be able to make the execution of one configuration step dependent on another or replace the boolean true or false setting for RebootNodeIfNeeded with an evaluation, I've fallen back to trying to create a powershell scheduled job to define, generate, and apply metaconfig MOF.

Unfortunately I am somehow getting an elevation related error when the below configuration hits the Register-ScheduledJob step in the SetScript.

Configuration UpdateAndScheduleReboot{
 
    Param(
        [string]$NodeName='localhost',
        [datetime]$TargetRebootTime
    )
    
    Import-DscResource –ModuleName ’PSDesiredStateConfiguration’
    Import-DSCResource -ModuleName xPendingReboot
    Import-DSCResource -ModuleName xWindowsUpdate
    $TargetRebootTime = $AllNodes.TargetRebootTime
    Script RebootEnableJob {
        GetScript = {
            return @{Result = "HelloWorld"}
        }
        TestScript = {
            $ScheduledEnableJob = Get-ScheduledJob | ?{$_.Name -eq 'EnableReboot'}
            if ($ScheduledEnableJob){
                if ($true <#Check for time match#>){
                    Write-Verbose "Matching job found"
                    return $true
                } else {
                    Write-Verbose "Matching job found - Stale Trigger Time"
                    return $false
                }

            } else {
                Write-Verbose "No matching job found"
                Return $false
            }
        }
        SetScript = {
            $ScheduledEnableJob = Get-ScheduledJob | ?{$_.Name -eq 'EnableReboot'}
            if ($ScheduledEnableJob){
                Write-Verbose "Modifying Existing Job"
                $ScheduledEnableJob | Set-ScheduledJob -Trigger (New-JobTrigger -Once -At $Using:TargetRebootTime)
            } else {
                Write-Verbose "Creating New Scheduled Job with target trigger time $($Using:TargetRebootTime)"
                Write-Verbose "User: $([System.Security.Principal.WindowsIdentity]::GetCurrent().Name)"
                Write-Verbose "Current User: $env:UserName"
                $EnableJob = @{
                    Name = 'EnableReboot'
                    ScriptBlock = {
                        configuration RebootSetting
                        {
	                        Param(
		                        [string[]]$NodeName = 'localhost'
	                        )
                            LocalConfigurationManager {
                                RebootNodeIfNeeded = $true
                            }
                        }
                        $ConfigPath = "C:\temp\RebootSetting"
                        & ([scriptblock]::Create("RebootSetting -OutputPath $ConfigPath"))
                        Set-DscLocalConfigurationManager -Path $ConfigPath
        
                    }
                    Trigger = New-JobTrigger -Once -At $Using:TargetRebootTime
                    ScheduledJobOption = New-ScheduledJobOption -RunElevated -DoNotAllowDemandStart
                    ErrorAction = 'Stop'
                }
                Register-ScheduledJob @EnableJob
            }
        }
    }

    Script RebootDisableJob {
        GetScript = {
            return @{Result = "HelloWorld"}
        }
        TestScript = {
            $ScheduledDisableJob = Get-ScheduledJob | ?{$_.Name -eq 'DisableReboot'}
            if ($ScheduledDisableJob){
                if ($true <#Check for time match#>){
                    Write-Verbose "Matching job found"
                    return $true
                } else {
                    Write-Verbose "Matching job found - Stale Trigger Time"
                    return $false
                }

            } else {
                Write-Verbose "No matching job found"
                Return $false
            }
        }
        SetScript = {
            $ScheduledDisableJob = Get-ScheduledJob | ?{$_.Name -eq 'DisableReboot'}
            if ($ScheduledDisableJob){
                Write-Verbose "Modifying Existing Job"
                $ScheduledDisableJob | Set-ScheduledJob -Trigger (New-JobTrigger -Once -At ($Using:TargetRebootTime).AddHours(1.5))
            } else {
                Write-Verbose "Creating New Scheduled Job with target trigger time $Using:TargetRebootTime"
                $DisableJob = @{
                    Name = 'DisableReboot'
                    ScriptBlock = {
                        configuration RebootSetting
                        {
	                        Param(
		                        [string[]]$NodeName = 'localhost'
	                        )
                            LocalConfigurationManager {
                                RebootNodeIfNeeded = $False
                            }
                        }
                        $ConfigPath = "C:\temp\RebootSetting"
                        "RebootSetting -OutputPath $ConfigPath"
                        Set-DscLocalConfigurationManager -Path $ConfigPath
        
                    }
                    Trigger = New-JobTrigger -Once -At $Using:TargetRebootTime
                    ScheduledJobOption = New-ScheduledJobOption -RunElevated -DoNotAllowDemandStart
                }
                Register-ScheduledJob @DisableJob
            }
        }
    }

    xWindowsUpdateAgent MuSecurityImportant {
        IsSingleInstance = 'Yes'
        UpdateNow        = $True
        Source           = 'WindowsUpdate'
        Notifications    = 'ScheduledInstallation'
    }

    xPendingReboot CheckReboot {
        Name = "Check for a pending reboot and trigger if true"
    }
 
}

$ConfigData = @{
    AllNodes = @(
        @{
            NodeName = 'localhost'
            TargetRebootTime = (Get-Date 0:0:0.0).AddDays(3)
            PSDscAllowDomainUser = $true
            PsDscRunAsCredential = $localadmin
        }
    )
}

UpdateAndScheduleReboot -ConfigurationData $ConfigData -OutputPath (Join-Path -Path @($env:SystemDrive) -ChildPath ('Temp\UpdateAndScheduleReboot'))
Start-DscConfiguration -Path C:\temp\UpdateAndScheduleReboot -Force -Wait -Verbose

#install-module -Name @('xComputerManagement','xPendingReboot','xWindowsUpdate') -Force

Group resource Exception when Groupname is 'Users'

Not sure what the problem is. Only occurrs for the Users group.

Configuration DscAddGroup {
  Import-DscResource -ModuleName 'PSDscResources'

  Node 'localhost' {
    Group Users {
      GroupName = 'Users'
    }
  }
}

DscAddGroup
Test-DscConfiguration -Path .\DscAddGroup

yields

PowerShell DSC resource MSFT_GroupResource  failed to execute Test-TargetResource functionality with error message: Exception calling
".ctor" with "2" argument(s): "Server names cannot contain a space character."
    + CategoryInfo          : InvalidOperation: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : ProviderOperationExecutionFailure
    + PSComputerName        : localhost

If the name of the group is changed to any other existing or non-existing group all works ok.
Tested on a fresh Windows 10 installation.
Using 'PSDesiredStateConfiguration' instead the error is the same though somewhat more verbose:

Exception calling ".ctor" with "2" argument(s): "Server names cannot contain a space character."
    + CategoryInfo          : InvalidOperation: (:) [], CimException
    + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand
    + PSComputerName        : localhost

The PowerShell DSC resource '[Group]Users' with SourceInfo 'C:\Users\admin\Desktop\TestConfig.ps1::5::5::Group' threw one or more
non-terminating errors while running the Test-TargetResource functionality. These errors are logged to the ETW channel called
Microsoft-Windows-DSC/Operational. Refer to this channel for more details.
    + CategoryInfo          : InvalidOperation: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : NonTerminatingErrorFromProvider
    + PSComputerName        : localhost

Registry: ValueName should be optional

I feel like the implementation of ValueName as an empty string (without ValueType
or ValueData) to target a Key is a bit clunky. An empty string intuitively targets the (Default) value. Although removal of the (Default) value does imply removal of the Key, it's not intuitive by design. With all due respect, it feels a bit like a hack to add the ability of Key removal.

I believe that ValueName should not be a required property. It's more intuitive that Key removal look like this:

Registry Test
{
    Ensure = 'Absent'
    Key = 'HKLM:\Software\Test'
}

Making this improvement would not require current functionality to break though. As I stated already, removal of the (Default) value implies removal of the Key. We would just be adding a more intuitive Key removal option. This would also allow for additional properties/features to be implemented that don't require a ValueName name property.

Resource name 'Archive' is already being used by another Resource or Configuration.

I am getting the same issue as #34 but running windows server 2016, and all updates installed. Version table is:

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

I am using PSDSCResources in a composite resource module and my imports look like this:

Import-DscResource -ModuleName PowershellModule -ModuleVersion 0.3
    Import-DscResource -ModuleName xRemoteDesktopAdmin -ModuleVersion 1.1.0.0
    Import-DscResource -ModuleName xCertificate -ModuleVersion 3.0.0.0
    Import-DscResource -ModuleName xComputerManagement -ModuleVersion 3.0.0.0
    Import-DSCResource -ModuleName xNetworking -ModuleVersion 5.2.0.0
    Import-DscResource -ModuleName PSDSCResources -ModuleVersion 2.8.0.0

So i'm not importing several modules on the same line as I've seen in other issues. I'm just testing this one composite resource in my configuration so there are no other modules getting loaded.

I installed the module with Install-Module and if I run get-dscresource it looks like this

192.168.0.63]: PS C:\Users\vagrant\Documents> get-dscresource

ImplementedAs   Name                      ModuleName                     Version    Properties
-------------   ----                      ----------                     -------    ----------
Binary          File                                                                {DestinationPath, Attributes, Checksum, Content...
Binary          SignatureValidation                                                 {SignedItemType, TrustedStorePath}
PowerShell      PSModuleRepositoryReso... PowerShellModule               0.3        {Name, SourceLocation, DependsOn, Ensure...}
PowerShell      PSModuleResource          PowerShellModule               0.3        {Module_Name, DependsOn, Ensure, InstallScope...}
PowerShell      Archive                   PSDesiredStateConfiguration    1.1        {Destination, Path, Checksum, Credential...}
PowerShell      Environment               PSDesiredStateConfiguration    1.1        {Name, DependsOn, Ensure, Path...}
PowerShell      Group                     PSDesiredStateConfiguration    1.1        {GroupName, Credential, DependsOn, Description...}
Composite       GroupSet                  PSDesiredStateConfiguration    1.1        {DependsOn, PsDscRunAsCredential, GroupName, En...
Binary          Log                       PSDesiredStateConfiguration    1.1        {Message, DependsOn, PsDscRunAsCredential}
PowerShell      Package                   PSDesiredStateConfiguration    1.1        {Name, Path, ProductId, Arguments...}
Composite       ProcessSet                PSDesiredStateConfiguration    1.1        {DependsOn, PsDscRunAsCredential, Path, Credent...
PowerShell      Registry                  PSDesiredStateConfiguration    1.1        {Key, ValueName, DependsOn, Ensure...}
PowerShell      Script                    PSDesiredStateConfiguration    1.1        {GetScript, SetScript, TestScript, Credential...}
PowerShell      Service                   PSDesiredStateConfiguration    1.1        {Name, BuiltInAccount, Credential, Dependencies...
Composite       ServiceSet                PSDesiredStateConfiguration    1.1        {DependsOn, PsDscRunAsCredential, Name, Startup...
PowerShell      User                      PSDesiredStateConfiguration    1.1        {UserName, DependsOn, Description, Disabled...}
PowerShell      WaitForAll                PSDesiredStateConfiguration    1.1        {NodeName, ResourceName, DependsOn, PsDscRunAsC...
PowerShell      WaitForAny                PSDesiredStateConfiguration    1.1        {NodeName, ResourceName, DependsOn, PsDscRunAsC...
PowerShell      WaitForSome               PSDesiredStateConfiguration    1.1        {NodeCount, NodeName, ResourceName, DependsOn...}
PowerShell      WindowsFeature            PSDesiredStateConfiguration    1.1        {Name, Credential, DependsOn, Ensure...}
Composite       WindowsFeatureSet         PSDesiredStateConfiguration    1.1        {DependsOn, PsDscRunAsCredential, Name, Ensure...}
PowerShell      WindowsOptionalFeature    PSDesiredStateConfiguration    1.1        {Name, DependsOn, Ensure, LogLevel...}
Composite       WindowsOptionalFeatureSet PSDesiredStateConfiguration    1.1        {DependsOn, PsDscRunAsCredential, Name, Ensure...}
PowerShell      WindowsPackageCab         PSDesiredStateConfiguration    1.1        {Ensure, Name, SourcePath, DependsOn...}
PowerShell      WindowsProcess            PSDesiredStateConfiguration    1.1        {Arguments, Path, Credential, DependsOn...}
PowerShell      Archive                   PSDscResources                 2.8.0.0    {Destination, Path, Checksum, Credential...}
PowerShell      Environment               PSDscResources                 2.8.0.0    {Name, DependsOn, Ensure, Path...}
PowerShell      Group                     PSDscResources                 2.8.0.0    {GroupName, Credential, DependsOn, Description...}
PowerShell      MsiPackage                PSDscResources                 2.8.0.0    {Path, ProductId, Arguments, Credential...}
PowerShell      Registry                  PSDscResources                 2.8.0.0    {Key, ValueName, DependsOn, Ensure...}
PowerShell      Script                    PSDscResources                 2.8.0.0    {GetScript, SetScript, TestScript, Credential...}
PowerShell      Service                   PSDscResources                 2.8.0.0    {Name, BuiltInAccount, Credential, Dependencies...
PowerShell      User                      PSDscResources                 2.8.0.0    {UserName, DependsOn, Description, Disabled...}
PowerShell      WindowsFeature            PSDscResources                 2.8.0.0    {Name, Credential, DependsOn, Ensure...}
PowerShell      WindowsOptionalFeature    PSDscResources                 2.8.0.0    {Name, DependsOn, Ensure, LogLevel...}
PowerShell      WindowsPackageCab         PSDscResources                 2.8.0.0    {Ensure, Name, SourcePath, DependsOn...}
PowerShell      WindowsProcess            PSDscResources                 2.8.0.0    {Arguments, Path, Credential, DependsOn...}
PowerShell      xCertificateExport        xCertificate                   3.0.0.0    {Path, AllowExpired, ChainOption, DependsOn...}
PowerShell      xCertificateImport        xCertificate                   3.0.0.0    {Location, Path, Store, Thumbprint...}
PowerShell      xCertReq                  xCertificate                   3.0.0.0    {Subject, AutoRenew, CARootName, CAServerFQDN...}
PowerShell      xPfxImport                xCertificate                   3.0.0.0    {Location, Path, Store, Thumbprint...}
PowerShell      xWaitForCertificateSer... xCertificate                   3.0.0.0    {CARootName, CAServerFQDN, DependsOn, PsDscRunA...
PowerShell      xComputer                 xComputerManagement            3.0.0.0    {Name, Credential, DependsOn, Description...}
PowerShell      xOfflineDomainJoin        xComputerManagement            3.0.0.0    {IsSingleInstance, RequestFile, DependsOn, PsDs...
PowerShell      xPowerPlan                xComputerManagement            3.0.0.0    {IsSingleInstance, Name, DependsOn, PsDscRunAsC...
PowerShell      xScheduledTask            xComputerManagement            3.0.0.0    {ActionExecutable, ScheduleType, TaskName, Acti...
PowerShell      xVirtualMemory            xComputerManagement            3.0.0.0    {Drive, Type, DependsOn, InitialSize...}
PowerShell      xDefaultGatewayAddress    xNetworking                    5.2.0.0    {AddressFamily, InterfaceAlias, Address, Depend...
PowerShell      xDHCPClient               xNetworking                    5.2.0.0    {AddressFamily, InterfaceAlias, State, DependsO...
PowerShell      xDnsClientGlobalSetting   xNetworking                    5.2.0.0    {IsSingleInstance, DependsOn, DevolutionLevel, ...
PowerShell      xDnsConnectionSuffix      xNetworking                    5.2.0.0    {ConnectionSpecificSuffix, InterfaceAlias, Depe...
PowerShell      xDNSServerAddress         xNetworking                    5.2.0.0    {AddressFamily, InterfaceAlias, Address, Depend...
PowerShell      xFirewall                 xNetworking                    5.2.0.0    {Name, Action, Authentication, DependsOn...}
PowerShell      xFirewallProfile          xNetworking                    5.2.0.0    {Name, AllowInboundRules, AllowLocalFirewallRul...
PowerShell      xHostsFile                xNetworking                    5.2.0.0    {HostName, DependsOn, Ensure, IPAddress...}
PowerShell      xIPAddress                xNetworking                    5.2.0.0    {AddressFamily, InterfaceAlias, DependsOn, IPAd...
PowerShell      xNetAdapterBinding        xNetworking                    5.2.0.0    {ComponentId, InterfaceAlias, DependsOn, PsDscR...
PowerShell      xNetAdapterLso            xNetworking                    5.2.0.0    {Name, Protocol, State, DependsOn...}
PowerShell      xNetAdapterName           xNetworking                    5.2.0.0    {NewName, DependsOn, DriverDescription, IgnoreM...
PowerShell      xNetAdapterRDMA           xNetworking                    5.2.0.0    {Name, DependsOn, Enabled, PsDscRunAsCredential}
PowerShell      xNetAdapterRsc            xNetworking                    5.2.0.0    {Name, Protocol, State, DependsOn...}
PowerShell      xNetAdapterRss            xNetworking                    5.2.0.0    {Enabled, Name, DependsOn, PsDscRunAsCredential}
PowerShell      xNetBIOS                  xNetworking                    5.2.0.0    {InterfaceAlias, Setting, DependsOn, PsDscRunAs...
PowerShell      xNetConnectionProfile     xNetworking                    5.2.0.0    {InterfaceAlias, DependsOn, IPv4Connectivity, I...
PowerShell      xNetworkTeam              xNetworking                    5.2.0.0    {Name, TeamMembers, DependsOn, Ensure...}
PowerShell      xNetworkTeamInterface     xNetworking                    5.2.0.0    {Name, TeamName, DependsOn, Ensure...}
PowerShell      xRoute                    xNetworking                    5.2.0.0    {AddressFamily, DestinationPrefix, InterfaceAli...
PowerShell      xRemoteDesktopAdmin       xRemoteDesktopAdmin            1.1.0.0    {Ensure, DependsOn, PsDscRunAsCredential, UserA...

Anyone have any ideas?

Group: Creates error on forcing members for builtin Administrators group

Symptom

MSFT_GroupResource will create the following error, if memebers for the builtin group Administrators will be forced via the "Members" attribute

Error Message is Exception calling "Save" with "0" argument(s): "Cannot perform this operation on built-in accounts.

Steps to reproduce

  1. Create a DSC Configuration
  2. Use the Group resssource and force the memebrs of teh Administrators group to the following contents:
Group GroupExample
{
    Ensure = "Present"
    GroupName = "Administrators"
    Members = @( ".\Administrator", "<Domain>\<SamAccountName>")
}
  1. Apply the configuration to the node

Analysis

By tracking down the error the deletion of all members of a group via $group.Members.Clear() could be assigned as the culprit of the error. The latter issued command $group.Save() will first submit the clear() command to the group which will be prevented by the OS because the Administrators group must contain at least contain the local administrator account from the node (localhost). The Administrators group cannot be empty.

Fix

Instead of simply deleteing all members from the group and reassigning the ones from the input parameter Members the implementation must merge the group members between the current members of the group and the input parameter. The following changes has been applied to MSFT_GroupResource.psm1 to resolve the error:

New (internal) function:

function MergeGroupMembers
{
    [OutputType([bool])]
    param
    (
        [System.DirectoryServices.AccountManagement.GroupPrincipal] $Group,
        [System.DirectoryServices.AccountManagement.Principal[]] $Principals
    )
    Set-StrictMode -Version Latest
    [bool] $updated = $false
    if ($Principals -ne $null)
    {        
        foreach($principal in $Principals)
        {
            if ($group.Members.Contains($principal))
            {
                continue
            }	    
            Write-Verbose ("Adding principal [$principal] to group [$group]")	    
            $group.Members.Add($principal)
            $updated = $true
        }
        foreach($principal in @($group.Members)) 
        {
            if ($Principals.Contains($principal))
            {
                continue
            }	    
            if ($group.Sid -eq "S-1-5-32-544" -and $principal.Sid -like "S-1-5-21-*-500") {
                Write-Verbose ("Skipping local admin account [$principal] for administrators group [$group]")
                continue
            }
            Write-Verbose ("Removing principal [$principal] from group [$group]")
            $group.Members.Remove($principal)
            $updated = $true
        }
    }
    return $updated
}

Changed the code startign at line 446 as following

if ((MergeGroupMembers -Group $group -Principals $expectedPrincipals) -eq $true)
{
      $saveChanges = $true
}

Remarks

Find attached a zip file with additional information.
MSFT_GroupResource_Error.zip

Service: Resource missing Recovery Options

I'm currently having to implement this manually using the Script Resource with sc.exe, however the TestScript resource is really hacky relies on parsing standard output from sc.exe qfailure "MyService", unfortutantly the Get-Service cmdlet is missing many of the ScriptProperties required to test the state (such as FirstFailure, SecondFailure) on Windows Server 2012 R2 Foundation PS 5.1 (works on Windows 10).

There is a Carbon resource for this but it does not support supplying arguments to the service execution path. Has anybody else tackled this issue?

Out of curiosity, what is the process for merging bugs/features from the xPSDesiredStateConfiguration to PSDscResources and vice versa? It seems like all of the bugs/missing essential features I've encountered apply to both repositories.

Importing PSDscResources to Azure Automation DSC fails

When trying to import the PSDscResources module to Azure Automation, it fails with the following error:

Error extracting the activities from module PSDscResources. Extraction failed with the following error: Orchestrator.Shared.AsyncModuleImport.ModuleImportException: An error occurred during module validation. When importing the module to an internal PowerShell session, it was not able to be loaded by PowerShell. There is likely an issue with the contents of the module that results in PowerShell's not being able to load it. Please verify that the module imports successfully in a local PowerShell session, correct any issues, and then try importing again.

MSFT_Archeive Resource failed to executed Test-TargetResource functionality

Hi,

I am attempting to use the DSC Archive Resource but I am running into this error message.

Failed to executed Test-TargetResource functionality with error message: An error occurred while opening the file C:\Program Files (x86)\longpath\VMUtil.pm

I was able to unzip the file manually and use the File Resourse to move the files with out issue. I would prefer to use the Archive Resource instead on manually unzipping the zip files.

Archive: Subfolder of archive

In MSFT_Archive, is it possible to only extract a sub folder or sub item from an archive? How so? If not, could this be a feature request?

Get-InvalidArgumentRecord params should match New-InvalidArgumentException

I've been copying a lot of the code from the CommonResourceHelper.psm1 and CommonTestsHelper.psm1 into some of the other DSC Resources (starting with FSRMDsc) and have noticed that the parameters and design of these functions is different. It would make them much easier to use (IMHO) if they matched.

For example I think this would be better:

function Get-InvalidArgumentRecord
{
    [CmdletBinding()]
    param
    (
        [Parameter(Mandatory = $true)]
        [ValidateNotNullOrEmpty()]
        [String]
        $Message,

        [Parameter(Mandatory = $true)]
        [ValidateNotNullOrEmpty()]
        [String]
        $ArgumentName
    )

    $argumentException = New-Object `
        -TypeName 'ArgumentException' `
        -ArgumentList @( $Message,$ArgumentName )
    $newObjectParams = @{
        TypeName = 'System.Management.Automation.ErrorRecord'
        ArgumentList = @( $argumentException, $ArgumentName, 'InvalidArgument', $null )
    }
    return New-Object @newObjectParams
}

This would mean that the call to throw the exception would be identical (except for the cmdlet name) to the call to create the ErrorRecord to use in a unit test.

This is definitely a minor thing, but as I'm adopting this across more and more resources it would make it way easier 😄

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.