Skip to content

Commit 9dcb8ef

Browse files
authored
Merge pull request #102 from PlagueHO/Issue-101
Convert xComputer to HQRM and move strings to Localization File - Fixes #101
2 parents f42dfd1 + bcce6c2 commit 9dcb8ef

9 files changed

Lines changed: 800 additions & 221 deletions

DSCResources/MSFT_xComputer/MSFT_xComputer.psm1

Lines changed: 233 additions & 46 deletions
Large diffs are not rendered by default.
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[ClassVersion("1.0.1.0"), FriendlyName("xComputer")]
22
class MSFT_xComputer : OMI_BaseResource
33
{
4-
[Key, Description("The desired computer name")] String Name;
5-
[Write, Description("The name of the domain to join")] String DomainName;
6-
[Write, Description("The distinguished name of the organizational unit that the computer account will be created in")] String JoinOU;
7-
[Read, Description("A read-only property that specifies the organizational unit that the computer account is currently in")] String CurrentOU;
8-
[Write, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to join or leave domain")] String Credential;
9-
[Write, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to join or leave domain")] String UnjoinCredential;
10-
[Write, Description("The name of the workgroup")] String WorkGroupName;
11-
[Write, Description("The value assigned here will be set as the local computer description")] String Description;
4+
[Key, Description("The desired computer name.")] String Name;
5+
[Write, Description("The name of the domain to join.")] String DomainName;
6+
[Write, Description("The distinguished name of the organizational unit that the computer account will be created in.")] String JoinOU;
7+
[Write, Description("Credential to be used to join a domain."), EmbeddedInstance("MSFT_Credential")] String Credential;
8+
[Write, Description("Credential to be used to leave a domain."), EmbeddedInstance("MSFT_Credential")] String UnjoinCredential;
9+
[Write, Description("The name of the workgroup.")] String WorkGroupName;
10+
[Write, Description("The value assigned here will be set as the local computer description.")] String Description;
11+
[Read, Description("A read-only property that specifies the organizational unit that the computer account is currently in.")] String CurrentOU;
1212
};
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
ConvertFrom-StringData @'
2+
GettingComputerStateMessage = Getting computer state for '{0}'.
3+
SettingComputerStateMessage = Setting computer state for '{0}'.
4+
SettingComputerDescriptionMessage = Setting computer description to '{0}'.
5+
RenamedComputerMessage = Renamed computer to '{0}'.
6+
RenamedComputerAndJoinedDomainMessage = Renamed computer to '{0}' and added to the domain '{1}'.
7+
JoinedDomainMessage = Added computer to domain '{0}'.
8+
RenamedComputerAndJoinedWorkgroupMessage = Renamed computer to '{0}' and addded to workgroup '{1}'.
9+
JoinedWorkgroupMessage = Added computer to workgroup '{0}'.
10+
CredentialsNotSpecifiedError = Must to specify credentials with domain.
11+
TestingComputerStateMessage = Testing computer state for '{0}'.
12+
CheckingComputerDescriptionMessage = Checking if computer description is '{0}'.
13+
CheckingDomainMemberMessage = Checking if the machine is a member of domain '{0}'.
14+
CheckingNotDomainMemberMessage = Checking if the machine is a not a member of a domain.
15+
CheckingWorkgroupMemberMessage = Checking if the machine is a member of workgroup '{0}'.
16+
DomainNameAndWorkgroupNameError = Only DomainName or WorkGroupName can be specified at once.
17+
ComputerNotInDomainMessage = This machine is not a domain member.
18+
'@

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,16 @@ Please check out common DSC Resources [contributing guidelines](https://github.c
4545

4646
xComputer resource has following properties:
4747

48-
* Name: The desired computer name
49-
* DomainName: The name of the domain to join
48+
* Name: The desired computer name.
49+
* DomainName: The name of the domain to join.
5050
* JoinOU: The distinguished name of the organizational unit that the computer
51-
account will be created in
52-
* WorkGroupName: The name of the workgroup
53-
* Credential: Credential to be used to join or leave domain
51+
account will be created in.
52+
* WorkGroupName: The name of the workgroup.
53+
* Credential: Credential to be used to join a domain.
54+
* UnjoinCredential: Credential to be used to leave a domain.
5455
* CurrentOU: A read-only property that specifies the organizational unit that
55-
the computer account is currently in
56-
* Description: The value assigned here will be set as the local computer description
56+
the computer account is currently in.
57+
* Description: The value assigned here will be set as the local computer description.
5758

5859
### xComputer Examples
5960

@@ -220,6 +221,9 @@ xVirtualMemory has the following properties:
220221
* Added ConvertTo-TimeSpanFromScheduledTaskString function and refactored
221222
to reduce code duplication.
222223
* Added support for setting repetition duration to `Indefinitely`.
224+
* xComputer:
225+
* Moved strings to localization file.
226+
* Updated to meet HQRM guidelines.
223227

224228
### 2.1.0.0
225229

0 commit comments

Comments
 (0)