-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Converted Examples to format required for Publishing
- Loading branch information
Showing
71 changed files
with
1,453 additions
and
1,007 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...gementDsc/Examples/Resources/Computer/1-Computer_RenameComputerAndSetWorkgroup_Config.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
} | ||
} | ||
} |
25 changes: 0 additions & 25 deletions
25
...les/ComputerManagementDsc/Examples/Resources/Computer/1-RenameComputerAndSetWorkgroup.ps1
This file was deleted.
Oops, something went wrong.
47 changes: 47 additions & 0 deletions
47
Modules/ComputerManagementDsc/Examples/Resources/Computer/2-Computer_JoinDomain_Config.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
} |
32 changes: 0 additions & 32 deletions
32
Modules/ComputerManagementDsc/Examples/Resources/Computer/2-JoinDomain.ps1
This file was deleted.
Oops, something went wrong.
47 changes: 47 additions & 0 deletions
47
...terManagementDsc/Examples/Resources/Computer/3-Computer_RenameComputerInDomain_Config.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
} |
32 changes: 0 additions & 32 deletions
32
Modules/ComputerManagementDsc/Examples/Resources/Computer/3-RenameComputerInDomain.ps1
This file was deleted.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
...ManagementDsc/Examples/Resources/Computer/4-Computer_RenameComputerInWorkgroup_Config.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
} | ||
} | ||
} |
24 changes: 0 additions & 24 deletions
24
Modules/ComputerManagementDsc/Examples/Resources/Computer/4-RenameComputerInWorkgroup.ps1
This file was deleted.
Oops, something went wrong.
47 changes: 47 additions & 0 deletions
47
...agementDsc/Examples/Resources/Computer/5-Computer_UnjoinDomainAndJoinWorkgroup_Config.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
} |
32 changes: 0 additions & 32 deletions
32
Modules/ComputerManagementDsc/Examples/Resources/Computer/5-UnjoinDomainAndJoinWorkgroup.ps1
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.