Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Release of version 2.4.0.0 of PSDscResources #33

Merged
merged 30 commits into from
Feb 3, 2017
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
2407d5f
Port changes from xPSDesiredStateConfiguration
kwirkykat Jan 26, 2017
7e36235
Merge pull request #27 from kwirkykat/PortChangesFromxPSDSC
kwirkykat Jan 27, 2017
e8a2278
adding updates to User resource
mbreakey3 Dec 20, 2016
a92c5e9
commenting out type that is not recognized right now on AppVeyor
mbreakey3 Dec 20, 2016
7ab6633
commenting out output type that is not recognized by appVeyor right now
mbreakey3 Dec 20, 2016
025e42a
skipping test with New-LocalUser
mbreakey3 Dec 20, 2016
37074f8
skipping set Unit tests for Nano for now
mbreakey3 Dec 20, 2016
eed8579
updating readme
mbreakey3 Jan 11, 2017
5340133
review changes
mbreakey3 Jan 27, 2017
37d36e9
simplifying logic in helper function
mbreakey3 Jan 28, 2017
836d329
Merge pull request #24 from mbreakey3/user
mbreakey3 Jan 28, 2017
55e141f
Attempt 2 to install WMF 5.1
kwirkykat Jan 25, 2017
891ea0f
Merge pull request #28 from kwirkykat/InstallWMF5Dot1
kwirkykat Feb 1, 2017
d917fd1
Fix issue where group members are retrieved when no members are speci…
kwirkykat Jan 27, 2017
ae6f46a
Add integration test for built-in Users group
kwirkykat Feb 1, 2017
291a32a
Merge pull request #29 from kwirkykat/FixGroupMembersBug
kwirkykat Feb 3, 2017
0911993
adding environment
mbreakey3 Feb 2, 2017
a24728c
updating environment files
mbreakey3 Feb 3, 2017
e011b1d
fixing folder name
mbreakey3 Feb 3, 2017
94e0d15
switching single quotes back to double quotes
mbreakey3 Feb 3, 2017
62e06a9
fixing a few minor errors
mbreakey3 Feb 3, 2017
bac6ee4
Merge pull request #30 from mbreakey3/environment
kwirkykat Feb 3, 2017
e9df7cd
Add NT Service to list of local scopes
kwirkykat Feb 3, 2017
ffd2a3e
Add BuiltIn to list of local scopes
kwirkykat Feb 3, 2017
fd28c35
Update resource name in integration test configuration
kwirkykat Feb 3, 2017
f147a9a
Merge pull request #31 from kwirkykat/FixGroupBug2
kwirkykat Feb 3, 2017
9db496a
getting rid of unneeded import
mbreakey3 Feb 3, 2017
5ad76f9
Merge pull request #32 from mbreakey3/environment
kwirkykat Feb 3, 2017
4bc7334
Releasing version 2.4.0.0
kwirkykat Feb 3, 2017
e162c37
Update appveyor.yml for release
kwirkykat Feb 3, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions DscResources/MSFT_RegistryResource/MSFT_RegistryResource.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -994,8 +994,10 @@ function New-RegistryKey
$RegistryKeyPath
)

