Skip to content

Commit

Permalink
Merge pull request #102 from PlagueHO/Issue-101
Browse files Browse the repository at this point in the history
Convert xComputer to HQRM and move strings to Localization File - Fixes #101
  • Loading branch information
PlagueHO authored Sep 23, 2017
2 parents f42dfd1 + bcce6c2 commit 9dcb8ef
Show file tree
Hide file tree
Showing 9 changed files with 800 additions and 221 deletions.
279 changes: 233 additions & 46 deletions DSCResources/MSFT_xComputer/MSFT_xComputer.psm1

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions DSCResources/MSFT_xComputer/MSFT_xComputer.schema.mof
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[ClassVersion("1.0.1.0"), FriendlyName("xComputer")]
class MSFT_xComputer : OMI_BaseResource
{
[Key, Description("The desired computer name")] String Name;
[Write, Description("The name of the domain to join")] String DomainName;
[Write, Description("The distinguished name of the organizational unit that the computer account will be created in")] String JoinOU;
[Read, Description("A read-only property that specifies the organizational unit that the computer account is currently in")] String CurrentOU;
[Write, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to join or leave domain")] String Credential;
[Write, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to join or leave domain")] String UnjoinCredential;
[Write, Description("The name of the workgroup")] String WorkGroupName;
[Write, Description("The value assigned here will be set as the local computer description")] String Description;
[Key, Description("The desired computer name.")] String Name;
[Write, Description("The name of the domain to join.")] String DomainName;
[Write, Description("The distinguished name of the organizational unit that the computer account will be created in.")] String JoinOU;
[Write, Description("Credential to be used to join a domain."), EmbeddedInstance("MSFT_Credential")] String Credential;
[Write, Description("Credential to be used to leave a domain."), EmbeddedInstance("MSFT_Credential")] String UnjoinCredential;
[Write, Description("The name of the workgroup.")] String WorkGroupName;
[Write, Description("The value assigned here will be set as the local computer description.")] String Description;
[Read, Description("A read-only property that specifies the organizational unit that the computer account is currently in.")] String CurrentOU;
};
18 changes: 18 additions & 0 deletions DSCResources/MSFT_xComputer/en-US/MSFT_xComputer.strings.psd1
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
ConvertFrom-StringData @'
GettingComputerStateMessage = Getting computer state for '{0}'.
SettingComputerStateMessage = Setting computer state for '{0}'.
SettingComputerDescriptionMessage = Setting computer description to '{0}'.
RenamedComputerMessage = Renamed computer to '{0}'.
RenamedComputerAndJoinedDomainMessage = Renamed computer to '{0}' and added to the domain '{1}'.
JoinedDomainMessage = Added computer to domain '{0}'.
RenamedComputerAndJoinedWorkgroupMessage = Renamed computer to '{0}' and addded to workgroup '{1}'.
JoinedWorkgroupMessage = Added computer to workgroup '{0}'.
CredentialsNotSpecifiedError = Must to specify credentials with domain.
TestingComputerStateMessage = Testing computer state for '{0}'.
CheckingComputerDescriptionMessage = Checking if computer description is '{0}'.
CheckingDomainMemberMessage = Checking if the machine is a member of domain '{0}'.
CheckingNotDomainMemberMessage = Checking if the machine is a not a member of a domain.
CheckingWorkgroupMemberMessage = Checking if the machine is a member of workgroup '{0}'.
DomainNameAndWorkgroupNameError = Only DomainName or WorkGroupName can be specified at once.
ComputerNotInDomainMessage = This machine is not a domain member.
'@
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,16 @@ Please check out common DSC Resources [contributing guidelines](https://github.c

xComputer resource has following properties:

* Name: The desired computer name
* DomainName: The name of the domain to join
* Name: The desired computer name.
* DomainName: The name of the domain to join.
* JoinOU: The distinguished name of the organizational unit that the computer
account will be created in
* WorkGroupName: The name of the workgroup
* Credential: Credential to be used to join or leave domain
account will be created in.
* WorkGroupName: The name of the workgroup.
* Credential: Credential to be used to join a domain.
* UnjoinCredential: Credential to be used to leave a domain.
* CurrentOU: A read-only property that specifies the organizational unit that
the computer account is currently in
* Description: The value assigned here will be set as the local computer description
the computer account is currently in.
* Description: The value assigned here will be set as the local computer description.

### xComputer Examples

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

### 2.1.0.0

Expand Down
Loading

0 comments on commit 9dcb8ef

Please sign in to comment.