Skip to content

Commit

Permalink
Merge pull request #76 from PlagueHO/Issue-74
Browse files Browse the repository at this point in the history
Refactored to remove harness structure - Fixes #74
  • Loading branch information
PlagueHO committed Sep 4, 2018
2 parents 02ff46e + e1dc262 commit cb2ea83
Show file tree
Hide file tree
Showing 74 changed files with 650 additions and 363 deletions.
11 changes: 0 additions & 11 deletions .vscode/RunAllTests.ps1

This file was deleted.

53 changes: 53 additions & 0 deletions .vscode/analyzersettings.psd1
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
@{
<#
For the custom rules to work, the DscResource.Tests repo must be
cloned. It is automatically clone as soon as any unit or
integration tests are run.
#>
CustomRulePath = '.\DSCResource.Tests\DscResource.AnalyzerRules'

IncludeRules = @(
# DSC Resource Kit style guideline rules.
'PSAvoidDefaultValueForMandatoryParameter',
'PSAvoidDefaultValueSwitchParameter',
'PSAvoidInvokingEmptyMembers',
'PSAvoidNullOrEmptyHelpMessageAttribute',
'PSAvoidUsingCmdletAliases',
'PSAvoidUsingComputerNameHardcoded',
'PSAvoidUsingDeprecatedManifestFields',
'PSAvoidUsingEmptyCatchBlock',
'PSAvoidUsingInvokeExpression',
'PSAvoidUsingPositionalParameters',
'PSAvoidShouldContinueWithoutForce',
'PSAvoidUsingWMICmdlet',
'PSAvoidUsingWriteHost',
'PSDSCReturnCorrectTypesForDSCFunctions',
'PSDSCStandardDSCFunctionsInResource',
'PSDSCUseIdenticalMandatoryParametersForDSC',
'PSDSCUseIdenticalParametersForDSC',
'PSMisleadingBacktick',
'PSMissingModuleManifestField',
'PSPossibleIncorrectComparisonWithNull',
'PSProvideCommentHelp',
'PSReservedCmdletChar',
'PSReservedParams',
'PSUseApprovedVerbs',
'PSUseCmdletCorrectly',
'PSUseOutputTypeCorrectly',
'PSAvoidGlobalVars',
'PSAvoidUsingConvertToSecureStringWithPlainText',
'PSAvoidUsingPlainTextForPassword',
'PSAvoidUsingUsernameAndPasswordParams',
'PSDSCUseVerboseMessageInDSCResource',
'PSShouldProcess',
'PSUseDeclaredVarsMoreThanAssignments',
'PSUsePSCredentialType',

<#
This is to test all the DSC Resource Kit custom rules.
The name of the function-blocks of each custom rule start
with 'Measure*'.
#>
'Measure-*'
)
}
19 changes: 0 additions & 19 deletions .vscode/launch.json

This file was deleted.

3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
"powershell.codeFormatting.ignoreOneLineBlock": false,
"powershell.codeFormatting.preset": "Custom",
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true
"files.insertFinalNewline": true,
"powershell.scriptAnalysis.settingsPath": ".vscode\\analyzersettings.psd1"
}
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## Unreleased