$parentRegistryKeyPath = Split-Path -Path $RegistryKeyPath -Parent
$newRegistryKeyName = Split-Path -Path $RegistryKeyPath -Leaf
# Registry key names can contain forward slashes, so we can't use Split-Path here (it will split on /)
$indexOfLastBackslash = $RegistryKeyPath.LastIndexOf('\')
$parentRegistryKeyPath = $RegistryKeyPath.Substring(0, $indexOfLastBackslash)
$newRegistryKeyName = $RegistryKeyPath.Substring($indexOfLastBackslash + 1)

$parentRegistryKey = Get-RegistryKey -RegistryKeyPath $parentRegistryKeyPath -WriteAccessAllowed

Expand Down
47 changes: 26 additions & 21 deletions DscResources/MSFT_WindowsProcess/MSFT_WindowsProcess.psm1
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
$errorActionPreference = 'Stop'
Set-StrictMode -Version 'Latest'

Import-Module -Name (Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) `
-ChildPath 'CommonResourceHelper.psm1')
# Import CommonResourceHelper for Get-LocalizedData, New-InvalidOperationException, New-InvalidArgumentException
$script:dscResourcesFolderFilePath = Split-Path $PSScriptRoot -Parent
$script:commonResourceHelperFilePath = Join-Path -Path $script:dscResourcesFolderFilePath -ChildPath 'CommonResourceHelper.psm1'
Import-Module -Name $script:commonResourceHelperFilePath

# Localized messages for verbose and error statements in this resource
$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_WindowsProcess'
Expand All @@ -19,8 +21,8 @@ $script:localizedData = Get-LocalizedData -ResourceName 'MSFT_WindowsProcess'
The path to the process executable. If this is the file name of the executable
(not the fully qualified path), the DSC resource will search the environment Path variable
($env:Path) to find the executable file. If the value of this property is a fully qualified
path, DSC will not use the Path environment variable to find the file, and will throw an
error if the path does not exist. Relative paths are not allowed.
path, DSC will use the given Path variable to find the file. If the path is not found it
will throw an error. Relative paths are not allowed.

.PARAMETER Arguments
The arguments to the process as a single string.
Expand Down Expand Up @@ -109,11 +111,11 @@ function Get-TargetResource
The path to the process executable. If this is the file name of the executable
(not the fully qualified path), the DSC resource will search the environment Path variable
($env:Path) to find the executable file. If the value of this property is a fully qualified
path, DSC will not use the Path environment variable to find the file, and will throw an
error if the path does not exist. Relative paths are not allowed.
path, DSC will use the given Path variable to find the file. If the path is not found it
will throw an error. Relative paths are not allowed.

.PARAMETER Arguments
The arguments to the process as a single string.
The arguments to pass to the process as a single string.

.PARAMETER Credential
The credential of the user account to start the process under.
Expand Down Expand Up @@ -391,11 +393,11 @@ function Set-TargetResource
The path to the process executable. If this is the file name of the executable
(not the fully qualified path), the DSC resource will search the environment Path variable
($env:Path) to find the executable file. If the value of this property is a fully qualified
path, DSC will not use the Path environment variable to find the file, and will throw an
error if the path does not exist. Relative paths are not allowed.
path, DSC will use the given Path variable to find the file. If the path is not found it
will throw an error. Relative paths are not allowed.

.PARAMETER Arguments
The arguments to the process as a single string.
The arguments to pass to the process as a single string.

.PARAMETER Credential
The credential of the user account the process should be running under.
Expand Down Expand Up @@ -685,17 +687,22 @@ function Get-ProcessOwner
$Process
)

$owner = Get-ProcessOwnerCimInstance -Process $Process
$owner = Get-ProcessOwnerCimInstance -Process $Process -ErrorAction 'SilentlyContinue'

if ($null -ne $owner.Domain)
{
return ($owner.Domain + '\' + $owner.User)
}
else
if ($null -ne $owner)
{
# return the default domain
return ($env:computerName + '\' + $owner.User)
if ($null -ne $owner.Domain)
{
return ($owner.Domain + '\' + $owner.User)
}
else
{
# return the default domain
return ($env:computerName + '\' + $owner.User)
}
}

return ''
}

<#
Expand All @@ -721,7 +728,7 @@ function Get-ProcessOwnerCimInstance
$Process
)

return Invoke-CimMethod -InputObject $Process -MethodName 'GetOwner'
return Invoke-CimMethod -InputObject $Process -MethodName 'GetOwner' -ErrorAction 'SilentlyContinue'
}

<#
Expand Down Expand Up @@ -1482,5 +1489,3 @@ namespace PSDesiredStateConfiguration
# if not on Nano:
Add-Type -TypeDefinition $dscNativeMethodsSource -ReferencedAssemblies 'System.ServiceProcess'
}

Export-ModuleMember -Function *-TargetResource
Loading