Skip to content

Commit

Permalink
Converted Examples to format required for Publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
PlagueHO committed Feb 21, 2019
1 parent c7ef00d commit 8252c09
Show file tree
Hide file tree
Showing 71 changed files with 1,453 additions and 1,007 deletions.
4 changes: 3 additions & 1 deletion .MetaTestOptIn.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
"Common Tests - Validate Markdown Files",
"Common Tests - Validate Example Files",
"Common Tests - Validate Module Files",
"Common Tests - Validate Script Files"
"Common Tests - Validate Script Files",
"Common Tests - Validate Example Files To Be Published",
"Common Tests - Validate Markdown Links"
]
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
- Moved strings in localization file.
- LogMode is now set with Limit-EventLog,
- Fixes [Issue #18](https://github.com/PowerShell/ComputerManagementDsc/issues/18).
- Updated examples to format required for publishing to PowerShell Gallery - fixes
[Issue #206](https://github.com/PowerShell/ComputerManagementDsc/issues/206).
- Opted into Common Tests 'Validate Example Files To Be Published' and
'Validate Markdown Links'.

## 6.1.0.0

Expand Down
2 changes: 1 addition & 1 deletion Modules/ComputerManagementDsc/ComputerManagementDsc.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Author = 'Microsoft Corporation'
CompanyName = 'Microsoft Corporation'

# Copyright statement for this module
Copyright = '(c) 2018 Microsoft Corporation. All rights reserved.'
Copyright = '(c) Microsoft Corporation. All rights reserved.'

# Description of the functionality provided by this module
Description = 'The ComputerManagementDsc module is originally part of the Windows PowerShell Desired State Configuration (DSC) Resource Kit. This version has been modified for use in Azure. This module contains the xComputer and xDisk resources. These DSC Resources allow you to perform computer management tasks, like joining a domain or initializing disks.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<#PSScriptInfo
.VERSION 1.0.0
.GUID 594bfeff-8e83-4cc4-8141-f3b39795c85b
.AUTHOR Microsoft Corporation
.COMPANYNAME Microsoft Corporation
.COPYRIGHT (c) Microsoft Corporation. All rights reserved.
.TAGS DSCConfiguration
.LICENSEURI https://github.com/PowerShell/ComputerManagementDsc/blob/master/LICENSE
.PROJECTURI https://github.com/PowerShell/ComputerManagementDsc
.ICONURI
.EXTERNALMODULEDEPENDENCIES
.REQUIREDSCRIPTS
.EXTERNALSCRIPTDEPENDENCIES
.RELEASENOTES First version.
.PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core
#>

#Requires -module ComputerManagementDsc

<#
.DESCRIPTION
This configuration will set the computer name to 'Server01'
and make it part of 'ContosoWorkgroup' Workgroup.
#>
Configuration Computer_RenameComputerAndSetWorkgroup_Config
{
Import-DscResource -Module ComputerManagementDsc

Node localhost
{
Computer NewNameAndWorkgroup
{
Name = 'Server01'
WorkGroupName = 'ContosoWorkgroup'
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<#PSScriptInfo
.VERSION 1.0.0
.GUID a8b9b735-a13d-4901-8edd-a2eb3a589183
.AUTHOR Microsoft Corporation
.COMPANYNAME Microsoft Corporation
.COPYRIGHT (c) Microsoft Corporation. All rights reserved.
.TAGS DSCConfiguration
.LICENSEURI https://github.com/PowerShell/ComputerManagementDsc/blob/master/LICENSE
.PROJECTURI https://github.com/PowerShell/ComputerManagementDsc
.ICONURI
.EXTERNALMODULEDEPENDENCIES
.REQUIREDSCRIPTS
.EXTERNALSCRIPTDEPENDENCIES
.RELEASENOTES First version.
.PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core
#>

#Requires -module ComputerManagementDsc

<#
.DESCRIPTION
This configuration sets the machine name to 'Server01' and
joins the 'Contoso' domain.
Note: this requires an AD credential to join the domain.
#>
Configuration Computer_JoinDomain_Config
{
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullorEmpty()]
[System.Management.Automation.PSCredential]
$Credential
)

Import-DscResource -Module ComputerManagementDsc

Node localhost
{
Computer JoinDomain
{
Name = 'Server01'
DomainName = 'Contoso'
Credential = $Credential # Credential to join to domain
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<#PSScriptInfo
.VERSION 1.0.0
.GUID 7e77ef8f-69ac-4e86-8a95-e38d3350118f
.AUTHOR Microsoft Corporation
.COMPANYNAME Microsoft Corporation
.COPYRIGHT (c) Microsoft Corporation. All rights reserved.
.TAGS DSCConfiguration
.LICENSEURI https://github.com/PowerShell/ComputerManagementDsc/blob/master/LICENSE
.PROJECTURI https://github.com/PowerShell/ComputerManagementDsc
.ICONURI
.EXTERNALMODULEDEPENDENCIES
.REQUIREDSCRIPTS
.EXTERNALSCRIPTDEPENDENCIES
.RELEASENOTES First version.
.PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core
#>

#Requires -module ComputerManagementDsc

<#
.DESCRIPTION
This example will change the machines name 'Server01' while remaining
joined to the current domain.
Note: this requires a credential for renaming the machine on the
domain.
#>
Configuration Computer_RenameComputerInDomain_Config
{
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullorEmpty()]
[System.Management.Automation.PSCredential]
$Credential
)

Import-DscResource -Module ComputerManagementDsc

Node localhost
{
Computer NewName
{
Name = 'Server01'
Credential = $Credential # Domain credential
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<#PSScriptInfo
.VERSION 1.0.0
.GUID 7a5bc1c3-5229-48ec-9145-816d02e4544d
.AUTHOR Microsoft Corporation
.COMPANYNAME Microsoft Corporation
.COPYRIGHT (c) Microsoft Corporation. All rights reserved.
.TAGS DSCConfiguration
.LICENSEURI https://github.com/PowerShell/ComputerManagementDsc/blob/master/LICENSE
.PROJECTURI https://github.com/PowerShell/ComputerManagementDsc
.ICONURI
.EXTERNALMODULEDEPENDENCIES
.REQUIREDSCRIPTS
.EXTERNALSCRIPTDEPENDENCIES
.RELEASENOTES First version.
.PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core
#>

#Requires -module ComputerManagementDsc

<#
.DESCRIPTION
This example will set the machine name to 'Server01' while remaining
in the workgroup.
#>
Configuration Computer_RenameComputerInWorkgroup_Config
{
Import-DscResource -Module ComputerManagementDsc

Node localhost
{
Computer NewName
{
Name = 'Server01'
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<#PSScriptInfo
.VERSION 1.0.0
.GUID 9625caff-9065-4d04-9585-934998d81591
.AUTHOR Microsoft Corporation
.COMPANYNAME Microsoft Corporation
.COPYRIGHT (c) Microsoft Corporation. All rights reserved.
.TAGS DSCConfiguration
.LICENSEURI https://github.com/PowerShell/ComputerManagementDsc/blob/master/LICENSE
.PROJECTURI https://github.com/PowerShell/ComputerManagementDsc
.ICONURI
.EXTERNALMODULEDEPENDENCIES
.REQUIREDSCRIPTS
.EXTERNALSCRIPTDEPENDENCIES
.RELEASENOTES First version.
.PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core
#>

#Requires -module ComputerManagementDsc

<#
.DESCRIPTION
This example switches the computer 'Server01' from a domain and joins it
to the 'ContosoWorkgroup' Workgroup.
Note: this requires a credential.
#>
Configuration Computer_UnjoinDomainAndJoinWorkgroup_Config
{
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullorEmpty()]
[System.Management.Automation.PSCredential]
$Credential
)

Import-DscResource -Module ComputerManagementDsc

Node localhost
{
Computer JoinWorkgroup
{
Name = 'Server01'
WorkGroupName = 'ContosoWorkgroup'
Credential = $Credential # Credential to unjoin from domain
}
}
}

This file was deleted.

Loading

0 comments on commit 8252c09

Please sign in to comment.