- Refactored module folder structure to move resource to root folder of
repository and remove test harness - fixes [Issue #74](https://github.com/PowerShell/DfsDsc/issues/74).
- Updated Examples to support deployment to PowerShell Gallery scripts.
- Remove exclusion of all tags in appveyor.yml, so all common tests can be run
if opt-in.
- Added .VSCode settings for applying DSC PSSA rules - fixes [Issue #75](https://github.com/PowerShell/DfsDsc/issues/75).

## 4.1.0.0

- Added Hub and Spoke replication group example - fixes [Issue #62](https://github.com/PowerShell/DFSDsc/issues/62).
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,25 +1,40 @@
<#PSScriptInfo
.VERSION 1.0.0
.GUID c99703be-abb1-424a-a856-b69af295ccfe
.AUTHOR Microsoft Corporation
.COMPANYNAME Microsoft Corporation
.COPYRIGHT
.TAGS DSCConfiguration
.LICENSEURI https://github.com/PowerShell/DfsDsc/blob/master/LICENSE
.PROJECTURI https://github.com/PowerShell/DfsDsc
.ICONURI
.EXTERNALMODULEDEPENDENCIES
.REQUIREDSCRIPTS
.EXTERNALSCRIPTDEPENDENCIES
.RELEASENOTES First version.
.PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core
#>

#Requires -module DfsDsc

<#
.EXAMPLE
Create an AD Domain V2 based DFS namespace called software in the domain contoso.com with
a three targets on the servers ca-fileserver, ma-fileserver and ny-fileserver. It also
creates a IT folder in each namespace.
.DESCRIPTION
Create an AD Domain V2 based DFS namespace called software in the domain contoso.com with
a three targets on the servers ca-fileserver, ma-fileserver and ny-fileserver. It also
creates a IT folder in each namespace.
#>
Configuration Example
Configuration DFSNamespaceFolder_Domain_MultipleTarget_Config
{
param
(
[Parameter()]
[System.String[]]
$NodeName = 'localhost',

[Parameter()]
[PSCredential]
$Credential
)

Import-DscResource -ModuleName 'DFSDsc'

Node $NodeName
Node localhost
{
<#
Install the Prerequisite features first
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,40 @@
<#PSScriptInfo
.VERSION 1.0.0
.GUID 9f8adea6-6aed-42e8-a87a-10ba1d93e732
.AUTHOR Microsoft Corporation
.COMPANYNAME Microsoft Corporation
.COPYRIGHT
.TAGS DSCConfiguration
.LICENSEURI https://github.com/PowerShell/DfsDsc/blob/master/LICENSE
.PROJECTURI https://github.com/PowerShell/DfsDsc
.ICONURI
.EXTERNALMODULEDEPENDENCIES
.REQUIREDSCRIPTS
.EXTERNALSCRIPTDEPENDENCIES
.RELEASENOTES First version.
.PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core
#>

#Requires -module DfsDsc

<#
.EXAMPLE
Create an AD Domain V2 based DFS namespace called departments in the domain contoso.com
with a single root target on the computer fs_1. Two sub-folders are defined under the
departments folder with targets that direct to shares on servers fs_3 and fs_8.
.DESCRIPTION
Create an AD Domain V2 based DFS namespace called departments in the domain contoso.com
with a single root target on the computer fs_1. Two sub-folders are defined under the
departments folder with targets that direct to shares on servers fs_3 and fs_8.
#>
Configuration Example
Configuration DFSNamespaceFolder_Domain_SingleTarget_Config
{
param
(
[Parameter()]
[System.String[]]
$NodeName = 'localhost',

[Parameter()]
[PSCredential]
$Credential
)

Import-DscResource -ModuleName 'DFSDsc'

Node $NodeName
Node localhost
{
<#
Install the Prerequisite features first
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,40 @@
<#PSScriptInfo
.VERSION 1.0.0
.GUID 3a26d1aa-17d0-40e7-8900-e9bf21662b46
.AUTHOR Microsoft Corporation
.COMPANYNAME Microsoft Corporation
.COPYRIGHT
.TAGS DSCConfiguration
.LICENSEURI https://github.com/PowerShell/DfsDsc/blob/master/LICENSE
.PROJECTURI https://github.com/PowerShell/DfsDsc
.ICONURI
.EXTERNALMODULEDEPENDENCIES
.REQUIREDSCRIPTS
.EXTERNALSCRIPTDEPENDENCIES
.RELEASENOTES First version.
.PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core
#>

#Requires -module DfsDsc

<#
.EXAMPLE
Create a standalone DFS namespace using FQDN called public on the server
fileserver1.contoso.com. A namespace folder called brochures is also created in this
namespace that targets the \\fileserver2.contoso.com\brochures share.
.DESCRIPTION
Create a standalone DFS namespace using FQDN called public on the server
fileserver1.contoso.com. A sub-folder called brochures is also created in
this namespace that targets the \\fileserver2.contoso.com\brochures share.
#>
Configuration Example
Configuration DFSNamespaceFolder_Standalone_FQDN_Config
{
param
(
[Parameter()]
[System.String[]]
$NodeName = 'localhost',

[Parameter()]
[PSCredential]
$Credential
)

Import-DscResource -ModuleName 'DFSDsc'

Node $NodeName
Node localhost
{
<#
Install the Prerequisite features first
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,40 @@
<#PSScriptInfo
.VERSION 1.0.0
.GUID 7bacca7a-9602-4af1-98d5-ba35d4af1290
.AUTHOR Microsoft Corporation
.COMPANYNAME Microsoft Corporation
.COPYRIGHT
.TAGS DSCConfiguration
.LICENSEURI https://github.com/PowerShell/DfsDsc/blob/master/LICENSE
.PROJECTURI https://github.com/PowerShell/DfsDsc
.ICONURI
.EXTERNALMODULEDEPENDENCIES
.REQUIREDSCRIPTS
.EXTERNALSCRIPTDEPENDENCIES
.RELEASENOTES First version.
.PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core
#>

#Requires -module DfsDsc

<#
.EXAMPLE
Create a standalone DFS namespace called public on the server fileserver1. A namespace
folder called brochures is also created in this namespace that targets the
\\fileserver2\brochures share.
.DESCRIPTION
Create a standalone DFS namespace called public on the server fileserver1. A namespace
folder called brochures is also created in this namespace that targets the
\\fileserver2\brochures share.
#>
Configuration Example
Configuration DFSNamespaceFolder_Standalone_Config
{
param
(
[Parameter()]
[System.String[]]
$NodeName = 'localhost',

[Parameter()]
[PSCredential]
$Credential
)

Import-DscResource -ModuleName 'DFSDsc'

Node $NodeName
Node localhost
{
<#
Install the Prerequisite features first
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,40 @@
<#PSScriptInfo
.VERSION 1.0.0
.GUID f79dac3a-89dd-4a46-95cf-02be7f029cd5
.AUTHOR Microsoft Corporation
.COMPANYNAME Microsoft Corporation
.COPYRIGHT
.TAGS DSCConfiguration
.LICENSEURI https://github.com/PowerShell/DfsDsc/blob/master/LICENSE
.PROJECTURI https://github.com/PowerShell/DfsDsc
.ICONURI
.EXTERNALMODULEDEPENDENCIES
.REQUIREDSCRIPTS
.EXTERNALSCRIPTDEPENDENCIES
.RELEASENOTES First version.
.PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core
#>

#Requires -module DfsDsc

<#
.EXAMPLE
Create an AD Domain V2 based DFS namespace called software in the domain contoso.com with
a three targets on the servers ca-fileserver, ma-fileserver and ny-fileserver. It also
creates a IT folder in each namespace.
.DESCRIPTION
Create an AD Domain V2 based DFS namespace called software in the domain contoso.com with
a three targets on the servers ca-fileserver, ma-fileserver and ny-fileserver. It also
creates a IT folder in each namespace.
#>
Configuration Example
Configuration DFSNamespaceRoot_Domain_MultipleTarget_Config
{
param
(
[Parameter()]
[System.String[]]
$NodeName = 'localhost',

[Parameter()]
[PSCredential]
$Credential
)

Import-DscResource -ModuleName 'DFSDsc'

Node $NodeName
Node localhost
{
<#
Install the Prerequisite features first
Expand Down

0 comments on commit cb2ea83

Please sign in to comment.