Skip to content

Commit 42400dc

Browse files
committed
Added xOfflineDomainJoin resource
1 parent b9890f2 commit 42400dc

2 files changed

Lines changed: 40 additions & 252 deletions

File tree

README.md

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@ To easily use PowerShell 4.0 on older operating systems, install WMF 4.0.
3232
Please read the installation instructions that are present on both the download page and the release notes for WMF 4.0
3333

3434
## Description
35-
The xComputerManagement module contains the xComputer DSC Resource.
36-
This DSC Resource allows you to configure a computer by changing its name and modifying its domain or workgroup.
35+
The xComputerManagement module contains the following resources:
36+
* xComputer - allows you to configure a computer by changing its name and modifying its domain or workgroup.
37+
* xOfflineDomainJoin - allows you to join computers to an AD Domain using an [Offline Domain Join](https://technet.microsoft.com/en-us/library/offline-domain-join-djoin-step-by-step(v=ws.10).aspx) request file.
3738

38-
## Details
39+
## xComputer
3940
xComputer resource has following properties:
4041

4142
* Name: The desired computer name
@@ -45,9 +46,18 @@ xComputer resource has following properties:
4546
* Credential: Credential to be used to join or leave domain
4647
* CurrentOU: A read-only property that specifies the organizational unit that the computer account is currently in
4748

49+
## xOfflineDomainJoin
50+
xOfflineDomainJoin resource is a [Single Instance](https://msdn.microsoft.com/en-us/powershell/dsc/singleinstance) resource that can only be used once in a configuration and has following properties:
51+
52+
* IsSingleInstance: Must be set to 'Yes'. Required.
53+
* RequestFile: The full path to the Offline Domain Join request file. Required.
54+
4855
## Versions
4956

5057
### Unreleased
58+
* Added the following resources:
59+
* MSFT_xOfflineDomainJoin resource to join computers to an AD Domain using an Offline Domain Join request file.
60+
* xComputer: Changed credential generation code in tests to avoid triggering PSSA rule PSAvoidUsingConvertToSecureStringWithPlainText.
5161

5262
### 1.5.0.0
5363
* Update Unit tests to use the standard folder structure and test templates.
@@ -297,5 +307,32 @@ Sample_xComputer_DomainToWorkgroup -ConfigurationData $ConfigData -MachineName <
297307
****************************#>
298308
```
299309

310+
### Join a Domain using an ODJ Request File
311+
This example will join the computer to a domain using the ODJ request file C:\ODJ\ODJRequest.txt.
312+
313+
```powershell
314+
configuration Sample_xOfflineDomainJoin
315+
{
316+
param
317+
(
318+
[string[]]$NodeName = 'localhost'
319+
)
320+
321+
Import-DSCResource -ModuleName xComputerManagement
322+
323+
Node $NodeName
324+
{
325+
xOfflineDomainJoin ODJ
326+
{
327+
RequestFile = 'C:\ODJ\ODJRequest.txt'
328+
IsSingleInstance = 'Yes'
329+
}
330+
}
331+
}
332+
333+
Sample_xOfflineDomainJoin
334+
Start-DscConfiguration -Path Sample_xOfflineDomainJoin -Wait -Verbose -Force
335+
```
336+
300337
## Contributing
301338
Please check out common DSC Resources [contributing guidelines](https://github.com/PowerShell/DscResource.Kit/blob/master/CONTRIBUTING.md).

0 commit comments

Comments
 (0)