Skip to content

Commit

Permalink
Date and spaces updates [0] (MicrosoftDocs#2205)
Browse files Browse the repository at this point in the history
  • Loading branch information
DCtheGeek authored and Sean Wheeler committed Mar 23, 2018
1 parent 0e51caf commit 38bb57d
Show file tree
Hide file tree
Showing 50 changed files with 466 additions and 514 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ If the PR is fixing all the document version(s), please delete the list/options
Reason(s) for not selecting all version of documents
----------------------------------------------------
- [ ] The documented feature was introduced in selected version of PowerShell
- [ ] This issue only shows up in selected version of the document
- [ ] This issue only shows up in selected version of the document
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ Reason(s) for not updating all version of documents
--------------------------------------------------
- [ ] The documented feature was introduced in version (list version here) of PowerShell
- [ ] This issue only shows up in version (list version(s) here) of the document
- [ ] This PR partially fixes the issue, and issue #<insert here> tracks the remaining work
- [ ] This PR partially fixes the issue, and issue #<insert here> tracks the remaining work
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ The following topics explain how to contribute to the PowerShell documentation.
1. [Get started](./contributing/GETSTARTED.md)
2. [Writing PowerShell documentation](./contributing/WRITING.md)
3. [Style Guide](./contributing/STYLE.md)
4. [Formatting code blocks](./contributing/FORMATTING-CODE.md).
4. [Formatting code blocks](./contributing/FORMATTING-CODE.md).
2 changes: 1 addition & 1 deletion contributing/FORMATTING-CODE.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,4 @@ See the general guidelines, in the next section, for the appropriate use of prom
Win32_GameModeRelatedProcesses : {1, 0, 1, 0...}
GameDVR_HonorUserFSEBehaviorMode : 0
GameDVR_DXGIHonorFSEWindowsCompatible : 0
```
```
2 changes: 1 addition & 1 deletion contributing/GETSTARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ See [Writing PowerShell documentation](WRITING.md).
[fork]: https://help.github.com/articles/fork-a-repo/
[clone]: https://help.github.com/articles/cloning-a-repository/
[push]: https://help.github.com/articles/pushing-to-a-remote/
[pull]: https://help.github.com/articles/creating-a-pull-request/
[pull]: https://help.github.com/articles/creating-a-pull-request/
2 changes: 1 addition & 1 deletion contributing/STYLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,4 @@ See [Formatting code blocks](FORMATTING-CODE.md).
[links]: https://help.github.com/articles/relative-links-in-readmes/
[gfm-spec]: https://github.github.com/gfm/
[semantics]: http://rhodesmill.org/brandon/2012/one-sentence-per-line/
[platyPS]: https://github.com/PowerShell/platyPS
[platyPS]: https://github.com/PowerShell/platyPS
10 changes: 4 additions & 6 deletions dsc/DSCAutomationHostEnabled.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
ms.date: 2017-06-12
ms.date: 06/12/2017
ms.topic: conceptual
keywords: dsc,powershell,configuration,setup
title: DSCAutomationHostEnabled registry key
Expand All @@ -12,14 +12,12 @@ title: DSCAutomationHostEnabled registry key
DSC uses the **DSCAutomationHostEnabled** registry key under **HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies** to enable configuration of the machine at initial boot-up.
DSCAutomationHostEnabled supports three modes:

| DSCAutomationHostEnabled Value | Description |
|---|---|
| DSCAutomationHostEnabled Value | Description |
|---|---|
0 | Disable configuring the machine at boot-up. |
1 | Enable configuring the machine at boot-up. |
2 | Enable configuring the machine only if DSC is in pending or current state. This is the default value. |

## See Also

For an example of how to use this feature to run configurations at initial boot-up, see [Configure a virtual machines at initial boot-up by using DSC](bootstrapDsc.md).


For an example of how to use this feature to run configurations at initial boot-up, see [Configure a virtual machines at initial boot-up by using DSC](bootstrapDsc.md).
4 changes: 2 additions & 2 deletions dsc/DscForEngineers.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
ms.date: 2017-10-13
ms.date: 10/13/2017
ms.topic: conceptual
keywords: dsc,powershell,configuration,setup
title: Desired State Configuration Overview for Decision Makers
Expand Down Expand Up @@ -159,4 +159,4 @@ with the correct configuration data for the environment you want to target.

[Configuration Data](configData.md)

[Resources](resources.md)
[Resources](resources.md)
87 changes: 43 additions & 44 deletions dsc/PackageManagementDscResource.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
ms.date: 2017-06-12
ms.date: 06/12/2017
ms.topic: conceptual
keywords: dsc,powershell,configuration,setup
title: DSC PackageManagement Resource
Expand Down Expand Up @@ -29,21 +29,21 @@ PackageManagement [string] #ResourceName
```

## Properties
| Property | Description |
|---|---|
| Name| Specifies the name of the Package to be installed or uninstalled.|
| Source| Specifies the name of the package source where the package can be found. This can either be a URI or a source registered with Register-PackageSource or PackageManagementSource DSC resource. The DSC resource MSFT_PackageManagementSource can also register a package source.|
| Ensure| Determines whether the package is to be installed or uninstalled.|
| RequiredVersion| Specifies the exact version of the package that you want to install. If you do not specify this parameter, this DSC resource installs the newest available version of the package that also satisfies any maximum version specified by the MaximumVersion parameter.|
| MinimumVersion| Specifies the minimum allowed version of the package that you want to install. If you do not add this parameter, this DSC resource intalls the highest available version of the package that also satisfies any maximum specified version specified by the MaximumVersion parameter.|
| MaximumVersion| Specifies the maximum allowed version of the package that you want to install. If you do not specify this parameter, this DSC resource installs the highest-numbered available version of the package.|
| SourceCredential | Specifies a user account that has rights to install a package for a specified package provider or source.|
| ProviderName| Specifies a package provider name to which to scope your package search. You can get package provider names by running the Get-PackageProvider cmdlet.|
| AdditionalParameters| Provider specific parameters that are passed as an Hashtable. For example, for NuGet provider you can pass additional parameters like DestinationPath.|
| Property | Description |
|---|---|
| Name| Specifies the name of the Package to be installed or uninstalled.|
| Source| Specifies the name of the package source where the package can be found. This can either be a URI or a source registered with Register-PackageSource or PackageManagementSource DSC resource. The DSC resource MSFT_PackageManagementSource can also register a package source.|
| Ensure| Determines whether the package is to be installed or uninstalled.|
| RequiredVersion| Specifies the exact version of the package that you want to install. If you do not specify this parameter, this DSC resource installs the newest available version of the package that also satisfies any maximum version specified by the MaximumVersion parameter.|
| MinimumVersion| Specifies the minimum allowed version of the package that you want to install. If you do not add this parameter, this DSC resource intalls the highest available version of the package that also satisfies any maximum specified version specified by the MaximumVersion parameter.|
| MaximumVersion| Specifies the maximum allowed version of the package that you want to install. If you do not specify this parameter, this DSC resource installs the highest-numbered available version of the package.|
| SourceCredential | Specifies a user account that has rights to install a package for a specified package provider or source.|
| ProviderName| Specifies a package provider name to which to scope your package search. You can get package provider names by running the Get-PackageProvider cmdlet.|
| AdditionalParameters| Provider specific parameters that are passed as an Hashtable. For example, for NuGet provider you can pass additional parameters like DestinationPath.|

## Additional Parameters
The following table lists options for the AdditionalParameters property.
| Parameter | Description |
| Parameter | Description |
|---|---|
| DestinationPath| Used by providers such as the built-in Nuget Provider. Specifies a file location where you want the package to be installed.|
| InstallationPolicy| Used by providers such as the built-in Nuget Provider. Determines whether you trust the package's source. One of: "Untrusted", "Trusted".|
Expand All @@ -54,41 +54,40 @@ This example installs the **JQuery** NuGet package and **GistProvider** PowerShe

```powershell
Configuration PackageTest
{
PackageManagementSource SourceRepository
{
Ensure = "Present"
Name = "MyNuget"
ProviderName= "Nuget"
SourceUri = "http://nuget.org/api/v2/"
InstallationPolicy ="Trusted"
}
PackageManagementSource PSGallery
{
Ensure = "Present"
Name = "psgallery"
ProviderName= "PowerShellGet"
SourceUri = "https://www.powershellgallery.com/api/v2/"
InstallationPolicy ="Trusted"
}
PackageManagement NugetPackage
{
Ensure = "Present"
{
PackageManagementSource SourceRepository
{
Ensure = "Present"
Name = "MyNuget"
ProviderName= "Nuget"
SourceUri = "http://nuget.org/api/v2/"
InstallationPolicy ="Trusted"
}
PackageManagementSource PSGallery
{
Ensure = "Present"
Name = "psgallery"
ProviderName= "PowerShellGet"
SourceUri = "https://www.powershellgallery.com/api/v2/"
InstallationPolicy ="Trusted"
}
PackageManagement NugetPackage
{
Ensure = "Present"
Name = "JQuery"
AdditionalParameters = "$env:HomeDrive\nuget"
RequiredVersion = "2.0.1"
DependsOn = "[PackageManagementSource]SourceRepository"
RequiredVersion = "2.0.1"
DependsOn = "[PackageManagementSource]SourceRepository"
}
PackageManagement PSModule
{
Ensure = "Present"
PackageManagement PSModule
{
Ensure = "Present"
Name = "gistprovider"
Source = "PSGallery"
DependsOn = "[PackageManagementSource]PSGallery"
DependsOn = "[PackageManagementSource]PSGallery"
}
}
```

```
33 changes: 16 additions & 17 deletions dsc/PackageManagementSourceDscResource.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
ms.date: 2017-06-12
ms.date: 06/12/2017
ms.topic: conceptual
keywords: dsc,powershell,configuration,setup
title: DSC PackageManagementSource Resource
Expand All @@ -26,30 +26,29 @@ PSModule [string] #ResourceName
```

## Properties
| Property | Description |
|---|---|
| Name| Specifies the name of the package source to be registered or unregistered on your system.|
| Ensure| Determines whether the package source is to be registered or unregistered.|
| InstallationPolicy| Determines whether you trust the package source. One of: "Untrusted", "Trusted".|
| ProviderName| Specifies the name of the OneGet provider through which you can interop with the package source.|
| SourceUri| Specifies the URI of the package source.|
| SourceCredential| Provides access to the package on a remote source.|
| Property | Description |
|---|---|
| Name| Specifies the name of the package source to be registered or unregistered on your system.|
| Ensure| Determines whether the package source is to be registered or unregistered.|
| InstallationPolicy| Determines whether you trust the package source. One of: "Untrusted", "Trusted".|
| ProviderName| Specifies the name of the OneGet provider through which you can interop with the package source.|
| SourceUri| Specifies the URI of the package source.|
| SourceCredential| Provides access to the package on a remote source.|

## Example

This example registers the http://nuget.org package source using the **PackageManagementSource** DSC resource.

```powershell
Configuration PackageManagementSourceTest
{
{
PackageManagementSource SourceRepository
{
Ensure = "Present"
Name = "MyNuget"
ProviderName= "Nuget"
SourceUri = "http://nuget.org/api/v2/"
InstallationPolicy ="Trusted"
Ensure = "Present"
Name = "MyNuget"
ProviderName= "Nuget"
SourceUri = "http://nuget.org/api/v2/"
InstallationPolicy ="Trusted"
}
}
```

```
5 changes: 2 additions & 3 deletions dsc/archiveResource.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
ms.date: 2017-06-12
ms.date: 06/12/2017
ms.topic: conceptual
keywords: dsc,powershell,configuration,setup
title: DSC Archive Resource
Expand Down Expand Up @@ -47,5 +47,4 @@ Archive ArchiveExample {
Path = "C:\Users\Public\Documents\Test.zip"
Destination = "C:\Users\Public\Documents\ExtractionPath"
}
```

```
5 changes: 2 additions & 3 deletions dsc/authoringResource.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
ms.date: 2017-06-12
ms.date: 06/12/2017
ms.topic: conceptual
keywords: dsc,powershell,configuration,setup
title: Build Custom Windows PowerShell Desired State Configuration Resources
Expand All @@ -19,5 +19,4 @@ A DSC resource is a Windows PowerShell module. The module contains both the sche
* [Implementing a DSC resource in C#](authoringResourceMofCS.md)
* [Writing a custom DSC resource with PowerShell classes](authoringResourceClass.md)
* [Composite resources: Using a DSC configuration as a resource](authoringResourceComposite.md)
* [Using the Resource Designer tool](authoringResourceMofDesigner.md)

* [Using the Resource Designer tool](authoringResourceMofDesigner.md)
25 changes: 12 additions & 13 deletions dsc/authoringResourceClass.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
ms.date: 2017-06-12
ms.date: 06/12/2017
ms.topic: conceptual
keywords: dsc,powershell,configuration,setup
title: Writing a custom DSC resource with PowerShell classes
Expand All @@ -26,8 +26,8 @@ To implement a DSC custom resource with a PowerShell class, create the following
```
$env:ProgramFiles\WindowsPowerShell\Modules (folder)
|- MyDscResource (folder)
|- MyDscResource.psm1
MyDscResource.psd1
|- MyDscResource.psm1
MyDscResource.psd1
```

## Create the class
Expand Down Expand Up @@ -68,18 +68,18 @@ Notice that the properties are modified by attributes. The meaning of the attrib
The **$Path** and **$SourcePath** properties are both strings. The **$CreationTime** is a [DateTime](https://technet.microsoft.com/library/system.datetime.aspx) property. The **$Ensure** property is an enumeration type, defined as follows.

```powershell
enum Ensure
{
Absent
Present
enum Ensure
{
Absent
Present
}
```

### Implementing the methods

The **Get()**, **Set()**, and **Test()** methods are analogous to the **Get-TargetResource**, **Set-TargetResource**, and **Test-TargetResource** functions in a script resource.

This code also includes the CopyFile() function, a helper function that copies the file from **$SourcePath** to **$Path**.
This code also includes the CopyFile() function, a helper function that copies the file from **$SourcePath** to **$Path**.

```powershell
Expand Down Expand Up @@ -446,7 +446,7 @@ PowerShellVersion = '5.0'
# Name of the Windows PowerShell host required by this module
# PowerShellHostName = ''
}
}
```

## Test the resource
Expand All @@ -462,7 +462,7 @@ Configuration Test
Path = "C:\test\test.txt"
SourcePath = "c:\test.txt"
Ensure = "Present"
}
}
}
Test
Start-DscConfiguration -Wait -Force Test
Expand All @@ -472,7 +472,7 @@ Start-DscConfiguration -Wait -Force Test

>**Note:** **PsDscRunAsCredential** is supported in PowerShell 5.0 and later.
The **PsDscRunAsCredential** property can be used in [DSC configurations](configurations.md) resource block to specify that the
The **PsDscRunAsCredential** property can be used in [DSC configurations](configurations.md) resource block to specify that the
resource should be run under a specified set of credentials.
For more information, see [Running DSC with user credentials](runAsUser.md).

Expand Down Expand Up @@ -508,5 +508,4 @@ if (PsDscContext.RunAsUser) {

## See Also
### Concepts
[Build Custom Windows PowerShell Desired State Configuration Resources](authoringResource.md)

[Build Custom Windows PowerShell Desired State Configuration Resources](authoringResource.md)
7 changes: 3 additions & 4 deletions dsc/authoringResourceComposite.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
ms.date: 2017-06-12
ms.date: 06/12/2017
ms.topic: conceptual
keywords: dsc,powershell,configuration,setup
title: Composite resources--Using a DSC configuration as a resource
Expand Down Expand Up @@ -188,7 +188,7 @@ configuration RenameVM

>**Note:** **PsDscRunAsCredential** is supported in PowerShell 5.0 and later.
The **PsDscRunAsCredential** property can be used in [DSC configurations](configurations.md) resource block to specify that the
The **PsDscRunAsCredential** property can be used in [DSC configurations](configurations.md) resource block to specify that the
resource should be run under a specified set of credentials.
For more information, see [Running DSC with user credentials](runAsUser.md).

Expand All @@ -205,5 +205,4 @@ if ($PsDscContext.RunAsUser) {
## See Also
### Concepts
* [Writing a custom DSC resource with MOF](authoringResourceMOF.md)
* [Get Started with Windows PowerShell Desired State Configuration](overview.md)

* [Get Started with Windows PowerShell Desired State Configuration](overview.md)
Loading

0 comments on commit 38bb57d

Please sign in to comment.