diff --git a/dsc/configData.md b/dsc/configData.md index 6c9bbf104959..62bcd1520241 100644 --- a/dsc/configData.md +++ b/dsc/configData.md @@ -159,7 +159,7 @@ For example, you could create a file named `MyData.psd1` with the following cont ## Compiling a configuration with configuration data -To compile a configuration for which you have defined configuration data, you pass the cofiguration data as the value of the **ConfigurationData** parameter. +To compile a configuration for which you have defined configuration data, you pass the configuration data as the value of the **ConfigurationData** parameter. This will create a MOF file for each entry in the **AllNodes** array. Each MOF file will be named with the `NodeName` property of the corresponding array entry. @@ -196,8 +196,8 @@ DSC provides three special variables that can be used in a configuration script: ## Using non-node data As we've seen in previous examples, the **ConfigurationData** hashtable can have one or more keys in addition to the required **AllNodes** key. -In the examples in this topic, we have used only a single addiontal node, and named it `NonNodeData`. -However, you can define any number of addiontal keys, and name them anything you want. +In the examples in this topic, we have used only a single additional node, and named it `NonNodeData`. +However, you can define any number of additional keys, and name them anything you want. For an example of using non-node data, see [Separating configuration and environment data](separatingEnvData.md). diff --git a/dsc/configurations.md b/dsc/configurations.md index fd8a6ef94543..a8f86877b180 100644 --- a/dsc/configurations.md +++ b/dsc/configurations.md @@ -65,7 +65,7 @@ MyDscConfiguration ``` -In this example, you specify the name of the node by passing it as the **ComputerName** parameter when you compile the configuraton. The name defaults to "localhost". +In this example, you specify the name of the node by passing it as the **ComputerName** parameter when you compile the configuration. The name defaults to "localhost". ## Compiling the configuration diff --git a/dsc/decisionMaker.md b/dsc/decisionMaker.md index a21a1eaa57e5..4698a44a2d1d 100644 --- a/dsc/decisionMaker.md +++ b/dsc/decisionMaker.md @@ -37,7 +37,7 @@ Configurations are also shareable via the [PowerShell Gallery](https://powershel ## Desired State Configuration and DevOps [DevOps](http://blogs.technet.com/b/ashleymcglone/archive/2015/11/20/devops-for-n00bs-ie-windows-people.aspx) is a combination of people, -technologies, and culture that allow for rapid deployment and iteration. +process, and tools that allow for rapid deployment and iteration focused on delivering value to end users whether internal or external. DSC was designed with DevOps in mind. Having a single configuration define an environment means that developers can encode their requirements into a configuration, check that configuration into source control, and operations teams can easily deploy code without having to go through error-prone manual processes. diff --git a/dsc/scriptResource.md b/dsc/scriptResource.md index 4640c8156e34..1adb5ff7a676 100644 --- a/dsc/scriptResource.md +++ b/dsc/scriptResource.md @@ -79,13 +79,13 @@ Configuration ScriptTest { GetScript = { $currentVersion = Get-Content (Join-Path -Path $env:SYSTEMDRIVE -ChildPath 'version.txt') - return @{ 'Version' = "$currentVersion" } + return @{ 'Result' = "$currentVersion" } } TestScript = { $state = $GetScript - if( $state['Version'] -eq $using:version ) + if( $state['Result'] -eq $using:version ) { - Write-Verbose -Message ('{0} -eq {1}' -f $state['Version'],$using:version) + Write-Verbose -Message ('{0} -eq {1}' -f $state['Result'],$using:version) return $true } Write-Verbose -Message ('Version up-to-date: {0}' -f $using:version) diff --git a/reference/3.0/Microsoft.PowerShell.Core/About/about_Operator_Precedence.md b/reference/3.0/Microsoft.PowerShell.Core/About/about_Operator_Precedence.md index 01d129ccc4bb..de68aea9a86c 100644 --- a/reference/3.0/Microsoft.PowerShell.Core/About/about_Operator_Precedence.md +++ b/reference/3.0/Microsoft.PowerShell.Core/About/about_Operator_Precedence.md @@ -77,7 +77,7 @@ order: |OPERATOR |REFERENCE| |--------------------------|---------| |`-band -bor -bxor` |[about_Arithmetic_Operators](about_Arithmetic_Operators.md)| -|`-and -or -xor` |[about_comparison_operators](about_comparison_operators.md)| +|`-and -or -xor` |[about_Logical_Operators](about_logical_operators.md)| |`.` (dot-source) |[about_Scopes](about_Scopes.md)| |`&` (call) |[about_Operators](about_Operators.md)| || (pipeline operator)|[about_Operators](about_Operators.md)| diff --git a/reference/3.0/Microsoft.PowerShell.Core/Get-Command.md b/reference/3.0/Microsoft.PowerShell.Core/Get-Command.md index 5865aed69a30..5b011161f813 100644 --- a/reference/3.0/Microsoft.PowerShell.Core/Get-Command.md +++ b/reference/3.0/Microsoft.PowerShell.Core/Get-Command.md @@ -232,7 +232,7 @@ To detect dynamic parameters that are available only when certain other paramete To detect the dynamic parameters that a provider adds to a cmdlet, set the value of the **ArgumentList** parameter to a path in the provider drive, such as "WSMan:", "HKLM:" or "Cert:". When the command is a Windows PowerShell provider cmdlet, enter only one path in each command; the provider cmdlets return only the dynamic parameters for the first path the value of **ArgumentList**. -For information about the provider cmdlets, see about_Providers (http://go.microsoft.com/fwlink/?LinkID=113250). +For information about the provider cmdlets, see [about_Providers](About/about_Providers.md). ```yaml Type: Object[] diff --git a/reference/3.0/Microsoft.PowerShell.Core/Get-Help.md b/reference/3.0/Microsoft.PowerShell.Core/Get-Help.md index 0b102d43b26e..8cc6b01cfac6 100644 --- a/reference/3.0/Microsoft.PowerShell.Core/Get-Help.md +++ b/reference/3.0/Microsoft.PowerShell.Core/Get-Help.md @@ -474,7 +474,7 @@ To see the custom cmdlet help for a provider path, go to the provider path locat You can also find custom cmdlet help online in the provider help section of the help topics. For example, you can find help for the **New-Item** cmdlet in the Wsman:\*\ClientCertificate path (http://go.microsoft.com/fwlink/?LinkID=158676). -For more information about Windows PowerShell providers, see about_Providers (http://go.microsoft.com/fwlink/?LinkID=113250). +For more information about Windows PowerShell providers, see [about_Providers](About/about_Providers.md). ```yaml Type: String diff --git a/reference/3.0/Microsoft.PowerShell.Management/Get-Content.md b/reference/3.0/Microsoft.PowerShell.Management/Get-Content.md index 8d68eac2331a..a459dc0acb9c 100644 --- a/reference/3.0/Microsoft.PowerShell.Management/Get-Content.md +++ b/reference/3.0/Microsoft.PowerShell.Management/Get-Content.md @@ -391,7 +391,7 @@ You cannot pipe input to **Get-Content**. **Get-Content** returns strings or bytes. The output type depends upon the content that it gets. ## NOTES -* The **Get-Content** cmdlet is designed to work with the data exposed by any provider. To get the providers in your session, use the **Get-PsProvider** cmdlet. For more information, see about_Providers (http://go.microsoft.com/fwlink/?LinkID=113250). +* The **Get-Content** cmdlet is designed to work with the data exposed by any provider. To get the providers in your session, use the **Get-PsProvider** cmdlet. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). * ## RELATED LINKS diff --git a/reference/3.0/Microsoft.PowerShell.Management/Get-PSDrive.md b/reference/3.0/Microsoft.PowerShell.Management/Get-PSDrive.md index 7a6ab17b723f..d4406cc39af1 100644 --- a/reference/3.0/Microsoft.PowerShell.Management/Get-PSDrive.md +++ b/reference/3.0/Microsoft.PowerShell.Management/Get-PSDrive.md @@ -300,7 +300,7 @@ You cannot pipe objects to **Get-PSDrive**. ### System.Management.Automation.PSDriveInfo **Get-PSDrive** returns objects that represent the drives in the session. ## NOTES -* The **Get-PSDrive** cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, use the Get-PSProvider cmdlet. For more information, see about_Providers (http://go.microsoft.com/fwlink/?LinkID=113250). +* The **Get-PSDrive** cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, use the Get-PSProvider cmdlet. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). * Mapped network drives that are created by using the **Persist** parameter of the New-PSDrive cmdlet are specific to a user account. Mapped network drives that you create in sessions that are started with the "Run as administrator" option or with the credentials of another user are not visible in sessions that are started without explicit credentials or with the credentials of the current user. ## RELATED LINKS diff --git a/reference/3.0/Microsoft.PowerShell.Management/New-PSDrive.md b/reference/3.0/Microsoft.PowerShell.Management/New-PSDrive.md index 691727712599..413678992d94 100644 --- a/reference/3.0/Microsoft.PowerShell.Management/New-PSDrive.md +++ b/reference/3.0/Microsoft.PowerShell.Management/New-PSDrive.md @@ -366,7 +366,7 @@ You cannot pipe input to this cmdlet. ### System.Management.Automation.PSDriveInfo ## NOTES -* The **New-PSDrive** cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, use the Get-PSProvider cmdlet. For more information about providers, see about_Providers (http://go.microsoft.com/fwlink/?LinkID=113250). +* The **New-PSDrive** cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, use the Get-PSProvider cmdlet. For more information about providers, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). * Mapped network drives are specific to a user account. Mapped network drives that you create in sessions that are started with the "Run as administrator" option or with the credential of another user are not visible in session that started without explicit credentials or with the credentials of the current user. ## RELATED LINKS diff --git a/reference/3.0/Microsoft.PowerShell.Management/Remove-PSDrive.md b/reference/3.0/Microsoft.PowerShell.Management/Remove-PSDrive.md index 626f1214e115..1bd142d20a5c 100644 --- a/reference/3.0/Microsoft.PowerShell.Management/Remove-PSDrive.md +++ b/reference/3.0/Microsoft.PowerShell.Management/Remove-PSDrive.md @@ -193,7 +193,7 @@ You can pipe a drive object, such as one from the Get-PSDrive cmdlet, to the **R ### None This cmdlet does not return any output. ## NOTES -* The **Remove-PSDrive** cmdlet is designed to work with the data exposed by any Windows PowerShell provider. To list the providers in your session, use the Get-PSProvider cmdlet. For more information, see about_Providers (http://go.microsoft.com/fwlink/?LinkID=113250). +* The **Remove-PSDrive** cmdlet is designed to work with the data exposed by any Windows PowerShell provider. To list the providers in your session, use the Get-PSProvider cmdlet. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). * ## RELATED LINKS diff --git a/reference/3.0/Microsoft.PowerShell.Management/Restart-Service.md b/reference/3.0/Microsoft.PowerShell.Management/Restart-Service.md index 53dbed74a82a..bf7d8644dd48 100644 --- a/reference/3.0/Microsoft.PowerShell.Management/Restart-Service.md +++ b/reference/3.0/Microsoft.PowerShell.Management/Restart-Service.md @@ -9,25 +9,30 @@ title: Restart-Service --- # Restart-Service + ## SYNOPSIS Stops and then starts one or more services. + ## SYNTAX ### InputObject (Default) ``` -Restart-Service [-Force] [-InputObject] <ServiceController[]> [-PassThru] [-Include <String[]>] - [-Exclude <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] +Restart-Service [-InputObject] <ServiceController[]> + [-Force] [-PassThru] [-Include <String[]>] [-Exclude <String[]>] + [-WhatIf] [-Confirm] [<CommonParameters>] ``` ### Default ``` -Restart-Service [-Force] [-Name] <String[]> [-PassThru] [-Include <String[]>] [-Exclude <String[]>] [-WhatIf] - [-Confirm] [<CommonParameters>] +Restart-Service [-Name] <String[]> + [-Force] [-PassThru] [-Include <String[]>] [-Exclude <String[]>] + [-WhatIf] [-Confirm] [<CommonParameters>] ``` ### DisplayName ``` -Restart-Service [-Force] [-PassThru] -DisplayName <String[]> [-Include <String[]>] [-Exclude <String[]>] +Restart-Service -DisplayName <String[]> + [-Force] [-PassThru] [-Include <String[]>] [-Exclude <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ``` @@ -138,7 +143,7 @@ Parameter Sets: InputObject Aliases: Required: True -Position: 1 +Position: 0 Default value: None Accept pipeline input: True (ByValue) Accept wildcard characters: False @@ -153,7 +158,7 @@ Parameter Sets: Default Aliases: ServiceName Required: True -Position: 1 +Position: 0 Default value: None Accept pipeline input: True (ByPropertyName, ByValue) Accept wildcard characters: False diff --git a/reference/3.0/Microsoft.PowerShell.Management/Resume-Service.md b/reference/3.0/Microsoft.PowerShell.Management/Resume-Service.md index 3f87445c0af4..c5e046d3136b 100644 --- a/reference/3.0/Microsoft.PowerShell.Management/Resume-Service.md +++ b/reference/3.0/Microsoft.PowerShell.Management/Resume-Service.md @@ -15,20 +15,23 @@ Resumes one or more suspended (paused) services. ### InputObject (Default) ``` -Resume-Service [-InputObject] <ServiceController[]> [-PassThru] [-Include <String[]>] [-Exclude <String[]>] +Resume-Service [-InputObject] <ServiceController[]> + [-PassThru] [-Include <String[]>] [-Exclude <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ``` ### Default ``` -Resume-Service [-Name] <String[]> [-PassThru] [-Include <String[]>] [-Exclude <String[]>] [-WhatIf] [-Confirm] - [<CommonParameters>] +Resume-Service [-Name] <String[]> + [-PassThru] [-Include <String[]>] [-Exclude <String[]>] + [-WhatIf] [-Confirm] [<CommonParameters>] ``` ### DisplayName ``` -Resume-Service [-PassThru] -DisplayName <String[]> [-Include <String[]>] [-Exclude <String[]>] [-WhatIf] - [-Confirm] [<CommonParameters>] +Resume-Service -DisplayName <String[]> + [-PassThru] [-Include <String[]>] [-Exclude <String[]>] + [-WhatIf] [-Confirm] [<CommonParameters>] ``` ## DESCRIPTION @@ -120,7 +123,7 @@ Parameter Sets: InputObject Aliases: Required: True -Position: 1 +Position: 0 Default value: None Accept pipeline input: True (ByValue) Accept wildcard characters: False @@ -138,7 +141,7 @@ Parameter Sets: Default Aliases: ServiceName Required: True -Position: 1 +Position: 0 Default value: None Accept pipeline input: True (ByPropertyName, ByValue) Accept wildcard characters: False diff --git a/reference/4.0/Microsoft.PowerShell.Core/About/about_Operator_Precedence.md b/reference/4.0/Microsoft.PowerShell.Core/About/about_Operator_Precedence.md index 01d129ccc4bb..de68aea9a86c 100644 --- a/reference/4.0/Microsoft.PowerShell.Core/About/about_Operator_Precedence.md +++ b/reference/4.0/Microsoft.PowerShell.Core/About/about_Operator_Precedence.md @@ -77,7 +77,7 @@ order: |OPERATOR |REFERENCE| |--------------------------|---------| |`-band -bor -bxor` |[about_Arithmetic_Operators](about_Arithmetic_Operators.md)| -|`-and -or -xor` |[about_comparison_operators](about_comparison_operators.md)| +|`-and -or -xor` |[about_Logical_Operators](about_logical_operators.md)| |`.` (dot-source) |[about_Scopes](about_Scopes.md)| |`&` (call) |[about_Operators](about_Operators.md)| || (pipeline operator)|[about_Operators](about_Operators.md)| diff --git a/reference/4.0/Microsoft.PowerShell.Core/Get-Command.md b/reference/4.0/Microsoft.PowerShell.Core/Get-Command.md index 373697a4fcfc..791d66ee6be9 100644 --- a/reference/4.0/Microsoft.PowerShell.Core/Get-Command.md +++ b/reference/4.0/Microsoft.PowerShell.Core/Get-Command.md @@ -249,7 +249,7 @@ To detect dynamic parameters that are available only when certain other paramete To detect the dynamic parameters that a provider adds to a cmdlet, set the value of the **ArgumentList** parameter to a path in the provider drive, such as "WSMan:", "HKLM:" or "Cert:". When the command is a Windows PowerShell provider cmdlet, enter only one path in each command; the provider cmdlets return only the dynamic parameters for the first path the value of **ArgumentList**. -For information about the provider cmdlets, see about_Providers (http://go.microsoft.com/fwlink/?LinkID=113250). +For information about the provider cmdlets, see [about_Providers](About/about_Providers.md). ```yaml Type: Object[] diff --git a/reference/4.0/Microsoft.PowerShell.Core/Get-Help.md b/reference/4.0/Microsoft.PowerShell.Core/Get-Help.md index 7504ee559b8b..48e6773649a4 100644 --- a/reference/4.0/Microsoft.PowerShell.Core/Get-Help.md +++ b/reference/4.0/Microsoft.PowerShell.Core/Get-Help.md @@ -492,7 +492,7 @@ To see the custom cmdlet help for a provider path, go to the provider path locat You can also find custom cmdlet help online in the provider help section of the help topics. For example, you can find help for the **New-Item** cmdlet in the Wsman:\*\ClientCertificate path (http://go.microsoft.com/fwlink/?LinkID=158676). -For more information about Windows PowerShell providers, see about_Providers (http://go.microsoft.com/fwlink/?LinkID=113250). +For more information about Windows PowerShell providers, see [about_Providers](About/about_Providers.md). ```yaml Type: String diff --git a/reference/4.0/Microsoft.PowerShell.Management/Get-Content.md b/reference/4.0/Microsoft.PowerShell.Management/Get-Content.md index f68c52f161b7..505e9c9a32ed 100644 --- a/reference/4.0/Microsoft.PowerShell.Management/Get-Content.md +++ b/reference/4.0/Microsoft.PowerShell.Management/Get-Content.md @@ -373,7 +373,7 @@ You cannot pipe input to **Get-Content**. The output type depends upon the content that it gets. ## NOTES -* The **Get-Content** cmdlet is designed to work with the data exposed by any provider. To get the providers in your session, use the **Get-PsProvider** cmdlet. For more information, see about_Providers (http://go.microsoft.com/fwlink/?LinkID=113250). +* The **Get-Content** cmdlet is designed to work with the data exposed by any provider. To get the providers in your session, use the **Get-PsProvider** cmdlet. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). * diff --git a/reference/4.0/Microsoft.PowerShell.Management/Get-PSDrive.md b/reference/4.0/Microsoft.PowerShell.Management/Get-PSDrive.md index ce4073b3e3cc..b776579bb65c 100644 --- a/reference/4.0/Microsoft.PowerShell.Management/Get-PSDrive.md +++ b/reference/4.0/Microsoft.PowerShell.Management/Get-PSDrive.md @@ -306,7 +306,7 @@ You cannot pipe objects to **Get-PSDrive**. **Get-PSDrive** returns objects that represent the drives in the session. ## NOTES -* The **Get-PSDrive** cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, use the Get-PSProvider cmdlet. For more information, see about_Providers (http://go.microsoft.com/fwlink/?LinkID=113250). +* The **Get-PSDrive** cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, use the Get-PSProvider cmdlet. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). * Mapped network drives that are created by using the **Persist** parameter of the New-PSDrive cmdlet are specific to a user account. Mapped network drives that you create in sessions that are started with the "Run as administrator" option or with the credentials of another user are not visible in sessions that are started without explicit credentials or with the credentials of the current user. ## RELATED LINKS diff --git a/reference/4.0/Microsoft.PowerShell.Management/New-PSDrive.md b/reference/4.0/Microsoft.PowerShell.Management/New-PSDrive.md index 64b77e48bb25..31a9648a18e4 100644 --- a/reference/4.0/Microsoft.PowerShell.Management/New-PSDrive.md +++ b/reference/4.0/Microsoft.PowerShell.Management/New-PSDrive.md @@ -376,7 +376,7 @@ You cannot pipe input to this cmdlet. ### System.Management.Automation.PSDriveInfo ## NOTES -* The **New-PSDrive** cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, use the Get-PSProvider cmdlet. For more information about providers, see about_Providers (http://go.microsoft.com/fwlink/?LinkID=113250). +* The **New-PSDrive** cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, use the Get-PSProvider cmdlet. For more information about providers, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). * Mapped network drives are specific to a user account. Mapped network drives that you create in sessions that are started with the "Run as administrator" option or with the credential of another user are not visible in a session that you started without explicit credentials, or with the credentials of the current user. ## RELATED LINKS diff --git a/reference/4.0/Microsoft.PowerShell.Management/Remove-PSDrive.md b/reference/4.0/Microsoft.PowerShell.Management/Remove-PSDrive.md index 9c9065eeeec0..0aa3683b0e99 100644 --- a/reference/4.0/Microsoft.PowerShell.Management/Remove-PSDrive.md +++ b/reference/4.0/Microsoft.PowerShell.Management/Remove-PSDrive.md @@ -201,7 +201,7 @@ You can pipe a drive object, such as one from the Get-PSDrive cmdlet, to the **R This cmdlet does not return any output. ## NOTES -* The **Remove-PSDrive** cmdlet is designed to work with the data exposed by any Windows PowerShell provider. To list the providers in your session, use the Get-PSProvider cmdlet. For more information, see about_Providers (http://go.microsoft.com/fwlink/?LinkID=113250). +* The **Remove-PSDrive** cmdlet is designed to work with the data exposed by any Windows PowerShell provider. To list the providers in your session, use the Get-PSProvider cmdlet. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). * diff --git a/reference/4.0/Microsoft.PowerShell.Management/Restart-Service.md b/reference/4.0/Microsoft.PowerShell.Management/Restart-Service.md index c5bb1893694c..1ceee103a877 100644 --- a/reference/4.0/Microsoft.PowerShell.Management/Restart-Service.md +++ b/reference/4.0/Microsoft.PowerShell.Management/Restart-Service.md @@ -17,19 +17,22 @@ Stops and then starts one or more services. ### InputObject (Default) ``` -Restart-Service [-Force] [-InputObject] <ServiceController[]> [-PassThru] [-Include <String[]>] - [-Exclude <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] +Restart-Service [-InputObject] <ServiceController[]> + [-Force] [-PassThru] [-Include <String[]>] [-Exclude <String[]>] + [-WhatIf] [-Confirm] [<CommonParameters>] ``` ### Default ``` -Restart-Service [-Force] [-Name] <String[]> [-PassThru] [-Include <String[]>] [-Exclude <String[]>] [-WhatIf] - [-Confirm] [<CommonParameters>] +Restart-Service [-Name] <String[]> + [-Force] [-PassThru] [-Include <String[]>] [-Exclude <String[]>] + [-WhatIf] [-Confirm] [<CommonParameters>] ``` ### DisplayName ``` -Restart-Service [-Force] [-PassThru] -DisplayName <String[]> [-Include <String[]>] [-Exclude <String[]>] +Restart-Service -DisplayName <String[]> + [-Force] [-PassThru] [-Include <String[]>] [-Exclude <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ``` @@ -144,7 +147,7 @@ Parameter Sets: InputObject Aliases: Required: True -Position: 1 +Position: 0 Default value: None Accept pipeline input: True (ByValue) Accept wildcard characters: False @@ -159,7 +162,7 @@ Parameter Sets: Default Aliases: ServiceName Required: True -Position: 1 +Position: 0 Default value: None Accept pipeline input: True (ByPropertyName, ByValue) Accept wildcard characters: False diff --git a/reference/4.0/Microsoft.PowerShell.Management/Resume-Service.md b/reference/4.0/Microsoft.PowerShell.Management/Resume-Service.md index cbe185b557aa..4d54cba85312 100644 --- a/reference/4.0/Microsoft.PowerShell.Management/Resume-Service.md +++ b/reference/4.0/Microsoft.PowerShell.Management/Resume-Service.md @@ -17,20 +17,23 @@ Resumes one or more suspended (paused) services. ### InputObject (Default) ``` -Resume-Service [-InputObject] <ServiceController[]> [-PassThru] [-Include <String[]>] [-Exclude <String[]>] +Resume-Service [-InputObject] <ServiceController[]> + [-PassThru] [-Include <String[]>] [-Exclude <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ``` ### Default ``` -Resume-Service [-Name] <String[]> [-PassThru] [-Include <String[]>] [-Exclude <String[]>] [-WhatIf] [-Confirm] - [<CommonParameters>] +Resume-Service [-Name] <String[]> + [-PassThru] [-Include <String[]>] [-Exclude <String[]>] + [-WhatIf] [-Confirm] [<CommonParameters>] ``` ### DisplayName ``` -Resume-Service [-PassThru] -DisplayName <String[]> [-Include <String[]>] [-Exclude <String[]>] [-WhatIf] - [-Confirm] [<CommonParameters>] +Resume-Service -DisplayName <String[]> + [-PassThru] [-Include <String[]>] [-Exclude <String[]>] + [-WhatIf] [-Confirm] [<CommonParameters>] ``` ## DESCRIPTION @@ -125,7 +128,7 @@ Parameter Sets: InputObject Aliases: Required: True -Position: 1 +Position: 0 Default value: None Accept pipeline input: True (ByValue) Accept wildcard characters: False @@ -143,7 +146,7 @@ Parameter Sets: Default Aliases: ServiceName Required: True -Position: 1 +Position: 0 Default value: None Accept pipeline input: True (ByPropertyName, ByValue) Accept wildcard characters: False diff --git a/reference/5.0/Microsoft.PowerShell.Core/About/about_Operator_Precedence.md b/reference/5.0/Microsoft.PowerShell.Core/About/about_Operator_Precedence.md index 01d129ccc4bb..de68aea9a86c 100644 --- a/reference/5.0/Microsoft.PowerShell.Core/About/about_Operator_Precedence.md +++ b/reference/5.0/Microsoft.PowerShell.Core/About/about_Operator_Precedence.md @@ -77,7 +77,7 @@ order: |OPERATOR |REFERENCE| |--------------------------|---------| |`-band -bor -bxor` |[about_Arithmetic_Operators](about_Arithmetic_Operators.md)| -|`-and -or -xor` |[about_comparison_operators](about_comparison_operators.md)| +|`-and -or -xor` |[about_Logical_Operators](about_logical_operators.md)| |`.` (dot-source) |[about_Scopes](about_Scopes.md)| |`&` (call) |[about_Operators](about_Operators.md)| || (pipeline operator)|[about_Operators](about_Operators.md)| diff --git a/reference/5.0/Microsoft.PowerShell.Core/Get-Command.md b/reference/5.0/Microsoft.PowerShell.Core/Get-Command.md index 885947657a4a..f3d28f586d14 100644 --- a/reference/5.0/Microsoft.PowerShell.Core/Get-Command.md +++ b/reference/5.0/Microsoft.PowerShell.Core/Get-Command.md @@ -255,7 +255,7 @@ To detect dynamic parameters that are available only when certain other paramete To detect the dynamic parameters that a provider adds to a cmdlet, set the value of the *ArgumentList* parameter to a path in the provider drive, such as WSMan:, HKLM:, or Cert:. When the command is a Windows PowerShell provider cmdlet, enter only one path in each command. The provider cmdlets return only the dynamic parameters for the first path the value of *ArgumentList*. -For information about the provider cmdlets, see about_Providers (http://go.microsoft.com/fwlink/?LinkID=113250) in the TechNet library. +For information about the provider cmdlets, see [about_Providers](About/about_Providers.md). ```yaml Type: Object[] diff --git a/reference/5.0/Microsoft.PowerShell.Core/Get-Help.md b/reference/5.0/Microsoft.PowerShell.Core/Get-Help.md index 9d00e202db9a..c7b869056476 100644 --- a/reference/5.0/Microsoft.PowerShell.Core/Get-Help.md +++ b/reference/5.0/Microsoft.PowerShell.Core/Get-Help.md @@ -513,7 +513,7 @@ To see the custom cmdlet help for a provider path, go to the provider path locat You can also find custom cmdlet help online in the provider help section of the help topics. For example, you can find help for the **New-Item** cmdlet in the Wsman:\*\ClientCertificate path (http://go.microsoft.com/fwlink/?LinkID=158676). -For more information about Windows PowerShell providers, see about_Providers (http://go.microsoft.com/fwlink/?LinkID=113250) in the TechNet library. +For more information about Windows PowerShell providers, see [about_Providers](About/about_Providers.md). ```yaml Type: String diff --git a/reference/5.0/Microsoft.PowerShell.Management/Get-Content.md b/reference/5.0/Microsoft.PowerShell.Management/Get-Content.md index 3c363fae179e..a60d62e83ce7 100644 --- a/reference/5.0/Microsoft.PowerShell.Management/Get-Content.md +++ b/reference/5.0/Microsoft.PowerShell.Management/Get-Content.md @@ -372,7 +372,7 @@ This cmdlet returns strings or bytes. The output type depends upon the content that it gets. ## NOTES -* This cmdlet is designed to work with the data exposed by any provider. To get the providers in your session, use the Get-PSProvider cmdlet. For more information, see about_Providers(http://go.microsoft.com/fwlink/?LinkID=113250). +* This cmdlet is designed to work with the data exposed by any provider. To get the providers in your session, use the Get-PSProvider cmdlet. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md) * diff --git a/reference/5.0/Microsoft.PowerShell.Management/Get-PSDrive.md b/reference/5.0/Microsoft.PowerShell.Management/Get-PSDrive.md index 316fd31d18a7..ffbf081e61a7 100644 --- a/reference/5.0/Microsoft.PowerShell.Management/Get-PSDrive.md +++ b/reference/5.0/Microsoft.PowerShell.Management/Get-PSDrive.md @@ -313,7 +313,7 @@ You cannot pipe objects to this cmdlet. This cmdlet returns objects that represent the drives in the session. ## NOTES -* This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, use the Get-PSProvider cmdlet. For more information, see about_Providers (http://go.microsoft.com/fwlink/?LinkID=113250). +* This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, use the Get-PSProvider cmdlet. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). * Mapped network drives that are created by using the *Persist* parameter of the New-PSDrive cmdlet are specific to a user account. Mapped network drives that you create in sessions that are started with the Run as administrator option or with the credentials of another user are not visible in sessions that are started without explicit credentials or with the credentials of the current user. ## RELATED LINKS diff --git a/reference/5.0/Microsoft.PowerShell.Management/New-PSDrive.md b/reference/5.0/Microsoft.PowerShell.Management/New-PSDrive.md index 128108975eef..c4a1cf5882e9 100644 --- a/reference/5.0/Microsoft.PowerShell.Management/New-PSDrive.md +++ b/reference/5.0/Microsoft.PowerShell.Management/New-PSDrive.md @@ -391,7 +391,7 @@ You cannot pipe input to this cmdlet. ### System.Management.Automation.PSDriveInfo ## NOTES -* **New-PSDrive** is designed to work with the data exposed by any provider. To list the providers available in your session, use **Get-PSProvider**. For more information about providers, see about_Providers (http://go.microsoft.com/fwlink/?LinkID=113250). +* **New-PSDrive** is designed to work with the data exposed by any provider. To list the providers available in your session, use **Get-PSProvider**. For more information about providers, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). * Mapped network drives are specific to a user account. Mapped network drives that you create in sessions that are started by using the Run as administrator option or by using the credential of another user are not visible in a session that was started without explicit credentials, or by using the credentials of the current user. ## RELATED LINKS diff --git a/reference/5.0/Microsoft.PowerShell.Management/Remove-PSDrive.md b/reference/5.0/Microsoft.PowerShell.Management/Remove-PSDrive.md index 052d8763b2a6..71f832d53297 100644 --- a/reference/5.0/Microsoft.PowerShell.Management/Remove-PSDrive.md +++ b/reference/5.0/Microsoft.PowerShell.Management/Remove-PSDrive.md @@ -202,7 +202,7 @@ You can pipe a drive object, such as one from the Get-PSDrive cmdlet, to the thi This cmdlet does not return any output. ## NOTES -* **Remove-PSDrive** is designed to work with the data exposed by any Windows PowerShell provider. To list the providers in your session, use the Get-PSProvider cmdlet. For more information, see about_Providers (http://go.microsoft.com/fwlink/?LinkID=113250). +* **Remove-PSDrive** is designed to work with the data exposed by any Windows PowerShell provider. To list the providers in your session, use the Get-PSProvider cmdlet. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). * diff --git a/reference/5.0/Microsoft.PowerShell.Management/Restart-Service.md b/reference/5.0/Microsoft.PowerShell.Management/Restart-Service.md index 058cf5c8df33..a30b808150a7 100644 --- a/reference/5.0/Microsoft.PowerShell.Management/Restart-Service.md +++ b/reference/5.0/Microsoft.PowerShell.Management/Restart-Service.md @@ -17,19 +17,22 @@ Stops and then starts one or more services. ### InputObject (Default) ``` -Restart-Service [-Force] [-InputObject] <ServiceController[]> [-PassThru] [-Include <String[]>] - [-Exclude <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] +Restart-Service [-InputObject] <ServiceController[]> + [-Force] [-PassThru] [-Include <String[]>] [-Exclude <String[]>] + [-WhatIf] [-Confirm] [<CommonParameters>] ``` ### Default ``` -Restart-Service [-Force] [-Name] <String[]> [-PassThru] [-Include <String[]>] [-Exclude <String[]>] [-WhatIf] - [-Confirm] [<CommonParameters>] +Restart-Service [-Name] <String[]> + [-Force] [-PassThru] [-Include <String[]>] [-Exclude <String[]>] + [-WhatIf] [-Confirm] [<CommonParameters>] ``` ### DisplayName ``` -Restart-Service [-Force] [-PassThru] -DisplayName <String[]> [-Include <String[]>] [-Exclude <String[]>] +Restart-Service -DisplayName <String[]> + [-Force] [-PassThru] [-Include <String[]>] [-Exclude <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ``` diff --git a/reference/5.0/Microsoft.PowerShell.Management/Resume-Service.md b/reference/5.0/Microsoft.PowerShell.Management/Resume-Service.md index 6e2a3001e068..aed2fe434e88 100644 --- a/reference/5.0/Microsoft.PowerShell.Management/Resume-Service.md +++ b/reference/5.0/Microsoft.PowerShell.Management/Resume-Service.md @@ -17,20 +17,23 @@ Resumes one or more suspended (paused) services. ### InputObject (Default) ``` -Resume-Service [-InputObject] <ServiceController[]> [-PassThru] [-Include <String[]>] [-Exclude <String[]>] +Resume-Service [-InputObject] <ServiceController[]> + [-PassThru] [-Include <String[]>] [-Exclude <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ``` ### Default ``` -Resume-Service [-Name] <String[]> [-PassThru] [-Include <String[]>] [-Exclude <String[]>] [-WhatIf] [-Confirm] - [<CommonParameters>] +Resume-Service [-Name] <String[]> + [-PassThru] [-Include <String[]>] [-Exclude <String[]>] + [-WhatIf] [-Confirm] [<CommonParameters>] ``` ### DisplayName ``` -Resume-Service [-PassThru] -DisplayName <String[]> [-Include <String[]>] [-Exclude <String[]>] [-WhatIf] - [-Confirm] [<CommonParameters>] +Resume-Service -DisplayName <String[]> + [-PassThru] [-Include <String[]>] [-Exclude <String[]>] + [-WhatIf] [-Confirm] [<CommonParameters>] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_Operator_Precedence.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_Operator_Precedence.md index 01d129ccc4bb..de68aea9a86c 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_Operator_Precedence.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_Operator_Precedence.md @@ -77,7 +77,7 @@ order: |OPERATOR |REFERENCE| |--------------------------|---------| |`-band -bor -bxor` |[about_Arithmetic_Operators](about_Arithmetic_Operators.md)| -|`-and -or -xor` |[about_comparison_operators](about_comparison_operators.md)| +|`-and -or -xor` |[about_Logical_Operators](about_logical_operators.md)| |`.` (dot-source) |[about_Scopes](about_Scopes.md)| |`&` (call) |[about_Operators](about_Operators.md)| || (pipeline operator)|[about_Operators](about_Operators.md)| diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_Signing.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_Signing.md index e5836ac5ec8e..72d6fcce99a7 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_Signing.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_Signing.md @@ -103,7 +103,7 @@ from other sources. Before you sign any script, examine each command to verify that it is safe to run. For best practices about code signing, see "Code-Signing -Best Practices" at http://go.microsoft.com/fwlink/?LinkId=119096. +Best Practices" at http://download.microsoft.com/download/a/f/7/af7777e5-7dcd-4800-8a0a-b18336565f5b/best_practices.doc. For more information about how to sign a script file, see Set-AuthenticodeSignature. diff --git a/reference/5.1/Microsoft.PowerShell.Core/Get-Command.md b/reference/5.1/Microsoft.PowerShell.Core/Get-Command.md index f34d0e1f36c7..d67e4cdcafb0 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/Get-Command.md +++ b/reference/5.1/Microsoft.PowerShell.Core/Get-Command.md @@ -255,7 +255,7 @@ To detect dynamic parameters that are available only when certain other paramete To detect the dynamic parameters that a provider adds to a cmdlet, set the value of the *ArgumentList* parameter to a path in the provider drive, such as WSMan:, HKLM:, or Cert:. When the command is a Windows PowerShell provider cmdlet, enter only one path in each command. The provider cmdlets return only the dynamic parameters for the first path the value of *ArgumentList*. -For information about the provider cmdlets, see about_Providers (http://go.microsoft.com/fwlink/?LinkID=113250) in the TechNet library. +For information about the provider cmdlets, see [about_Providers](About/about_Providers.md). ```yaml Type: Object[] diff --git a/reference/5.1/Microsoft.PowerShell.Core/Get-Help.md b/reference/5.1/Microsoft.PowerShell.Core/Get-Help.md index 5dfe0c30b82b..7288c23a4907 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/Get-Help.md +++ b/reference/5.1/Microsoft.PowerShell.Core/Get-Help.md @@ -513,7 +513,7 @@ To see the custom cmdlet help for a provider path, go to the provider path locat You can also find custom cmdlet help online in the provider help section of the help topics. For example, you can find help for the **New-Item** cmdlet in the Wsman:\*\ClientCertificate path (http://go.microsoft.com/fwlink/?LinkID=158676). -For more information about Windows PowerShell providers, see about_Providers (http://go.microsoft.com/fwlink/?LinkID=113250) in the TechNet library. +For more information about Windows PowerShell providers, see [about_Providers](About/about_Providers.md). ```yaml Type: String diff --git a/reference/5.1/Microsoft.PowerShell.Management/Get-Content.md b/reference/5.1/Microsoft.PowerShell.Management/Get-Content.md index 3c363fae179e..a60d62e83ce7 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Get-Content.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Get-Content.md @@ -372,7 +372,7 @@ This cmdlet returns strings or bytes. The output type depends upon the content that it gets. ## NOTES -* This cmdlet is designed to work with the data exposed by any provider. To get the providers in your session, use the Get-PSProvider cmdlet. For more information, see about_Providers(http://go.microsoft.com/fwlink/?LinkID=113250). +* This cmdlet is designed to work with the data exposed by any provider. To get the providers in your session, use the Get-PSProvider cmdlet. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md) * diff --git a/reference/5.1/Microsoft.PowerShell.Management/Get-PSDrive.md b/reference/5.1/Microsoft.PowerShell.Management/Get-PSDrive.md index dc537a246bb8..c9c81390aa87 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Get-PSDrive.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Get-PSDrive.md @@ -278,7 +278,7 @@ You cannot pipe objects to this cmdlet. This cmdlet returns objects that represent the drives in the session. ## NOTES -* This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, use the **Get-PSProvider** cmdlet. For more information, see about_Providers (http://go.microsoft.com/fwlink/?LinkID=113250). +* This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, use the **Get-PSProvider** cmdlet. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). * Mapped network drives that are created by using the *Persist* parameter of the New-PSDrive cmdlet are specific to a user account. Mapped network drives that you create in sessions that are started with the Run as administrator option or with the credentials of another user are not visible in sessions that are started without explicit credentials or with the credentials of the current user. ## RELATED LINKS diff --git a/reference/5.1/Microsoft.PowerShell.Management/New-PSDrive.md b/reference/5.1/Microsoft.PowerShell.Management/New-PSDrive.md index 128108975eef..c4a1cf5882e9 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/New-PSDrive.md +++ b/reference/5.1/Microsoft.PowerShell.Management/New-PSDrive.md @@ -391,7 +391,7 @@ You cannot pipe input to this cmdlet. ### System.Management.Automation.PSDriveInfo ## NOTES -* **New-PSDrive** is designed to work with the data exposed by any provider. To list the providers available in your session, use **Get-PSProvider**. For more information about providers, see about_Providers (http://go.microsoft.com/fwlink/?LinkID=113250). +* **New-PSDrive** is designed to work with the data exposed by any provider. To list the providers available in your session, use **Get-PSProvider**. For more information about providers, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). * Mapped network drives are specific to a user account. Mapped network drives that you create in sessions that are started by using the Run as administrator option or by using the credential of another user are not visible in a session that was started without explicit credentials, or by using the credentials of the current user. ## RELATED LINKS diff --git a/reference/5.1/Microsoft.PowerShell.Management/Remove-PSDrive.md b/reference/5.1/Microsoft.PowerShell.Management/Remove-PSDrive.md index 052d8763b2a6..71f832d53297 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Remove-PSDrive.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Remove-PSDrive.md @@ -202,7 +202,7 @@ You can pipe a drive object, such as one from the Get-PSDrive cmdlet, to the thi This cmdlet does not return any output. ## NOTES -* **Remove-PSDrive** is designed to work with the data exposed by any Windows PowerShell provider. To list the providers in your session, use the Get-PSProvider cmdlet. For more information, see about_Providers (http://go.microsoft.com/fwlink/?LinkID=113250). +* **Remove-PSDrive** is designed to work with the data exposed by any Windows PowerShell provider. To list the providers in your session, use the Get-PSProvider cmdlet. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). * diff --git a/reference/5.1/Microsoft.PowerShell.Management/Restart-Service.md b/reference/5.1/Microsoft.PowerShell.Management/Restart-Service.md index 5acef419a0e0..1a7270212f3d 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Restart-Service.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Restart-Service.md @@ -17,19 +17,22 @@ Stops and then starts one or more services. ### InputObject (Default) ``` -Restart-Service [-Force] [-InputObject] <ServiceController[]> [-PassThru] [-Include <String[]>] - [-Exclude <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] +Restart-Service [-InputObject] <ServiceController[]> + [-Force] [-PassThru] [-Include <String[]>] [-Exclude <String[]>] + [-WhatIf] [-Confirm] [<CommonParameters>] ``` ### Default ``` -Restart-Service [-Force] [-Name] <String[]> [-PassThru] [-Include <String[]>] [-Exclude <String[]>] [-WhatIf] - [-Confirm] [<CommonParameters>] +Restart-Service [-Name] <String[]> + [-Force] [-PassThru] [-Include <String[]>] [-Exclude <String[]>] + [-WhatIf] [-Confirm] [<CommonParameters>] ``` ### DisplayName ``` -Restart-Service [-Force] [-PassThru] -DisplayName <String[]> [-Include <String[]>] [-Exclude <String[]>] +Restart-Service -DisplayName <String[]> + [-Force] [-PassThru] [-Include <String[]>] [-Exclude <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ``` diff --git a/reference/5.1/Microsoft.PowerShell.Management/Resume-Service.md b/reference/5.1/Microsoft.PowerShell.Management/Resume-Service.md index 6e2a3001e068..aed2fe434e88 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Resume-Service.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Resume-Service.md @@ -17,20 +17,23 @@ Resumes one or more suspended (paused) services. ### InputObject (Default) ``` -Resume-Service [-InputObject] <ServiceController[]> [-PassThru] [-Include <String[]>] [-Exclude <String[]>] +Resume-Service [-InputObject] <ServiceController[]> + [-PassThru] [-Include <String[]>] [-Exclude <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ``` ### Default ``` -Resume-Service [-Name] <String[]> [-PassThru] [-Include <String[]>] [-Exclude <String[]>] [-WhatIf] [-Confirm] - [<CommonParameters>] +Resume-Service [-Name] <String[]> + [-PassThru] [-Include <String[]>] [-Exclude <String[]>] + [-WhatIf] [-Confirm] [<CommonParameters>] ``` ### DisplayName ``` -Resume-Service [-PassThru] -DisplayName <String[]> [-Include <String[]>] [-Exclude <String[]>] [-WhatIf] - [-Confirm] [<CommonParameters>] +Resume-Service -DisplayName <String[]> + [-PassThru] [-Include <String[]>] [-Exclude <String[]>] + [-WhatIf] [-Confirm] [<CommonParameters>] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Management/Suspend-Service.md b/reference/5.1/Microsoft.PowerShell.Management/Suspend-Service.md index 021f265adbe5..56de319378ef 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Suspend-Service.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Suspend-Service.md @@ -226,7 +226,7 @@ Otherwise, this cmdlet does not generate any output. ## NOTES * **Suspend-Service** can control services only when the current user has permission to do this. If a command does not work correctly, you might not have the required permissions. -* **Suspend-Service** can suspend only services that support being suspended and resumed. To determine whether a particular service can be suspended, use the Get-Service cmdlet together with the **CanPauseAndContinue** property. For example, `Get-Service wmi | Format-List Name, CanPauseAndContinue`. To find all services on the computer that can be suspended, type `Get-Service | Where-Object {$_.CanPauseAndContinue -eq "True"}`. +* **Suspend-Service** can suspend only services that support being suspended and resumed. To determine whether a particular service can be suspended, use the Get-Service cmdlet together with the **CanPauseAndContinue** property. For example, `Get-Service wmi | Format-List Name, CanPauseAndContinue`. To find all services on the computer that can be suspended, type `Get-Service | Where-Object {$_.CanPauseAndContinue -eq $true}`. * To find the service names and display names of the services on your system, type **Get-Service**. The service names appear in the **Name** column, and the display names appear in the **DisplayName** column. ## RELATED LINKS diff --git a/reference/5.1/Microsoft.PowerShell.Security/Protect-CmsMessage.md b/reference/5.1/Microsoft.PowerShell.Security/Protect-CmsMessage.md index 894045645d19..b34df921d9ca 100644 --- a/reference/5.1/Microsoft.PowerShell.Security/Protect-CmsMessage.md +++ b/reference/5.1/Microsoft.PowerShell.Security/Protect-CmsMessage.md @@ -50,7 +50,9 @@ For an example of a certificate that would work for document encryption, see Exa ### Example 1: Create a certificate for encrypting content ``` -PS C:\> [Version] +PS C:\> # Create .INF file for certreq + +PS C:\> {[Version] Signature = "$Windows NT$" [Strings] @@ -71,8 +73,9 @@ ValidityPeriodUnits = "1000" [Extensions] %szOID_ENHANCED_KEY_USAGE% = "{text}%szOID_DOCUMENT_ENCRYPTION%" +} | Out-File -FilePath DocumentEncryption.inf -After you have created your certificate file, run the following command to add the certificate file to the certificate store.Now you are ready to encrypt and decrypt content with the next two examples. +# After you have created your certificate file, run the following command to add the certificate file to the certificate store.Now you are ready to encrypt and decrypt content with the next two examples. PS C:\> Certreq -new DocumentEncryption.inf DocumentEncryption.cer ``` diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Operator_Precedence.md b/reference/6/Microsoft.PowerShell.Core/About/about_Operator_Precedence.md index 01d129ccc4bb..de68aea9a86c 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Operator_Precedence.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Operator_Precedence.md @@ -77,7 +77,7 @@ order: |OPERATOR |REFERENCE| |--------------------------|---------| |`-band -bor -bxor` |[about_Arithmetic_Operators](about_Arithmetic_Operators.md)| -|`-and -or -xor` |[about_comparison_operators](about_comparison_operators.md)| +|`-and -or -xor` |[about_Logical_Operators](about_logical_operators.md)| |`.` (dot-source) |[about_Scopes](about_Scopes.md)| |`&` (call) |[about_Operators](about_Operators.md)| || (pipeline operator)|[about_Operators](about_Operators.md)| diff --git a/reference/6/Microsoft.PowerShell.Core/Get-Command.md b/reference/6/Microsoft.PowerShell.Core/Get-Command.md index f34d0e1f36c7..d67e4cdcafb0 100644 --- a/reference/6/Microsoft.PowerShell.Core/Get-Command.md +++ b/reference/6/Microsoft.PowerShell.Core/Get-Command.md @@ -255,7 +255,7 @@ To detect dynamic parameters that are available only when certain other paramete To detect the dynamic parameters that a provider adds to a cmdlet, set the value of the *ArgumentList* parameter to a path in the provider drive, such as WSMan:, HKLM:, or Cert:. When the command is a Windows PowerShell provider cmdlet, enter only one path in each command. The provider cmdlets return only the dynamic parameters for the first path the value of *ArgumentList*. -For information about the provider cmdlets, see about_Providers (http://go.microsoft.com/fwlink/?LinkID=113250) in the TechNet library. +For information about the provider cmdlets, see [about_Providers](About/about_Providers.md). ```yaml Type: Object[] diff --git a/reference/6/Microsoft.PowerShell.Core/Get-Help.md b/reference/6/Microsoft.PowerShell.Core/Get-Help.md index a72f63506721..f6ee740efbf4 100644 --- a/reference/6/Microsoft.PowerShell.Core/Get-Help.md +++ b/reference/6/Microsoft.PowerShell.Core/Get-Help.md @@ -507,7 +507,7 @@ To see the custom cmdlet help for a provider path, go to the provider path locat You can also find custom cmdlet help online in the provider help section of the help topics. For example, you can find help for the **New-Item** cmdlet in the Wsman:\*\ClientCertificate path (http://go.microsoft.com/fwlink/?LinkID=158676). -For more information about Windows PowerShell providers, see about_Providers (http://go.microsoft.com/fwlink/?LinkID=113250) in the TechNet library. +For more information about Windows PowerShell providers, see [about_Providers](About/about_Providers.md). ```yaml Type: String diff --git a/reference/6/Microsoft.PowerShell.Core/help.md b/reference/6/Microsoft.PowerShell.Core/help.md index e39ef257f13b..538caecdec98 100644 --- a/reference/6/Microsoft.PowerShell.Core/help.md +++ b/reference/6/Microsoft.PowerShell.Core/help.md @@ -510,7 +510,7 @@ To see the custom cmdlet help for a provider path, go to the provider path locat You can also find custom cmdlet help online in the provider help section of the help topics. For example, you can find help for the New-Item cmdlet in the Wsman:\*\ClientCertificate path (http://go.microsoft.com/fwlink/?LinkID=158676). -For more information about Windows PowerShell providers, see about_Providers (http://go.microsoft.com/fwlink/?LinkID=113250) in the TechNet library. +For more information about Windows PowerShell providers, see [about_Providers](About/about_Providers.md). ```yaml Type: String diff --git a/reference/6/Microsoft.PowerShell.LocalAccounts/Add-LocalGroupMember.md b/reference/6/Microsoft.PowerShell.LocalAccounts/Add-LocalGroupMember.md deleted file mode 100644 index 5a12c590c3fa..000000000000 --- a/reference/6/Microsoft.PowerShell.LocalAccounts/Add-LocalGroupMember.md +++ /dev/null @@ -1,179 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -online version: http://go.microsoft.com/fwlink/?LinkId=822507 -external help file: Microsoft.Powershell.LocalAccounts.dll-Help.xml -title: Add-LocalGroupMember ---- - -# Add-LocalGroupMember - -## SYNOPSIS -Adds members to a local group. - -## SYNTAX - -### Group -``` -Add-LocalGroupMember [-Group] <LocalGroup> [-Member] <LocalPrincipal[]> [-WhatIf] [-Confirm] - [<CommonParameters>] -``` - -### Default -``` -Add-LocalGroupMember [-Member] <LocalPrincipal[]> [-Name] <String> [-WhatIf] [-Confirm] [<CommonParameters>] -``` - -### SecurityIdentifier -``` -Add-LocalGroupMember [-Member] <LocalPrincipal[]> [-SID] <SecurityIdentifier> [-WhatIf] [-Confirm] - [<CommonParameters>] -``` - -## DESCRIPTION -The **Add-LocalGroupMember** cmdlet adds users or groups to a local security group. -All the rights and permissions that are assigned to a group are assigned to all members of that group. - -Members of the Administrators group on a local computer have Full Control permissions on that computer. -Limit the number of users in the Administrators group. - -If the computer is joined to a domain, you can add user accounts, computer accounts, and group accounts from that domain and from trusted domains to a local group. - -## EXAMPLES - -### Example 1: Add members to the Administrators group -``` -PS C:\> Add-LocalGroupMember -Group "Administrators" -Member "Admin02", "MicrosoftAccount\username@Outlook.com", "AzureAD\DavidChew@contoso.com", "CONTOSO\Domain Admins" -``` - -This command adds several members to the local Administrators group. -The new members include a local user account, a Microsoft account, an Azure Active Directory account, and a domain group. -This example uses a placeholder value for the user name of an account at Outlook.com. - -## PARAMETERS - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Group -Specifies the security group to which this cmdlet adds members. - -```yaml -Type: LocalGroup -Parameter Sets: Group -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Member -Specifies an array of users or groups that this cmdlet adds to a security group. -You can specify users or groups by name, security ID (SID), or **LocalPrincipal** objects. - -```yaml -Type: LocalPrincipal[] -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Name -Specifies the name of the security group to which this cmdlet adds members. - -```yaml -Type: String -Parameter Sets: Default -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SID -Specifies the security ID of the security group to which this cmdlet adds members. - -```yaml -Type: SecurityIdentifier -Parameter Sets: SecurityIdentifier -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### System.Management.Automation.SecurityAccountsManager.LocalGroup, System.String, System.Security.Principal.SecurityIdentifier -You can pipe a local principal, a string, or a SID to this cmdlet. - -## OUTPUTS - -### None -This cmdlet does not generate any output. - -## NOTES -* The **PrincipalSource** property is a property on **LocalUser**, **LocalGroup**, and **LocalPrincipal** objects that describes the source of the object. The possible sources are as follows: - -- Local -- Active Directory -- Azure Active Directory group -- Microsoft Account - -**PrincipalSource** is supported only by Windows 10, Windows Server 2016, and later versions of the Windows operating system. For earlier versions, the property is blank. - -## RELATED LINKS - -[Get-LocalGroupMember](Get-LocalGroupMember.md) - -[New-LocalGroup](New-LocalGroup.md) - -[Remove-LocalGroupMember](Remove-LocalGroupMember.md) - diff --git a/reference/6/Microsoft.PowerShell.LocalAccounts/Disable-LocalUser.md b/reference/6/Microsoft.PowerShell.LocalAccounts/Disable-LocalUser.md deleted file mode 100644 index 8199883c16c3..000000000000 --- a/reference/6/Microsoft.PowerShell.LocalAccounts/Disable-LocalUser.md +++ /dev/null @@ -1,170 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -online version: http://go.microsoft.com/fwlink/?LinkId=822508 -external help file: Microsoft.Powershell.LocalAccounts.dll-Help.xml -title: Disable-LocalUser ---- - -# Disable-LocalUser - -## SYNOPSIS -Disables a local user account. - -## SYNTAX - -### InputObject -``` -Disable-LocalUser [-InputObject] <LocalUser[]> [-WhatIf] [-Confirm] [<CommonParameters>] -``` - -### Default -``` -Disable-LocalUser [-Name] <String[]> [-WhatIf] [-Confirm] [<CommonParameters>] -``` - -### SecurityIdentifier -``` -Disable-LocalUser [-SID] <SecurityIdentifier[]> [-WhatIf] [-Confirm] [<CommonParameters>] -``` - -## DESCRIPTION -The **Disable-LocalUser** cmdlet disables local user accounts. -When a user account is disabled, the user cannot log on. -When a user account is enabled, the user can log on. - -## EXAMPLES - -### Example 1: Disable an account by specifying a name -``` -PS C:\> Disable-LocalUser -Name "Admin02" -``` - -This command disables the user account named Admin02. - -### Example 2: Disable an account by using the pipeline -``` -PS C:\> Get-LocalUser Guest | Disable-LocalUser -``` - -This command gets the built-in Guest account by using **Get-LocalUser**, and then passes it to the current cmdlet by using the pipeline operator. -That cmdlet disables that account. - -## PARAMETERS - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject -Specifies an array of user accounts that this cmdlet disables. -To obtain a user account, use the Get-LocalUser cmdlet. - -```yaml -Type: LocalUser[] -Parameter Sets: InputObject -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Name -Specifies an array of names of the user accounts that this cmdlet disables. - -```yaml -Type: String[] -Parameter Sets: Default -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SID -Specifies an array of user accounts that this cmdlet disables. - -```yaml -Type: SecurityIdentifier[] -Parameter Sets: SecurityIdentifier -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### System.Management.Automation.SecurityAccountsManager.LocalUser, System.String, System.Security.Principal.SecurityIdentifier -You can pipe a local user, a string, or a SID to this cmdlet. - -## OUTPUTS - -### None -This cmdlet does not generate any output. - -## NOTES -* The **PrincipalSource** property is a property on **LocalUser**, **LocalGroup**, and **LocalPrincipal** objects that describes the source of the object. The possible sources are as follows: - -- Local -- Active Directory -- Azure Active Directory group -- Microsoft Account - -**PrincipalSource** is supported only by Windows 10, Windows Server 2016, and later versions of the Windows operating system. For earlier versions, the property is blank. - -## RELATED LINKS - -[Enable-LocalUser](Enable-LocalUser.md) - -[Get-LocalUser](Get-LocalUser.md) - -[New-LocalUser](New-LocalUser.md) - -[Remove-LocalUser](Remove-LocalUser.md) - -[Rename-LocalUser](Rename-LocalUser.md) - -[Set-LocalUser](Set-LocalUser.md) - diff --git a/reference/6/Microsoft.PowerShell.LocalAccounts/Enable-LocalUser.md b/reference/6/Microsoft.PowerShell.LocalAccounts/Enable-LocalUser.md deleted file mode 100644 index 513afc222907..000000000000 --- a/reference/6/Microsoft.PowerShell.LocalAccounts/Enable-LocalUser.md +++ /dev/null @@ -1,170 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -online version: http://go.microsoft.com/fwlink/?LinkId=822510 -external help file: Microsoft.Powershell.LocalAccounts.dll-Help.xml -title: Enable-LocalUser ---- - -# Enable-LocalUser - -## SYNOPSIS -Enables a local user account. - -## SYNTAX - -### InputObject -``` -Enable-LocalUser [-InputObject] <LocalUser[]> [-WhatIf] [-Confirm] [<CommonParameters>] -``` - -### Default -``` -Enable-LocalUser [-Name] <String[]> [-WhatIf] [-Confirm] [<CommonParameters>] -``` - -### SecurityIdentifier -``` -Enable-LocalUser [-SID] <SecurityIdentifier[]> [-WhatIf] [-Confirm] [<CommonParameters>] -``` - -## DESCRIPTION -The **Enable-LocalUser** cmdlet enables local user accounts. -When a user account is disabled, the user cannot log on. -When a user account is enabled, the user can log on. - -## EXAMPLES - -### Example 1: Enable an account by specifying a name -``` -PS C:\> Enable-LocalUser -Name "Admin02" -``` - -This command enables the user account named Admin02. - -### Example 2: Enable an account by using the pipeline -``` -PS C:\> Get-LocalUser -Name "Administrator" | Enable-LocalUser -``` - -This command gets the built-in Administrator account by using **Get-LocalUser**, and then passes it to the current cmdlet by using the pipeline operator. -That cmdlet enables that account. - -## PARAMETERS - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject -Specifies an array of user accounts that this cmdlet enables. -To obtain a user account, use the Get-LocalUser cmdlet. - -```yaml -Type: LocalUser[] -Parameter Sets: InputObject -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Name -Specifies an array of names of the user accounts that this cmdlet enables. - -```yaml -Type: String[] -Parameter Sets: Default -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SID -Specifies an array of user accounts that this cmdlet enables. - -```yaml -Type: SecurityIdentifier[] -Parameter Sets: SecurityIdentifier -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### System.Management.Automation.SecurityAccountsManager.LocalUser, System.String, System.Security.Principal.SecurityIdentifier -You can pipe a local user, a string, or a SID to this cmdlet. - -## OUTPUTS - -### None -This cmdlet does not generate any output. - -## NOTES -* The **PrincipalSource** property is a property on **LocalUser**, **LocalGroup**, and **LocalPrincipal** objects that describes the source of the object. The possible sources are as follows: - -- Local -- Active Directory -- Azure Active Directory group -- Microsoft Account - -**PrincipalSource** is supported only by Windows 10, Windows Server 2016, and later versions of the Windows operating system. For earlier versions, the property is blank. - -## RELATED LINKS - -[Disable-LocalUser](Disable-LocalUser.md) - -[Get-LocalUser](Get-LocalUser.md) - -[New-LocalUser](New-LocalUser.md) - -[Remove-LocalUser](Remove-LocalUser.md) - -[Rename-LocalUser](Rename-LocalUser.md) - -[Set-LocalUser](Set-LocalUser.md) - diff --git a/reference/6/Microsoft.PowerShell.LocalAccounts/Get-LocalGroup.md b/reference/6/Microsoft.PowerShell.LocalAccounts/Get-LocalGroup.md deleted file mode 100644 index 4f33f8d9a6fb..000000000000 --- a/reference/6/Microsoft.PowerShell.LocalAccounts/Get-LocalGroup.md +++ /dev/null @@ -1,110 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -online version: http://go.microsoft.com/fwlink/?LinkId=822511 -external help file: Microsoft.Powershell.LocalAccounts.dll-Help.xml -title: Get-LocalGroup ---- - -# Get-LocalGroup - -## SYNOPSIS -Gets the local security groups. - -## SYNTAX - -### Default (Default) -``` -Get-LocalGroup [[-Name] <String[]>] [<CommonParameters>] -``` - -### SecurityIdentifier -``` -Get-LocalGroup [[-SID] <SecurityIdentifier[]>] [<CommonParameters>] -``` - -## DESCRIPTION -The **Get-LocalGroup** cmdlet gets local security groups in Security Account Manager. -This cmdlet gets default built-in groups and local security groups that you create. - -## EXAMPLES - -### Example 1: Get the Administrators group -``` -PS C:\> Get-LocalGroup -Name "Administrators" -Name Description ----- ----------- -Administrators Administrators have complete and unrestricted access to the computer/domain -``` - -This command gets the local Administrators group. -The command displays properties of the group in the console. - -## PARAMETERS - -### -Name -Specifies an array of names of security groups that this cmdlet gets. -You can use the wildcard character. - -```yaml -Type: String[] -Parameter Sets: Default -Aliases: - -Required: False -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SID -Specifies an array of security IDs (SIDs) of security groups that this cmdlet gets. - -```yaml -Type: SecurityIdentifier[] -Parameter Sets: SecurityIdentifier -Aliases: - -Required: False -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### System.String, System.Security.Principal.SecurityIdentifier -You can pipe a string or a SID to this cmdlet. - -## OUTPUTS - -### System.Management.Automation.SecurityAccountsManager.LocalGroup -This cmdlet returns a local group. - -## NOTES -* The **PrincipalSource** property is a property on **LocalUser**, **LocalGroup**, and **LocalPrincipal** objects that describes the source of the object. The possible sources are as follows: - -- Local -- Active Directory -- Azure Active Directory group -- Microsoft Account - -**PrincipalSource** is supported only by Windows 10, Windows Server 2016, and later versions of the Windows operating system. For earlier versions, the property is blank. - -## RELATED LINKS - -[New-LocalGroup](New-LocalGroup.md) - -[Remove-LocalGroup](Remove-LocalGroup.md) - -[Rename-LocalGroup](Rename-LocalGroup.md) - -[Set-LocalGroup](Set-LocalGroup.md) - diff --git a/reference/6/Microsoft.PowerShell.LocalAccounts/Get-LocalGroupMember.md b/reference/6/Microsoft.PowerShell.LocalAccounts/Get-LocalGroupMember.md deleted file mode 100644 index 05f3ead03de3..000000000000 --- a/reference/6/Microsoft.PowerShell.LocalAccounts/Get-LocalGroupMember.md +++ /dev/null @@ -1,147 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -online version: http://go.microsoft.com/fwlink/?LinkId=822512 -external help file: Microsoft.Powershell.LocalAccounts.dll-Help.xml -title: Get-LocalGroupMember ---- - -# Get-LocalGroupMember - -## SYNOPSIS -Gets members from a local group. - -## SYNTAX - -### Default (Default) -``` -Get-LocalGroupMember [[-Member] <String>] [-Name] <String> [<CommonParameters>] -``` - -### Group -``` -Get-LocalGroupMember [-Group] <LocalGroup> [[-Member] <String>] [<CommonParameters>] -``` - -### SecurityIdentifier -``` -Get-LocalGroupMember [[-Member] <String>] [-SID] <SecurityIdentifier> [<CommonParameters>] -``` - -## DESCRIPTION -The **Get-LocalGroupMember** cmdlet gets members from a local group. - -## EXAMPLES - -### Example 1: Get all members of the Administrators group -``` -PS C:\> Get-LocalGroupMember -Group "Administrators" -ObjectClass Name PrincipalSource ------------ ---- --------------- -User CONTOSOPC\Administrator Local -User CONTOSOPC\LocalAdmin Local -``` - -This command gets all the members of the local Administrators group. - -## PARAMETERS - -### -Group -Specifies the security group from which this cmdlet gets members. - -```yaml -Type: LocalGroup -Parameter Sets: Group -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Member -Specifies a user or group that this cmdlet gets from a security group. -You can specify users or groups by name or security ID (SID). -Specify SID strings in S-R-I-S-S . -. . -format. -You can use wildcard characters. -If you do not specify this parameter, the cmdlet gets all members of the group. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name -Specifies the name of the security group from which this cmdlet gets members. - -```yaml -Type: String -Parameter Sets: Default -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SID -Specifies the security ID of the security group from which this cmdlet gets members. - -```yaml -Type: SecurityIdentifier -Parameter Sets: SecurityIdentifier -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### System.Management.Automation.SecurityAccountsManager.LocalGroup, System.String, System.Security.Principal.SecurityIdentifier -You can pipe a local group, a string, or a SID to this cmdlet. - -## OUTPUTS - -### Microsoft.SecurityAccountsManager.LocalPrincipal -This cmdlet returns local principals. - -## NOTES -* The **PrincipalSource** property is a property on **LocalUser**, **LocalGroup**, and **LocalPrincipal** objects that describes the source of the object. The possible sources are as follows: - -- Local -- Active Directory -- Azure Active Directory group -- Microsoft Account - -**PrincipalSource** is supported only by Windows 10, Windows Server 2016, and later versions of the Windows operating system. For earlier versions, the property is blank. - -## RELATED LINKS - -[Add-LocalGroupMember](Add-LocalGroupMember.md) - -[New-LocalGroup](New-LocalGroup.md) - -[Remove-LocalGroupMember](Remove-LocalGroupMember.md) - diff --git a/reference/6/Microsoft.PowerShell.LocalAccounts/Get-LocalUser.md b/reference/6/Microsoft.PowerShell.LocalAccounts/Get-LocalUser.md deleted file mode 100644 index a07c2f4dc537..000000000000 --- a/reference/6/Microsoft.PowerShell.LocalAccounts/Get-LocalUser.md +++ /dev/null @@ -1,134 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -online version: http://go.microsoft.com/fwlink/?LinkId=822514 -external help file: Microsoft.Powershell.LocalAccounts.dll-Help.xml -title: Get-LocalUser ---- - -# Get-LocalUser - -## SYNOPSIS -Gets local user accounts. - -## SYNTAX - -### Default (Default) -``` -Get-LocalUser [[-Name] <String[]>] [<CommonParameters>] -``` - -### SecurityIdentifier -``` -Get-LocalUser [[-SID] <SecurityIdentifier[]>] [<CommonParameters>] -``` - -## DESCRIPTION -The **Get-LocalUser** cmdlet gets local user accounts. -This cmdlet gets default built-in user accounts, local user accounts that you created, and local accounts that you connected to Microsoft accounts. - -## EXAMPLES - -### Example 1: Get an account by using its name -``` -PS C:\> Get-LocalUser -Name "AdminContoso02" -Name Enabled Description ----- ------- ----------- -AdminContoso02 True Description of this account. -``` - -This command gets a user account named AdminContoso02. - -### Example 2: Get an account that is connected to a Microsoft account -``` -PS C:\> Get-LocalUser -Name "MicrosoftAccount\username@Outlook.com" -Name Enabled Description ----- ------- ----------- -MicrosoftAccount\user name@outlook.com True Description of this account. -``` - -This command gets a user account that is connected to a Microsoft account. -This example uses a placeholder value for the user name of an account at Outlook.com. - -### Example 3: Get an account that is connected to a Microsoft account -``` -PS C:\> Get-LocalUser -SecurityIdentifier "S-1-5-2" -Name Enabled Description ----- ------- ----------- -MicrosoftAccount\user name@contoso.com True Description of this account. -``` - -This command gets a local user account that has the specified SID. - -## PARAMETERS - -### -Name -Specifies an array of names of user accounts that this cmdlet gets. -You can use the wildcard character. - -```yaml -Type: String[] -Parameter Sets: Default -Aliases: - -Required: False -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SID -Specifies an array of security IDs (SIDs) of user accounts that this cmdlet gets. - -```yaml -Type: SecurityIdentifier[] -Parameter Sets: SecurityIdentifier -Aliases: - -Required: False -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### System.String, System.Security.Principal.SecurityIdentifier -You can pipe a string or SID to this cmdlet. - -## OUTPUTS - -### System.Management.Automation.SecurityAccountsManager.LocalUser[] -This cmdlet returns local user accounts. - -## NOTES -* The **PrincipalSource** property is a property on **LocalUser**, **LocalGroup**, and **LocalPrincipal** objects that describes the source of the object. The possible sources are as follows: - -- Local -- Active Directory -- Azure Active Directory group -- Microsoft Account - -**PrincipalSource** is supported only by Windows 10, Windows Server 2016, and later versions of the Windows operating system. For earlier versions, the property is blank. - -## RELATED LINKS - -[Disable-LocalUser](Disable-LocalUser.md) - -[Enable-LocalUser](Enable-LocalUser.md) - -[New-LocalUser](New-LocalUser.md) - -[Remove-LocalUser](Remove-LocalUser.md) - -[Rename-LocalUser](Rename-LocalUser.md) - -[Set-LocalUser](Set-LocalUser.md) - diff --git a/reference/6/Microsoft.PowerShell.LocalAccounts/Microsoft.PowerShell.LocalAccounts.md b/reference/6/Microsoft.PowerShell.LocalAccounts/Microsoft.PowerShell.LocalAccounts.md deleted file mode 100644 index 69f69afe3e2f..000000000000 --- a/reference/6/Microsoft.PowerShell.LocalAccounts/Microsoft.PowerShell.LocalAccounts.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-US -keywords: powershell,cmdlet -Help Version: 6.0 -Download Help Link: http://Please-enter-FwLink-manually -Module Guid: 8e362604-2c0b-448f-a414-a6a690a644e2 -title: Microsoft.PowerShell.LocalAccounts -Module Name: Microsoft.PowerShell.LocalAccounts ---- - -# Microsoft.PowerShell.LocalAccounts Module -## Description -This section contains the help topics for the Local Accounts cmdlets in Windows PowerShell. - -## Microsoft.PowerShell.LocalAccounts Cmdlets -### [Add-LocalGroupMember](Add-LocalGroupMember.md) -Adds members to a local group. - - -### [Disable-LocalUser](Disable-LocalUser.md) -Disables a local user account. - - -### [Enable-LocalUser](Enable-LocalUser.md) -Enables a local user account. - - -### [Get-LocalGroup](Get-LocalGroup.md) -Gets the local security groups. - - -### [Get-LocalGroupMember](Get-LocalGroupMember.md) -Gets members from a local group. - - -### [Get-LocalUser](Get-LocalUser.md) -Gets local user accounts. - - -### [New-LocalGroup](New-LocalGroup.md) -Creates a local security group. - - -### [New-LocalUser](New-LocalUser.md) -Creates a local user account. - - -### [Remove-LocalGroup](Remove-LocalGroup.md) -Deletes local security groups. - - -### [Remove-LocalGroupMember](Remove-LocalGroupMember.md) -Removes members from a local group. - - -### [Remove-LocalUser](Remove-LocalUser.md) -Deletes local user accounts. - - -### [Rename-LocalGroup](Rename-LocalGroup.md) -Renames a local security group. - - -### [Rename-LocalUser](Rename-LocalUser.md) -Renames a local user account. - - -### [Set-LocalGroup](Set-LocalGroup.md) -Changes a local security group. - - -### [Set-LocalUser](Set-LocalUser.md) -Modifies a local user account. diff --git a/reference/6/Microsoft.PowerShell.LocalAccounts/New-LocalGroup.md b/reference/6/Microsoft.PowerShell.LocalAccounts/New-LocalGroup.md deleted file mode 100644 index a43f56baa414..000000000000 --- a/reference/6/Microsoft.PowerShell.LocalAccounts/New-LocalGroup.md +++ /dev/null @@ -1,131 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -online version: http://go.microsoft.com/fwlink/?LinkId=822515 -external help file: Microsoft.Powershell.LocalAccounts.dll-Help.xml -title: New-LocalGroup ---- - -# New-LocalGroup - -## SYNOPSIS -Creates a local security group. - -## SYNTAX - -``` -New-LocalGroup [-Description <String>] [-Name] <String> [-WhatIf] [-Confirm] [<CommonParameters>] -``` - -## DESCRIPTION -The **New-LocalGroup** cmdlet creates a local security group in the Security Account Manager. - -## EXAMPLES - -### Example 1: Create a security group -``` -PS C:\> New-LocalGroup -Name "SecurityGroup04" -``` - -This command creates a group named SecurityGroup04. - -## PARAMETERS - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Description -Specifies a comment for the group. -The maximum length is 48 characters. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Name -Specifies a name for the group. -The maximum length is 256 characters. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### System.String -You can pipe a string to this cmdlet. - -## OUTPUTS - -### System.Management.Automation.SecurityAccountsManager.LocalGroup -This cmdlet returns a security group. - -## NOTES -* The **PrincipalSource** property is a property on **LocalUser**, **LocalGroup**, and **LocalPrincipal** objects that describes the source of the object. The possible sources are as follows: - -- Local -- Active Directory -- Azure Active Directory group -- Microsoft Account - -**PrincipalSource** is supported only by Windows 10, Windows Server 2016, and later versions of the Windows operating system. For earlier versions, the property is blank. - -## RELATED LINKS - -[Get-LocalGroup](Get-LocalGroup.md) - -[Remove-LocalGroup](Remove-LocalGroup.md) - -[Rename-LocalGroup](Rename-LocalGroup.md) - -[Set-LocalGroup](Set-LocalGroup.md) - diff --git a/reference/6/Microsoft.PowerShell.LocalAccounts/New-LocalUser.md b/reference/6/Microsoft.PowerShell.LocalAccounts/New-LocalUser.md deleted file mode 100644 index d3a89f15fea1..000000000000 --- a/reference/6/Microsoft.PowerShell.LocalAccounts/New-LocalUser.md +++ /dev/null @@ -1,315 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -online version: http://go.microsoft.com/fwlink/?LinkId=822516 -external help file: Microsoft.Powershell.LocalAccounts.dll-Help.xml -title: New-LocalUser ---- - -# New-LocalUser - -## SYNOPSIS -Creates a local user account. - -## SYNTAX - -### Password (Default) -``` -New-LocalUser [-AccountExpires <DateTime>] [-AccountNeverExpires] [-Description <String>] [-Disabled] - [-FullName <String>] [-Name] <String> -Password <SecureString> [-PasswordNeverExpires] - [-UserMayNotChangePassword] [-WhatIf] [-Confirm] [<CommonParameters>] -``` - -### NoPassword -``` -New-LocalUser [-AccountExpires <DateTime>] [-AccountNeverExpires] [-Description <String>] [-Disabled] - [-FullName <String>] [-Name] <String> [-NoPassword] [-UserMayNotChangePassword] [-WhatIf] [-Confirm] - [<CommonParameters>] -``` - -## DESCRIPTION -The **New-LocalUser** cmdlet creates a local user account. -This cmdlet creates a local user account or a local user account that is connected to a Microsoft account. - -## EXAMPLES - -### Example 1: Create a user account -``` -PS C:\> New-LocalUser -Name "User02" -Description "Description of this account." -NoPassword -Name Enabled Description ----- ------- ----------- -User02 True Description of this account. -``` - -This command creates a local user account. -The command does not specify the *AccountExpires* parameter. -Therefore, the account does not expire. - -### Example 2: Create a user account that has a password -``` -PS C:\> $Password = Read-Host -AsSecureString -PS C:\> New-LocalUser "User03" -Password $Password -FullName "Third User" -Description "Description of this account." -Name Enabled Description ----- ------- ----------- -User03 True Description of this account. -``` - -The first command prompts you for a password by using the Read-Host cmdlet. -The command stores the password as a secure string in the $Password variable. - -The second command creates a local user account by using the password stored in $Password. -The command specifies a user name, full name, and description for the user account. - -### Example 3: Create a user account that is connected to a Microsoft account -``` -PS C:\> New-LocalUser -Name "MicrosoftAccount\usr name@Outlook.com" -Description "Description of this account." -``` - -This command creates a local user account that is connected to a Microsoft account. -This example uses a placeholder value for the user name of an account at Outlook.com. -Because the account is connected to a Microsoft account, do not specify a password. - -## PARAMETERS - -### -AccountExpires -Specifies when the user account expires. -To obtain a **DateTime** object, use the Get-Date cmdlet. -If you do not specify this parameter, the account does not expire. - -```yaml -Type: DateTime -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -AccountNeverExpires -Indicates that the account does not expire. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Description -Specifies a comment for the user account. -The maximum length is 48 characters. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Disabled -Indicates that this cmdlet creates the user account as disabled. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -FullName -Specifies the full name for the user account. -The full name differs from the user name of the user account. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Name -Specifies the user name for the user account. - -If you create a local user account that is connected to a Microsoft account, specify the user name in the following format: `MicrosoftAccount\\`\<user name\>@`Outlook.com` for a user of a Microsoft account on Outlook.com. - -If you create a local user account for the local system, the user name can contain up to 20 uppercase characters or lowercase characters. -A user name cannot contain the following characters: - -" / \ \[ \] : ; | = , + * ? -\< \> @ - -A user name cannot consist only of periods (.) or spaces. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -NoPassword -Indicates that the user account does not have a password. - -```yaml -Type: SwitchParameter -Parameter Sets: NoPassword -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Password -Specifies a password for the user account. -You can use `Read-Host -GetCredential`, Get-Credential, or ConvertTo-SecureString to create a **SecureString** object for the password. - -If you omit the *Password* and *NoPassword* parameters, **New-LocalUser** prompts you for the new user's password. - -```yaml -Type: SecureString -Parameter Sets: Password -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -PasswordNeverExpires -Indicates whether the password expires. - -```yaml -Type: SwitchParameter -Parameter Sets: Password -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -UserMayNotChangePassword -Indicates that the user cannot change the password on the user account. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### System.String, System.DateTime, System.Boolean, System.Security.SecureString -You can pipe a string, a **DateTime** object, a **Boolean** value, or a secure string to this cmdlet. - -## OUTPUTS - -### System.Management.Automation.SecurityAccountsManager.LocalUser -This cmdlet returns a **LocalUser** object. -This object provides information about the user account. - -## NOTES -* A user name cannot be identical to any other user name or group name on the computer. A user name cannot consist only of periods (.) or spaces. A user name can contain up to 20 uppercase characters or lowercase characters. A user name cannot contain the following characters: - -" / \ \[ \] : ; | = , + * ? \< \> @ -* A password can contain up to 127 characters. -* The **PrincipalSource** property is a property on **LocalUser**, **LocalGroup**, and **LocalPrincipal** objects that describes the source of the object. The possible sources are as follows: - -- Local -- Active Directory -- Azure Active Directory group -- Microsoft Account - -**PrincipalSource** is supported only by Windows 10, Windows Server 2016, and later versions of the Windows operating system. For earlier versions, the property is blank. - -## RELATED LINKS - -[Disable-LocalUser](Disable-LocalUser.md) - -[Enable-LocalUser](Enable-LocalUser.md) - -[Get-LocalUser](Get-LocalUser.md) - -[Remove-LocalUser](Remove-LocalUser.md) - -[Rename-LocalUser](Rename-LocalUser.md) - -[Set-LocalUser](Set-LocalUser.md) - diff --git a/reference/6/Microsoft.PowerShell.LocalAccounts/Remove-LocalGroup.md b/reference/6/Microsoft.PowerShell.LocalAccounts/Remove-LocalGroup.md deleted file mode 100644 index afd958333f2e..000000000000 --- a/reference/6/Microsoft.PowerShell.LocalAccounts/Remove-LocalGroup.md +++ /dev/null @@ -1,181 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -online version: http://go.microsoft.com/fwlink/?LinkId=822517 -external help file: Microsoft.Powershell.LocalAccounts.dll-Help.xml -title: Remove-LocalGroup ---- - -# Remove-LocalGroup - -## SYNOPSIS -Deletes local security groups. - -## SYNTAX - -### InputObject -``` -Remove-LocalGroup [-InputObject] <LocalGroup[]> [-WhatIf] [-Confirm] [<CommonParameters>] -``` - -### Default -``` -Remove-LocalGroup [-Name] <String[]> [-WhatIf] [-Confirm] [<CommonParameters>] -``` - -### SecurityIdentifier -``` -Remove-LocalGroup [-SID] <SecurityIdentifier[]> [-WhatIf] [-Confirm] [<CommonParameters>] -``` - -## DESCRIPTION -The **Remove-LocalGroup** cmdlet deletes local security groups. -This cmdlet deletes only a local group. -It does not delete the user accounts, computer accounts, or group accounts that belong to that group. -You cannot recover a deleted group. - -If you delete a group and then create another group that has the same group name, you must set new permissions for the new group. -The new group does not inherit the permissions that were assigned to the group. - -## EXAMPLES - -### Example 1: Delete a security group -``` -PS C:\> Remove-LocalGroup -Name "SecurityGroup04" -``` - -This command deletes the group named SecurityGroup04. - -## PARAMETERS - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject -Specifies an array of security groups that this cmdlet deletes. -To obtain groups, use the Get-LocalGroup cmdlet. - -```yaml -Type: LocalGroup[] -Parameter Sets: InputObject -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Name -Specifies an array of names of the security groups that this cmdlet deletes. - -```yaml -Type: String[] -Parameter Sets: Default -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SID -Specifies an array of security IDs (SIDs) of security groups that this cmdlet deletes. - -```yaml -Type: SecurityIdentifier[] -Parameter Sets: SecurityIdentifier -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### System.Management.Automation.SecurityAccountsManager.LocalGroup, System.String, System.Security.Principal.SecurityIdentifier -You can pipe a security group, a string, or a SID to this cmdlet. - -## OUTPUTS - -### None -This cmdlet does not generate any output. - -## NOTES -* This cmdlet cannot delete the following default groups: - -- Administrators -- Backup Operators -- Cryptographic Operators -- Distributed COM Users -- Event Log Readers -- Guests -- Hyper-V Administrators -- IIS_IUSRS -- Network Configuration Operators -- Performance Log Users -- Performance Monitor Users -- Power Users -- Remote Desktop Users -- Remote Management Users -- Replicator -- Users -- WinRMRemoteWMIUsers__ -* The **PrincipalSource** property is a property on **LocalUser**, **LocalGroup**, and **LocalPrincipal** objects that describes the source of the object. The possible sources are as follows: - -- Local -- Active Directory -- Azure Active Directory group -- Microsoft Account - -**PrincipalSource** is supported only by Windows 10, Windows Server 2016, and later versions of the Windows operating system. For earlier versions, the property is blank. - -## RELATED LINKS - -[Get-LocalGroup](Get-LocalGroup.md) - -[New-LocalGroup](New-LocalGroup.md) - -[Rename-LocalGroup](Rename-LocalGroup.md) - -[Set-LocalGroup](Set-LocalGroup.md) - diff --git a/reference/6/Microsoft.PowerShell.LocalAccounts/Remove-LocalGroupMember.md b/reference/6/Microsoft.PowerShell.LocalAccounts/Remove-LocalGroupMember.md deleted file mode 100644 index b14a7ae141db..000000000000 --- a/reference/6/Microsoft.PowerShell.LocalAccounts/Remove-LocalGroupMember.md +++ /dev/null @@ -1,176 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -online version: http://go.microsoft.com/fwlink/?LinkId=822518 -external help file: Microsoft.Powershell.LocalAccounts.dll-Help.xml -title: Remove-LocalGroupMember ---- - -# Remove-LocalGroupMember - -## SYNOPSIS -Removes members from a local group. - -## SYNTAX - -### Group -``` -Remove-LocalGroupMember [-Group] <LocalGroup> [-Member] <LocalPrincipal[]> [-WhatIf] [-Confirm] - [<CommonParameters>] -``` - -### Default -``` -Remove-LocalGroupMember [-Member] <LocalPrincipal[]> [-Name] <String> [-WhatIf] [-Confirm] [<CommonParameters>] -``` - -### SecurityIdentifier -``` -Remove-LocalGroupMember [-Member] <LocalPrincipal[]> [-SID] <SecurityIdentifier> [-WhatIf] [-Confirm] - [<CommonParameters>] -``` - -## DESCRIPTION -The **Remove-LocalGroupMember** cmdlet removes users or groups from a local group. - -## EXAMPLES - -### Example 1: Remove members from the Administrators group -``` -PS C:\> Remove-LocalGroupMember -Group "Administrators" -Member "Admin02", "MicrosoftAccount\username@Outlook.com", "AzureAD\DavidChew@contoso.com", "CONTOSO\Domain Admins" -``` - -This command removes several members from the local Administrators group. -The members that this cmdlet removes include a local user account, a Microsoft account, an Azure Active Directory account, and a domain group. -This example uses a placeholder value for the user name of an account at Outlook.com. - -## PARAMETERS - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Group -Specifies the security group from which this cmdlet removes members. - -```yaml -Type: LocalGroup -Parameter Sets: Group -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Member -Specifies an array of users or groups that this cmdlet removes from a security group. -You can specify users or groups by name, security ID (SID), or **LocalPrincipal** objects. -Specify SID strings in S-R-I-S-S . -. . -format. - -```yaml -Type: LocalPrincipal[] -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Name -Specifies the name of the security group from which this cmdlet removes members. - -```yaml -Type: String -Parameter Sets: Default -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SID -Specifies the security ID of the security group from which this cmdlet removes members. - -```yaml -Type: SecurityIdentifier -Parameter Sets: SecurityIdentifier -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### System.Management.Automation.SecurityAccountsManager.LocalPrincipal, System.String, System.Security.Principal.SecurityIdentifier -You can pipe a local principal, a string, or a SID to this cmdlet. - -## OUTPUTS - -### None -This cmdlet does not generate any output. - -## NOTES -* The **PrincipalSource** property is a property on **LocalUser**, **LocalGroup**, and **LocalPrincipal** objects that describes the source of the object. The possible sources are as follows: - -- Local -- Active Directory -- Azure Active Directory group -- Microsoft Account - -**PrincipalSource** is supported only by Windows 10, Windows Server 2016, and later versions of the Windows operating system. For earlier versions, the property is blank. - -## RELATED LINKS - -[Add-LocalGroupMember](Add-LocalGroupMember.md) - -[Get-LocalGroupMember](Get-LocalGroupMember.md) - -[New-LocalGroup](New-LocalGroup.md) - diff --git a/reference/6/Microsoft.PowerShell.LocalAccounts/Remove-LocalUser.md b/reference/6/Microsoft.PowerShell.LocalAccounts/Remove-LocalUser.md deleted file mode 100644 index 7ef7bbc5fccb..000000000000 --- a/reference/6/Microsoft.PowerShell.LocalAccounts/Remove-LocalUser.md +++ /dev/null @@ -1,160 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -online version: http://go.microsoft.com/fwlink/?LinkId=822519 -external help file: Microsoft.Powershell.LocalAccounts.dll-Help.xml -title: Remove-LocalUser ---- - -# Remove-LocalUser - -## SYNOPSIS -Deletes local user accounts. - -## SYNTAX - -### InputObject -``` -Remove-LocalUser [-InputObject] <LocalUser[]> [-WhatIf] [-Confirm] [<CommonParameters>] -``` - -### Default -``` -Remove-LocalUser [-Name] <String[]> [-WhatIf] [-Confirm] [<CommonParameters>] -``` - -### SecurityIdentifier -``` -Remove-LocalUser [-SID] <SecurityIdentifier[]> [-WhatIf] [-Confirm] [<CommonParameters>] -``` - -## DESCRIPTION -The **Remove-LocalUser** cmdlet deletes local user accounts. - -## EXAMPLES - -### Example 1: Delete a user account -``` -PS C:\> Remove-LocalUser -Name "AdminContoso02" -``` - -This command deletes the user account named AdminContoso02. - -## PARAMETERS - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject -Specifies an array of user accounts that this cmdlet deletes. -To obtain a user account, use the Get-LocalUser cmdlet. - -```yaml -Type: LocalUser[] -Parameter Sets: InputObject -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Name -Specifies an array of names of the user accounts that this cmdlet deletes. - -```yaml -Type: String[] -Parameter Sets: Default -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SID -Specifies an array of security IDs (SIDs) of user accounts that this cmdlet deletes. - -```yaml -Type: SecurityIdentifier[] -Parameter Sets: SecurityIdentifier -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### System.Management.Automation.SecurityAccountsManager.LocalUser, System.String, System.Security.Principal.SecurityIdentifier -You can pipe a local user, a string, or a SID to this cmdlet. - -## OUTPUTS - -### None -This cmdlet does not generate any output. - -## NOTES -* The **PrincipalSource** property is a property on **LocalUser**, **LocalGroup**, and **LocalPrincipal** objects that describes the source of the object. The possible sources are as follows: - -- Local -- Active Directory -- Azure Active Directory group -- Microsoft Account - -**PrincipalSource** is supported only by Windows 10, Windows Server 2016, and later versions of the Windows operating system. For earlier versions, the property is blank. - -## RELATED LINKS - -[Disable-LocalUser](Disable-LocalUser.md) - -[Enable-LocalUser](Enable-LocalUser.md) - -[Get-LocalUser](Get-LocalUser.md) - -[New-LocalUser](New-LocalUser.md) - -[Rename-LocalUser](Rename-LocalUser.md) - -[Set-LocalUser](Set-LocalUser.md) - diff --git a/reference/6/Microsoft.PowerShell.LocalAccounts/Rename-LocalGroup.md b/reference/6/Microsoft.PowerShell.LocalAccounts/Rename-LocalGroup.md deleted file mode 100644 index 0d88c9795788..000000000000 --- a/reference/6/Microsoft.PowerShell.LocalAccounts/Rename-LocalGroup.md +++ /dev/null @@ -1,171 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -online version: http://go.microsoft.com/fwlink/?LinkId=822520 -external help file: Microsoft.Powershell.LocalAccounts.dll-Help.xml -title: Rename-LocalGroup ---- - -# Rename-LocalGroup - -## SYNOPSIS -Renames a local security group. - -## SYNTAX - -### InputObject -``` -Rename-LocalGroup [-InputObject] <LocalGroup> [-NewName] <String> [-WhatIf] [-Confirm] [<CommonParameters>] -``` - -### Default -``` -Rename-LocalGroup [-Name] <String> [-NewName] <String> [-WhatIf] [-Confirm] [<CommonParameters>] -``` - -### SecurityIdentifier -``` -Rename-LocalGroup [-NewName] <String> [-SID] <SecurityIdentifier> [-WhatIf] [-Confirm] [<CommonParameters>] -``` - -## DESCRIPTION -The **Rename-LocalGroup** cmdlet renames a local security group. - -## EXAMPLES - -### Example 1: Change the name of a group -``` -PS C:\> Rename-LocalGroup -Name "SecurityGroup" -NewName "SecurityGroup04" -``` - -This command renames a security group named SecurityGroup. - -## PARAMETERS - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject -Specifies the security group that this cmdlet renames. -To obtain a security group, use the Get-LocalGroup cmdlet. - -```yaml -Type: LocalGroup -Parameter Sets: InputObject -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Name -Specifies the name of the security group that this cmdlet renames. - -```yaml -Type: String -Parameter Sets: Default -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -NewName -Specifies a new name for the security group. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SID -Specifies the security ID (SID) of a security group that this cmdlet renames. - -```yaml -Type: SecurityIdentifier -Parameter Sets: SecurityIdentifier -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### System.Management.Automation.SecurityAccountsManager.LocalGroup, System.String, System.Security.Principal.SecurityIdentifier -You can pipe a security group, a string, or a SID to this cmdlet. - -## OUTPUTS - -### None -This cmdlet does not generate any output. - -## NOTES -* The **PrincipalSource** property is a property on **LocalUser**, **LocalGroup**, and **LocalPrincipal** objects that describes the source of the object. The possible sources are as follows: - -- Local -- Active Directory -- Azure Active Directory group -- Microsoft Account - -**PrincipalSource** is supported only by Windows 10, Windows Server 2016, and later versions of the Windows operating system. For earlier versions, the property is blank. - -## RELATED LINKS - -[Get-LocalGroup](Get-LocalGroup.md) - -[New-LocalGroup](New-LocalGroup.md) - -[Remove-LocalGroup](Remove-LocalGroup.md) - -[Set-LocalGroup](Set-LocalGroup.md) - diff --git a/reference/6/Microsoft.PowerShell.LocalAccounts/Rename-LocalUser.md b/reference/6/Microsoft.PowerShell.LocalAccounts/Rename-LocalUser.md deleted file mode 100644 index fced244875f7..000000000000 --- a/reference/6/Microsoft.PowerShell.LocalAccounts/Rename-LocalUser.md +++ /dev/null @@ -1,175 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -online version: http://go.microsoft.com/fwlink/?LinkId=822521 -external help file: Microsoft.Powershell.LocalAccounts.dll-Help.xml -title: Rename-LocalUser ---- - -# Rename-LocalUser - -## SYNOPSIS -Renames a local user account. - -## SYNTAX - -### InputObject -``` -Rename-LocalUser [-InputObject] <LocalUser> [-NewName] <String> [-WhatIf] [-Confirm] [<CommonParameters>] -``` - -### Default -``` -Rename-LocalUser [-Name] <String> [-NewName] <String> [-WhatIf] [-Confirm] [<CommonParameters>] -``` - -### SecurityIdentifier -``` -Rename-LocalUser [-NewName] <String> [-SID] <SecurityIdentifier> [-WhatIf] [-Confirm] [<CommonParameters>] -``` - -## DESCRIPTION -The **Rename-LocalUser** cmdlet renames a local user account. - -## EXAMPLES - -### Example 1: Rename a user account -``` -PS C:\> Rename-LocalUser -Name "Admin02" -NewName "AdminContoso02" -``` - -This command renames the user account named Admin02. - -## PARAMETERS - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject -Specifies the user account that this cmdlet renames. -To obtain a user account, use the Get-LocalUser cmdlet. - -```yaml -Type: LocalUser -Parameter Sets: InputObject -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Name -Specifies the name of the user account that this cmdlet renames. - -```yaml -Type: String -Parameter Sets: Default -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -NewName -Specifies a new name for the user account. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SID -Specifies the security ID (SID) of a user accounts that this cmdlet renames. - -```yaml -Type: SecurityIdentifier -Parameter Sets: SecurityIdentifier -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### System.Management.Automation.SecurityAccountsManager.LocalUser, System.String, System.Security.Principal.SecurityIdentifier -You can pipe a local user, a string, or a SID to this cmdlet. - -## OUTPUTS - -### None -This cmdlet does not generate any output. - -## NOTES -* The **PrincipalSource** property is a property on **LocalUser**, **LocalGroup**, and **LocalPrincipal** objects that describes the source of the object. The possible sources are as follows: - -- Local -- Active Directory -- Azure Active Directory group -- Microsoft Account - -**PrincipalSource** is supported only by Windows 10, Windows Server 2016, and later versions of the Windows operating system. For earlier versions, the property is blank. - -## RELATED LINKS - -[Disable-LocalUser](Disable-LocalUser.md) - -[Enable-LocalUser](Enable-LocalUser.md) - -[Get-LocalUser](Get-LocalUser.md) - -[New-LocalUser](New-LocalUser.md) - -[Remove-LocalUser](Remove-LocalUser.md) - -[Set-LocalUser](Set-LocalUser.md) - diff --git a/reference/6/Microsoft.PowerShell.LocalAccounts/Set-LocalGroup.md b/reference/6/Microsoft.PowerShell.LocalAccounts/Set-LocalGroup.md deleted file mode 100644 index 238d5bd6a331..000000000000 --- a/reference/6/Microsoft.PowerShell.LocalAccounts/Set-LocalGroup.md +++ /dev/null @@ -1,172 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -online version: http://go.microsoft.com/fwlink/?LinkId=822522 -external help file: Microsoft.Powershell.LocalAccounts.dll-Help.xml -title: Set-LocalGroup ---- - -# Set-LocalGroup - -## SYNOPSIS -Changes a local security group. - -## SYNTAX - -### InputObject -``` -Set-LocalGroup -Description <String> [-InputObject] <LocalGroup> [-WhatIf] [-Confirm] [<CommonParameters>] -``` - -### Default -``` -Set-LocalGroup -Description <String> [-Name] <String> [-WhatIf] [-Confirm] [<CommonParameters>] -``` - -### SecurityIdentifier -``` -Set-LocalGroup -Description <String> [-SID] <SecurityIdentifier> [-WhatIf] [-Confirm] [<CommonParameters>] -``` - -## DESCRIPTION -The **Set-LocalGroup** cmdlet changes a local security group. - -## EXAMPLES - -### Example 1: Change a group description -``` -PS C:\> Set-LocalGroup -Name "SecurityGroup04" -Description "This is a sample description." -``` - -This command changes the description of a local group. - -## PARAMETERS - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Description -Specifies a comment for the group. -The maximum length is 48 characters. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject -Specifies the security group that this cmdlet changes. -To obtain a security group, use the Get-LocalGroup cmdlet. - -```yaml -Type: LocalGroup -Parameter Sets: InputObject -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Name -Specifies the name of the security group that this cmdlet changes. - -```yaml -Type: String -Parameter Sets: Default -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SID -Specifies the security ID (SID) of the security group that this cmdlet changes. - -```yaml -Type: SecurityIdentifier -Parameter Sets: SecurityIdentifier -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### System.Management.Automation.SecurityAccountsManager.LocalGroup, System.String, System.Security.Principal.SecurityIdentifier -You can pipe a security group, a string, or a SID to this cmdlet. - -## OUTPUTS - -### None -This cmdlet does not generate any output. - -## NOTES -* The **PrincipalSource** property is a property on **LocalUser**, **LocalGroup**, and **LocalPrincipal** objects that describes the source of the object. The possible sources are as follows: - -- Local -- Active Directory -- Azure Active Directory group -- Microsoft Account - -**PrincipalSource** is supported only by Windows 10, Windows Server 2016, and later versions of the Windows operating system. For earlier versions, the property is blank. - -## RELATED LINKS - -[Get-LocalGroup](Get-LocalGroup.md) - -[New-LocalGroup](New-LocalGroup.md) - -[Remove-LocalGroup](Remove-LocalGroup.md) - -[Rename-LocalGroup](Rename-LocalGroup.md) - diff --git a/reference/6/Microsoft.PowerShell.LocalAccounts/Set-LocalUser.md b/reference/6/Microsoft.PowerShell.LocalAccounts/Set-LocalUser.md deleted file mode 100644 index f04f6453896c..000000000000 --- a/reference/6/Microsoft.PowerShell.LocalAccounts/Set-LocalUser.md +++ /dev/null @@ -1,297 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -online version: http://go.microsoft.com/fwlink/?LinkId=822523 -external help file: Microsoft.Powershell.LocalAccounts.dll-Help.xml -title: Set-LocalUser ---- - -# Set-LocalUser - -## SYNOPSIS -Modifies a local user account. - -## SYNTAX - -### Name (Default) -``` -Set-LocalUser [-AccountExpires <DateTime>] [-AccountNeverExpires] [-Description <String>] [-FullName <String>] - [-Name] <String> [-Password <SecureString>] [-PasswordNeverExpires <Boolean>] - [-UserMayChangePassword <Boolean>] [-WhatIf] [-Confirm] [<CommonParameters>] -``` - -### InputObject -``` -Set-LocalUser [-AccountExpires <DateTime>] [-AccountNeverExpires] [-Description <String>] [-FullName <String>] - [-InputObject] <LocalUser> [-Password <SecureString>] [-PasswordNeverExpires <Boolean>] - [-UserMayChangePassword <Boolean>] [-WhatIf] [-Confirm] [<CommonParameters>] -``` - -### SecurityIdentifier -``` -Set-LocalUser [-AccountExpires <DateTime>] [-AccountNeverExpires] [-Description <String>] [-FullName <String>] - [-Password <SecureString>] [-PasswordNeverExpires <Boolean>] [-SID] <SecurityIdentifier> - [-UserMayChangePassword <Boolean>] [-WhatIf] [-Confirm] [<CommonParameters>] -``` - -## DESCRIPTION -The **Set-LocalUser** cmdlet modifies a local user account. -This cmdlet can reset the password of a local user account. - -## EXAMPLES - -### Example 1: Change a description of a user account -``` -PS C:\> Set-LocalUser -Name "Admin07" -Description "Description of this account." -``` - -This command changes the description of a user account named Admin07. - -### Example 2: Change the password on an account -``` -PS C:\> $Password = Read-Host -AsSecureString -PS C:\> $UserAccount = Get-LocalUser -Name "User02" -PS C:\> $UserAccount | Set-LocalUser -Password $Password -``` - -The first command prompts you for a password by using the Read-Host cmdlet. -The command stores the password as a secure string in the $Password variable. - -The second command gets a user account named User02 by using **Get-LocalUser**. -The command stores the account in the $UserAccount variable. - -The third command sets the new password on the user account stored in $UserAccount. - -## PARAMETERS - -### -AccountExpires -Specifies when the user account expires. -To obtain a **DateTime** object, use the Get-Date cmdlet. - -If you do not want the account to expire, specify the *AccountNeverExpires* parameter. - -```yaml -Type: DateTime -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AccountNeverExpires -Indicates that the account does not expire. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Description -Specifies a comment for the user account. -The maximum length is 48 characters. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -FullName -Specifies the full name for the user account. -The full name differs from the user name of the user account. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject -Specifies the user account that this cmdlet changes. -To obtain a user account, use the Get-LocalUser cmdlet. - -```yaml -Type: LocalUser -Parameter Sets: InputObject -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Name -Specifies the name of the user account that this cmdlet changes. - -```yaml -Type: String -Parameter Sets: Name -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Password -Specifies a password for the user account. -If the user account is connected to a Microsoft account, do not set a password. - -You can use `Read-Host -GetCredential`, Get-Credential, or ConvertTo-SecureString to create a **SecureString** object for the password. - -If you omit the *Password* and *NoPassword* parameters, **Set-LocalUser** prompts you for the user's password. - -```yaml -Type: SecureString -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PasswordNeverExpires -Indicates whether the password expires. - -```yaml -Type: Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SID -Specifies the security ID (SID) of the user account that this cmdlet changes. - -```yaml -Type: SecurityIdentifier -Parameter Sets: SecurityIdentifier -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -UserMayChangePassword -Indicates that the user can change the password on the user account. - -```yaml -Type: Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### System.Management.Automation.SecurityAccountsManager.LocalUser, System.String, System.Security.Principal.SecurityIdentifier -You can pipe a local user, a string, or a SID to this cmdlet. - -## OUTPUTS - -### None -This cmdlet does not generate any output. - -## NOTES -* The **PrincipalSource** property is a property on **LocalUser**, **LocalGroup**, and **LocalPrincipal** objects that describes the source of the object. The possible sources are as follows: - -- Local -- Active Directory -- Azure Active Directory group -- Microsoft Account - -**PrincipalSource** is supported only by Windows 10, Windows Server 2016, and later versions of the Windows operating system. For earlier versions, the property is blank. - -## RELATED LINKS - -[Disable-LocalUser](Disable-LocalUser.md) - -[Enable-LocalUser](Enable-LocalUser.md) - -[Get-LocalUser](Get-LocalUser.md) - -[New-LocalUser](New-LocalUser.md) - -[Remove-LocalUser](Remove-LocalUser.md) - -[Rename-LocalUser](Rename-LocalUser.md) - diff --git a/reference/6/Microsoft.PowerShell.Management/Get-Content.md b/reference/6/Microsoft.PowerShell.Management/Get-Content.md index a1e2150bf7b4..5fae0eb88ea1 100644 --- a/reference/6/Microsoft.PowerShell.Management/Get-Content.md +++ b/reference/6/Microsoft.PowerShell.Management/Get-Content.md @@ -374,7 +374,7 @@ This cmdlet returns strings or bytes. The output type depends upon the content that it gets. ## NOTES -* This cmdlet is designed to work with the data exposed by any provider. To get the providers in your session, use the Get-PSProvider cmdlet. For more information, see about_Providers(http://go.microsoft.com/fwlink/?LinkID=113250). +* This cmdlet is designed to work with the data exposed by any provider. To get the providers in your session, use the Get-PSProvider cmdlet. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md) * diff --git a/reference/6/Microsoft.PowerShell.Management/Get-PSDrive.md b/reference/6/Microsoft.PowerShell.Management/Get-PSDrive.md index 19b35c93e94a..2514c905e2c4 100644 --- a/reference/6/Microsoft.PowerShell.Management/Get-PSDrive.md +++ b/reference/6/Microsoft.PowerShell.Management/Get-PSDrive.md @@ -306,7 +306,7 @@ You cannot pipe objects to this cmdlet. This cmdlet returns objects that represent the drives in the session. ## NOTES -* This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, use the **Get-PSProvider** cmdlet. For more information, see about_Providers (http://go.microsoft.com/fwlink/?LinkID=113250). +* This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, use the **Get-PSProvider** cmdlet. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). * Mapped network drives that are created by using the *Persist* parameter of the New-PSDrive cmdlet are specific to a user account. Mapped network drives that you create in sessions that are started with the Run as administrator option or with the credentials of another user are not visible in sessions that are started without explicit credentials or with the credentials of the current user. ## RELATED LINKS diff --git a/reference/6/Microsoft.PowerShell.Management/New-PSDrive.md b/reference/6/Microsoft.PowerShell.Management/New-PSDrive.md index 619815f569eb..0dd28f558cce 100644 --- a/reference/6/Microsoft.PowerShell.Management/New-PSDrive.md +++ b/reference/6/Microsoft.PowerShell.Management/New-PSDrive.md @@ -425,7 +425,7 @@ You cannot pipe input to this cmdlet. ### System.Management.Automation.PSDriveInfo ## NOTES -* **New-PSDrive** is designed to work with the data exposed by any provider. To list the providers available in your session, use **Get-PSProvider**. For more information about providers, see about_Providers (http://go.microsoft.com/fwlink/?LinkID=113250). +* **New-PSDrive** is designed to work with the data exposed by any provider. To list the providers available in your session, use **Get-PSProvider**. For more information about providers, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). * Mapped network drives are specific to a user account. Mapped network drives that you create in sessions that are started by using the Run as administrator option or by using the credential of another user are not visible in a session that was started without explicit credentials, or by using the credentials of the current user. ## RELATED LINKS diff --git a/reference/6/Microsoft.PowerShell.Management/Remove-PSDrive.md b/reference/6/Microsoft.PowerShell.Management/Remove-PSDrive.md index 3b9ce5609e23..505bc609a602 100644 --- a/reference/6/Microsoft.PowerShell.Management/Remove-PSDrive.md +++ b/reference/6/Microsoft.PowerShell.Management/Remove-PSDrive.md @@ -233,7 +233,7 @@ You can pipe a drive object, such as one from the Get-PSDrive cmdlet, to the thi This cmdlet does not return any output. ## NOTES -* **Remove-PSDrive** is designed to work with the data exposed by any Windows PowerShell provider. To list the providers in your session, use the Get-PSProvider cmdlet. For more information, see about_Providers (http://go.microsoft.com/fwlink/?LinkID=113250). +* **Remove-PSDrive** is designed to work with the data exposed by any Windows PowerShell provider. To list the providers in your session, use the Get-PSProvider cmdlet. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). * diff --git a/reference/6/Microsoft.PowerShell.Management/Restart-Service.md b/reference/6/Microsoft.PowerShell.Management/Restart-Service.md index 4961451a4a8d..a1b5533651eb 100644 --- a/reference/6/Microsoft.PowerShell.Management/Restart-Service.md +++ b/reference/6/Microsoft.PowerShell.Management/Restart-Service.md @@ -17,23 +17,23 @@ Stops and then starts one or more services. ### InputObject (Default) ``` -Restart-Service [-Force] [-InputObject] <ServiceController[]> [-PassThru] [-Include <String[]>] - [-Exclude <String[]>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-WhatIf] - [-Confirm] [<CommonParameters>] +Restart-Service [-InputObject] <ServiceController[]> + [-Force] [-PassThru] [-Include <String[]>] [-Exclude <String[]>] + [-WhatIf] [-Confirm] [<CommonParameters>] ``` ### Default ``` -Restart-Service [-Force] [-Name] <String[]> [-PassThru] [-Include <String[]>] [-Exclude <String[]>] - [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-WhatIf] [-Confirm] - [<CommonParameters>] +Restart-Service [-Name] <String[]> + [-Force] [-PassThru] [-Include <String[]>] [-Exclude <String[]>] + [-WhatIf] [-Confirm] [<CommonParameters>] ``` ### DisplayName ``` -Restart-Service [-Force] [-PassThru] -DisplayName <String[]> [-Include <String[]>] [-Exclude <String[]>] - [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-WhatIf] [-Confirm] - [<CommonParameters>] +Restart-Service -DisplayName <String[]> + [-Force] [-PassThru] [-Include <String[]>] [-Exclude <String[]>] + [-WhatIf] [-Confirm] [<CommonParameters>] ``` ## DESCRIPTION @@ -139,33 +139,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -InformationAction -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: infa -Accepted values: SilentlyContinue, Stop, Continue, Inquire, Ignore, Suspend - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InformationVariable -```yaml -Type: String -Parameter Sets: (All) -Aliases: iv - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -InputObject Specifies **ServiceController** objects that represent the services to restart. Enter a variable that contains the objects, or type a command or expression that gets the objects. @@ -176,7 +149,7 @@ Parameter Sets: InputObject Aliases: Required: True -Position: 1 +Position: 0 Default value: None Accept pipeline input: True (ByValue) Accept wildcard characters: False @@ -191,7 +164,7 @@ Parameter Sets: Default Aliases: ServiceName Required: True -Position: 1 +Position: 0 Default value: None Accept pipeline input: True (ByPropertyName, ByValue) Accept wildcard characters: False diff --git a/reference/6/Microsoft.PowerShell.Management/Resume-Service.md b/reference/6/Microsoft.PowerShell.Management/Resume-Service.md index 1a021d3214c5..408680262b4a 100644 --- a/reference/6/Microsoft.PowerShell.Management/Resume-Service.md +++ b/reference/6/Microsoft.PowerShell.Management/Resume-Service.md @@ -17,23 +17,23 @@ Resumes one or more suspended (paused) services. ### InputObject (Default) ``` -Resume-Service [-InputObject] <ServiceController[]> [-PassThru] [-Include <String[]>] [-Exclude <String[]>] - [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-WhatIf] [-Confirm] - [<CommonParameters>] +Resume-Service [-InputObject] <ServiceController[]> + [-PassThru] [-Include <String[]>] [-Exclude <String[]>] + [-WhatIf] [-Confirm] [<CommonParameters>] ``` ### Default ``` -Resume-Service [-Name] <String[]> [-PassThru] [-Include <String[]>] [-Exclude <String[]>] - [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-WhatIf] [-Confirm] - [<CommonParameters>] +Resume-Service [-Name] <String[]> + [-PassThru] [-Include <String[]>] [-Exclude <String[]>] + [-WhatIf] [-Confirm] [<CommonParameters>] ``` ### DisplayName ``` -Resume-Service [-PassThru] -DisplayName <String[]> [-Include <String[]>] [-Exclude <String[]>] - [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-WhatIf] [-Confirm] - [<CommonParameters>] +Resume-Service -DisplayName <String[]> + [-PassThru] [-Include <String[]>] [-Exclude <String[]>] + [-WhatIf] [-Confirm] [<CommonParameters>] ``` ## DESCRIPTION @@ -119,33 +119,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -InformationAction -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: infa -Accepted values: SilentlyContinue, Stop, Continue, Inquire, Ignore, Suspend - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InformationVariable -```yaml -Type: String -Parameter Sets: (All) -Aliases: iv - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -InputObject Specifies **ServiceController** objects that represent the services to resumed. Enter a variable that contains the objects, or type a command or expression that gets the objects. @@ -156,7 +129,7 @@ Parameter Sets: InputObject Aliases: Required: True -Position: 1 +Position: 0 Default value: None Accept pipeline input: True (ByValue) Accept wildcard characters: False @@ -171,7 +144,7 @@ Parameter Sets: Default Aliases: ServiceName Required: True -Position: 1 +Position: 0 Default value: None Accept pipeline input: True (ByPropertyName, ByValue) Accept wildcard characters: False diff --git a/reference/6/Pester/AfterAll.md b/reference/6/Pester/AfterAll.md deleted file mode 100644 index 01b5b6e83bac..000000000000 --- a/reference/6/Pester/AfterAll.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -external help file: Pester-help.xml ---- - -# AfterAll - -## SYNOPSIS -Defines a series of steps to perform at the end of every It block within -the current Context or Describe block. - -## SYNTAX - -``` -AfterAll -``` - -## DESCRIPTION -BeforeEach, AfterEach, BeforeAll, and AfterAll are unique in that they apply -to the entire Context or Describe block, regardless of the order of the -statements in the Context or Describe. - -## EXAMPLES - -### Example 1 -``` -PS C:\> {{ Add example code here }} -``` - -{{ Add example description here }} - -## PARAMETERS - -## INPUTS - -## OUTPUTS - -## NOTES - -## RELATED LINKS - -[about_BeforeEach_AfterEach]() - diff --git a/reference/6/Pester/AfterEach.md b/reference/6/Pester/AfterEach.md deleted file mode 100644 index 8ba9f6673413..000000000000 --- a/reference/6/Pester/AfterEach.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -external help file: Pester-help.xml ---- - -# AfterEach - -## SYNOPSIS -Defines a series of steps to perform at the end of every It block within -the current Context or Describe block. - -## SYNTAX - -``` -AfterEach -``` - -## DESCRIPTION -BeforeEach, AfterEach, BeforeAll, and AfterAll are unique in that they apply -to the entire Context or Describe block, regardless of the order of the -statements in the Context or Describe. -For a full description of this -behavior, as well as how multiple BeforeEach or AfterEach blocks interact -with each other, please refer to the about_BeforeEach_AfterEach help file. - -## EXAMPLES - -### Example 1 -``` -PS C:\> {{ Add example code here }} -``` - -{{ Add example description here }} - -## PARAMETERS - -## INPUTS - -## OUTPUTS - -## NOTES - -## RELATED LINKS - -[about_BeforeEach_AfterEach]() - diff --git a/reference/6/Pester/Assert-MockCalled.md b/reference/6/Pester/Assert-MockCalled.md deleted file mode 100644 index f59cd0ef26dc..000000000000 --- a/reference/6/Pester/Assert-MockCalled.md +++ /dev/null @@ -1,272 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -external help file: Pester-help.xml ---- - -# Assert-MockCalled - -## SYNOPSIS -Checks if a Mocked command has been called a certain number of times -and throws an exception if it has not. - -## SYNTAX - -### ParameterFilter (Default) -``` -Assert-MockCalled [-CommandName] <String> [[-Times] <Int32>] [[-ParameterFilter] <ScriptBlock>] - [[-ModuleName] <String>] [[-Scope] <String>] [-Exactly] -``` - -### ExclusiveFilter -``` -Assert-MockCalled [-CommandName] <String> [[-Times] <Int32>] -ExclusiveFilter <ScriptBlock> - [[-ModuleName] <String>] [[-Scope] <String>] [-Exactly] -``` - -## DESCRIPTION -This command verifies that a mocked command has been called a certain number -of times. -If the call history of the mocked command does not match the parameters -passed to Assert-MockCalled, Assert-MockCalled will throw an exception. - -## EXAMPLES - -### -------------------------- EXAMPLE 1 -------------------------- -``` -Mock Set-Content {} -``` - -{... -Some Code ...} - -C:\PS\>Assert-MockCalled Set-Content - -This will throw an exception and cause the test to fail if Set-Content is not called in Some Code. - -### -------------------------- EXAMPLE 2 -------------------------- -``` -Mock Set-Content -parameterFilter {$path.StartsWith("$env:temp\")} -``` - -{... -Some Code ...} - -C:\PS\>Assert-MockCalled Set-Content 2 { $path -eq "$env:temp\test.txt" } - -This will throw an exception if some code calls Set-Content on $path=$env:temp\test.txt less than 2 times - -### -------------------------- EXAMPLE 3 -------------------------- -``` -Mock Set-Content {} -``` - -{... -Some Code ...} - -C:\PS\>Assert-MockCalled Set-Content 0 - -This will throw an exception if some code calls Set-Content at all - -### -------------------------- EXAMPLE 4 -------------------------- -``` -Mock Set-Content {} -``` - -{... -Some Code ...} - -C:\PS\>Assert-MockCalled Set-Content -Exactly 2 - -This will throw an exception if some code does not call Set-Content Exactly two times. - -### -------------------------- EXAMPLE 5 -------------------------- -``` -Describe 'Assert-MockCalled Scope behavior' { -``` - -Mock Set-Content { } - - It 'Calls Set-Content at least once in the It block' { - {... -Some Code ...} - - Assert-MockCalled Set-Content -Exactly 0 -Scope It - } -} - -Checks for calls only within the current It block. - -### -------------------------- EXAMPLE 6 -------------------------- -``` -Describe 'Describe' { -``` - -Mock -ModuleName SomeModule Set-Content { } - - {... -Some Code ...} - - It 'Calls Set-Content at least once in the Describe block' { - Assert-MockCalled -ModuleName SomeModule Set-Content - } -} - -Checks for calls to the mock within the SomeModule module. -Note that both the Mock -and Assert-MockCalled commands use the same module name. - -### -------------------------- EXAMPLE 7 -------------------------- -``` -Assert-MockCalled Get-ChildItem -ExclusiveFilter { $Path -eq 'C:\' } -``` - -Checks to make sure that Get-ChildItem was called at least one time with -the -Path parameter set to 'C:\', and that it was not called at all with -the -Path parameter set to any other value. - -## PARAMETERS - -### -CommandName -The mocked command whose call history should be checked. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Times -The number of times that the mock must be called to avoid an exception -from throwing. - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: 1 -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ParameterFilter -An optional filter to qualify wich calls should be counted. -Only those -calls to the mock whose parameters cause this filter to return true -will be counted. - -```yaml -Type: ScriptBlock -Parameter Sets: ParameterFilter -Aliases: - -Required: False -Position: 3 -Default value: {$True} -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ExclusiveFilter -{{Fill ExclusiveFilter Description}} - -```yaml -Type: ScriptBlock -Parameter Sets: ExclusiveFilter -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ModuleName -The module where the mock being checked was injected. -This is optional, -and must match the ModuleName that was used when setting up the Mock. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Scope -An optional parameter specifying the Pester scope in which to check for -calls to the mocked command. -By default, Assert-MockCalled will find -all calls to the mocked command in the current Context block (if present), -or the current Describe block (if there is no active Context.) Valid -values are Describe, Context and It. -If you use a scope of Describe or -Context, the command will identify all calls to the mocked command in the -current Describe / Context block, as well as all child scopes of that block. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 5 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Exactly -If this switch is present, the number specified in Times must match -exactly the number of times the mock has been called. -Otherwise it -must match "at least" the number of times specified. -If the value -passed to the Times parameter is zero, the Exactly switch is implied. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -## INPUTS - -## OUTPUTS - -## NOTES -The parameter filter passed to Assert-MockCalled does not necessarily have to match the parameter filter -(if any) which was used to create the Mock. -Assert-MockCalled will find any entry in the command history -which matches its parameter filter, regardless of how the Mock was created. -However, if any calls to the -mocked command are made which did not match any mock's parameter filter (resulting in the original command -being executed instead of a mock), these calls to the original command are not tracked in the call history. -In other words, Assert-MockCalled can only be used to check for calls to the mocked implementation, not -to the original. - -## RELATED LINKS - diff --git a/reference/6/Pester/Assert-VerifiableMocks.md b/reference/6/Pester/Assert-VerifiableMocks.md deleted file mode 100644 index a3de168d7cda..000000000000 --- a/reference/6/Pester/Assert-VerifiableMocks.md +++ /dev/null @@ -1,66 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -external help file: Pester-help.xml ---- - -# Assert-VerifiableMocks - -## SYNOPSIS -Checks if any Verifiable Mock has not been invoked. -If so, this will throw an exception. - -## SYNTAX - -``` -Assert-VerifiableMocks -``` - -## DESCRIPTION -This can be used in tandem with the -Verifiable switch of the Mock -function. -Mock can be used to mock the behavior of an existing command -and optionally take a -Verifiable switch. -When Assert-VerifiableMocks -is called, it checks to see if any Mock marked Verifiable has not been -invoked. -If any mocks have been found that specified -Verifiable and -have not been invoked, an exception will be thrown. - -## EXAMPLES - -### -------------------------- EXAMPLE 1 -------------------------- -``` -Mock Set-Content {} -Verifiable -ParameterFilter {$Path -eq "some_path" -and $Value -eq "Expected Value"} -``` - -{ ...some code that never calls Set-Content some_path -Value "Expected Value"... -} - -Assert-VerifiableMocks - -This will throw an exception and cause the test to fail. - -### -------------------------- EXAMPLE 2 -------------------------- -``` -Mock Set-Content {} -Verifiable -ParameterFilter {$Path -eq "some_path" -and $Value -eq "Expected Value"} -``` - -Set-Content some_path -Value "Expected Value" - -Assert-VerifiableMocks - -This will not throw an exception because the mock was invoked. - -## PARAMETERS - -## INPUTS - -## OUTPUTS - -## NOTES - -## RELATED LINKS - diff --git a/reference/6/Pester/BeforeAll.md b/reference/6/Pester/BeforeAll.md deleted file mode 100644 index da60bd35ef36..000000000000 --- a/reference/6/Pester/BeforeAll.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -external help file: Pester-help.xml ---- - -# BeforeAll - -## SYNOPSIS -Defines a series of steps to perform at the beginning of the current Context -or Describe block. - -## SYNTAX - -``` -BeforeAll -``` - -## DESCRIPTION -BeforeEach, AfterEach, BeforeAll, and AfterAll are unique in that they apply -to the entire Context or Describe block, regardless of the order of the -statements in the Context or Describe. - -## EXAMPLES - -### Example 1 -``` -PS C:\> {{ Add example code here }} -``` - -{{ Add example description here }} - -## PARAMETERS - -## INPUTS - -## OUTPUTS - -## NOTES - -## RELATED LINKS - -[about_BeforeEach_AfterEach]() - diff --git a/reference/6/Pester/BeforeEach.md b/reference/6/Pester/BeforeEach.md deleted file mode 100644 index aba5f9c4e3a7..000000000000 --- a/reference/6/Pester/BeforeEach.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -external help file: Pester-help.xml ---- - -# BeforeEach - -## SYNOPSIS -Defines a series of steps to perform at the beginning of every It block within -the current Context or Describe block. - -## SYNTAX - -``` -BeforeEach -``` - -## DESCRIPTION -BeforeEach, AfterEach, BeforeAll, and AfterAll are unique in that they apply -to the entire Context or Describe block, regardless of the order of the -statements in the Context or Describe. -For a full description of this -behavior, as well as how multiple BeforeEach or AfterEach blocks interact -with each other, please refer to the about_BeforeEach_AfterEach help file. - -## EXAMPLES - -### Example 1 -``` -PS C:\> {{ Add example code here }} -``` - -{{ Add example description here }} - -## PARAMETERS - -## INPUTS - -## OUTPUTS - -## NOTES - -## RELATED LINKS - -[about_BeforeEach_AfterEach]() - diff --git a/reference/6/Pester/Context.md b/reference/6/Pester/Context.md deleted file mode 100644 index f38e433771c6..000000000000 --- a/reference/6/Pester/Context.md +++ /dev/null @@ -1,110 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -external help file: Pester-help.xml ---- - -# Context - -## SYNOPSIS -Provides logical grouping of It blocks within a single Describe block. -Any Mocks defined -inside a Context are removed at the end of the Context scope, as are any files or folders -added to the TestDrive during the Context block's execution. -Any BeforeEach or AfterEach -blocks defined inside a Context also only apply to tests within that Context . - -## SYNTAX - -``` -Context [-Name] <String> [[-Fixture] <ScriptBlock>] -``` - -## DESCRIPTION -{{Fill in the Description}} - -## EXAMPLES - -### -------------------------- EXAMPLE 1 -------------------------- -``` -function Add-Numbers($a, $b) { -``` - -return $a + $b -} - -Describe "Add-Numbers" { - - Context "when root does not exist" { - It "..." { ... -} - } - - Context "when root does exist" { - It "..." { ... -} - It "..." { ... -} - It "..." { ... -} - } -} - -## PARAMETERS - -### -Name -The name of the Context. -This is a phrase describing a set of tests within a describe. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Fixture -Script that is executed. -This may include setup specific to the context and one or more It -blocks that validate the expected outcomes. - -```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: $(Throw "No test script block is provided. (Have you put the open curly brace on the next line?)") -Accept pipeline input: False -Accept wildcard characters: False -``` - -## INPUTS - -## OUTPUTS - -## NOTES - -## RELATED LINKS - -[Describe](Describe.md) - -[It](It.md) - -[BeforeEach](BeforeEach.md) - -[AfterEach](AfterEach.md) - -[about_Should]() - -[about_Mocking]() - -[about_TestDrive]() \ No newline at end of file diff --git a/reference/6/Pester/Describe.md b/reference/6/Pester/Describe.md deleted file mode 100644 index 977c50108716..000000000000 --- a/reference/6/Pester/Describe.md +++ /dev/null @@ -1,134 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -external help file: Pester-help.xml ---- - -# Describe - -## SYNOPSIS -Creates a logical group of tests. -All Mocks and TestDrive contents -defined within a Describe block are scoped to that Describe; they -will no longer be present when the Describe block exits. -A Describe -block may contain any number of Context and It blocks. - -## SYNTAX - -``` -Describe [-Name] <String> [-Tags <Object>] [[-Fixture] <ScriptBlock>] -``` - -## DESCRIPTION -{{Fill in the Description}} - -## EXAMPLES - -### -------------------------- EXAMPLE 1 -------------------------- -``` -function Add-Numbers($a, $b) { -``` - -return $a + $b -} - -Describe "Add-Numbers" { - It "adds positive numbers" { - $sum = Add-Numbers 2 3 - $sum | Should Be 5 - } - - It "adds negative numbers" { - $sum = Add-Numbers (-2) (-2) - $sum | Should Be (-4) - } - - It "adds one negative number to positive number" { - $sum = Add-Numbers (-2) 2 - $sum | Should Be 0 - } - - It "concatenates strings if given strings" { - $sum = Add-Numbers two three - $sum | Should Be "twothree" - } -} - -## PARAMETERS - -### -Name -The name of the test group. -This is often an expressive phrase describing the scenario being tested. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tags -Optional parameter containing an array of strings. -When calling Invoke-Pester, it is possible to -specify a -Tag parameter which will only execute Describe blocks containing the same Tag. - -```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Fixture -The actual test script. -If you are following the AAA pattern (Arrange-Act-Assert), this -typically holds the arrange and act sections. -The Asserts will also lie in this block but are -typically nested each in its own It block. -Assertions are typically performed by the Should -command within the It blocks. - -```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: $(Throw "No test script block is provided. (Have you put the open curly brace on the next line?)") -Accept pipeline input: False -Accept wildcard characters: False -``` - -## INPUTS - -## OUTPUTS - -## NOTES - -## RELATED LINKS - -[It](It.md) - -[Context](Context.md) - -[Invoke-Pester](Invoke-Pester.md) - -[about_Should]() - -[about_Mocking]() - -[about_TestDrive]() diff --git a/reference/6/Pester/Get-MockDynamicParameters.md b/reference/6/Pester/Get-MockDynamicParameters.md deleted file mode 100644 index 1940d0fffa79..000000000000 --- a/reference/6/Pester/Get-MockDynamicParameters.md +++ /dev/null @@ -1,124 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -external help file: Pester-help.xml ---- - -# Get-MockDynamicParameters - -## SYNOPSIS -This command is used by Pester's Mocking framework. -You do not need to call it directly. - -## SYNTAX - -### Cmdlet -``` -Get-MockDynamicParameters -CmdletName <String> [-Parameters <Hashtable>] [-Cmdlet <Object>] -``` - -### Function -``` -Get-MockDynamicParameters -FunctionName <String> [-ModuleName <String>] [-Parameters <Hashtable>] - [-Cmdlet <Object>] -``` - -## DESCRIPTION -{{Fill in the Description}} - -## EXAMPLES - -### Example 1 -``` -PS C:\> {{ Add example code here }} -``` - -{{ Add example description here }} - -## PARAMETERS - -### -CmdletName -{{Fill CmdletName Description}} - -```yaml -Type: String -Parameter Sets: Cmdlet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -FunctionName -{{Fill FunctionName Description}} - -```yaml -Type: String -Parameter Sets: Function -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ModuleName -{{Fill ModuleName Description}} - -```yaml -Type: String -Parameter Sets: Function -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Parameters -{{Fill Parameters Description}} - -```yaml -Type: Hashtable -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Cmdlet -{{Fill Cmdlet Description}} - -```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -## INPUTS - -## OUTPUTS - -## NOTES - -## RELATED LINKS - diff --git a/reference/6/Pester/Get-TestDriveItem.md b/reference/6/Pester/Get-TestDriveItem.md deleted file mode 100644 index 8efd4be3c273..000000000000 --- a/reference/6/Pester/Get-TestDriveItem.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -external help file: Pester-help.xml ---- - -# Get-TestDriveItem - -## SYNOPSIS -{{Fill in the Synopsis}} - -## SYNTAX - -``` -Get-TestDriveItem [[-Path] <String>] -``` - -## DESCRIPTION -{{Fill in the Description}} - -## EXAMPLES - -### Example 1 -``` -PS C:\> {{ Add example code here }} -``` - -{{ Add example description here }} - -## PARAMETERS - -### -Path -{{Fill Path Description}} - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 0 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -## INPUTS - -### None - - -## OUTPUTS - -### System.Object - -## NOTES - -## RELATED LINKS - diff --git a/reference/6/Pester/In.md b/reference/6/Pester/In.md deleted file mode 100644 index 4df24be3c78d..000000000000 --- a/reference/6/Pester/In.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -external help file: Pester-help.xml ---- - -# In - -## SYNOPSIS -A convenience function that executes a script from a specified path. - -## SYNTAX - -``` -In [[-path] <Object>] [[-execute] <ScriptBlock>] -``` - -## DESCRIPTION -Before the script block passed to the execute parameter is invoked, -the current location is set to the path specified. -Once the script -block has been executed, the location will be reset to the location -the script was in prior to calling In. - -## EXAMPLES - -### Example 1 -``` -PS C:\> {{ Add example code here }} -``` - -{{ Add example description here }} - -## PARAMETERS - -### -path -The path that the execute block will be executed in. - -```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -execute -The script to be executed in the path provided. - -```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -## INPUTS - -## OUTPUTS - -## NOTES - -## RELATED LINKS - diff --git a/reference/6/Pester/InModuleScope.md b/reference/6/Pester/InModuleScope.md deleted file mode 100644 index d30844361fc8..000000000000 --- a/reference/6/Pester/InModuleScope.md +++ /dev/null @@ -1,109 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -external help file: Pester-help.xml ---- - -# InModuleScope - -## SYNOPSIS -Allows you to execute parts of a test script within the -scope of a PowerShell script module. - -## SYNTAX - -``` -InModuleScope [-ModuleName] <String> [-ScriptBlock] <ScriptBlock> -``` - -## DESCRIPTION -By injecting some test code into the scope of a PowerShell -script module, you can use non-exported functions, aliases -and variables inside that module, to perform unit tests on -its internal implementation. - -InModuleScope may be used anywhere inside a Pester script, -either inside or outside a Describe block. - -## EXAMPLES - -### -------------------------- EXAMPLE 1 -------------------------- -``` -# The script module: -``` - -function PublicFunction -{ - # Does something -} - -function PrivateFunction -{ - return $true -} - -Export-ModuleMember -Function PublicFunction - -The test script: - -Import-Module MyModule - -InModuleScope MyModule { - Describe 'Testing MyModule' { - It 'Tests the Private function' { - PrivateFunction | Should Be $true - } - } -} - -Normally you would not be able to access "PrivateFunction" from -the powershell session, because the module only exported -"PublicFunction". -Using InModuleScope allowed this call to -"PrivateFunction" to work successfully. - -## PARAMETERS - -### -ModuleName -The name of the module into which the test code should be -injected. -This module must already be loaded into the current -PowerShell session. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ScriptBlock -The code to be executed within the script module. - -```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -## INPUTS - -## OUTPUTS - -## NOTES - -## RELATED LINKS - diff --git a/reference/6/Pester/Invoke-Mock.md b/reference/6/Pester/Invoke-Mock.md deleted file mode 100644 index 733d4d2ada47..000000000000 --- a/reference/6/Pester/Invoke-Mock.md +++ /dev/null @@ -1,164 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -external help file: Pester-help.xml ---- - -# Invoke-Mock - -## SYNOPSIS -This command is used by Pester's Mocking framework. -You do not need to call it directly. - -## SYNTAX - -``` -Invoke-Mock [-CommandName] <String> [-MockCallState] <Hashtable> [[-ModuleName] <String>] - [[-BoundParameters] <Hashtable>] [[-ArgumentList] <Object[]>] [[-CallerSessionState] <Object>] - [[-FromBlock] <String>] [[-InputObject] <Object>] -``` - -## DESCRIPTION -{{Fill in the Description}} - -## EXAMPLES - -### Example 1 -``` -PS C:\> {{ Add example code here }} -``` - -{{ Add example description here }} - -## PARAMETERS - -### -CommandName -{{Fill CommandName Description}} - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MockCallState -{{Fill MockCallState Description}} - -```yaml -Type: Hashtable -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ModuleName -{{Fill ModuleName Description}} - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -BoundParameters -{{Fill BoundParameters Description}} - -```yaml -Type: Hashtable -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: @{} -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ArgumentList -{{Fill ArgumentList Description}} - -```yaml -Type: Object[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 5 -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CallerSessionState -{{Fill CallerSessionState Description}} - -```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 6 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -FromBlock -{{Fill FromBlock Description}} - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 7 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject -{{Fill InputObject Description}} - -```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 8 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -## INPUTS - -## OUTPUTS - -## NOTES - -## RELATED LINKS - diff --git a/reference/6/Pester/Invoke-Pester.md b/reference/6/Pester/Invoke-Pester.md deleted file mode 100644 index d0d84146ea1b..000000000000 --- a/reference/6/Pester/Invoke-Pester.md +++ /dev/null @@ -1,353 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -external help file: Pester-help.xml ---- - -# Invoke-Pester - -## SYNOPSIS -Invokes Pester to run all tests (files containing *.Tests.ps1) recursively under the Path - -## SYNTAX - -### LegacyOutputXml (Default) -``` -Invoke-Pester [[-Script] <Object[]>] [[-TestName] <String[]>] [-EnableExit] [[-OutputXml] <String>] - [[-Tag] <String[]>] [-ExcludeTag <String[]>] [-PassThru] [-CodeCoverage <Object[]>] [-Strict] [-Quiet] - [-PesterOption <Object>] -``` - -### NewOutputSet -``` -Invoke-Pester [[-Script] <Object[]>] [[-TestName] <String[]>] [-EnableExit] [[-Tag] <String[]>] - [-ExcludeTag <String[]>] [-PassThru] [-CodeCoverage <Object[]>] [-Strict] -OutputFile <String> - -OutputFormat <String> [-Quiet] [-PesterOption <Object>] -``` - -## DESCRIPTION -Upon calling Invoke-Pester, all files that have a name containing -"*.Tests.ps1" will have the tests defined in their Describe blocks -executed. -Invoke-Pester begins at the location of Path and -runs recursively through each sub directory looking for -"*.Tests.ps1" files containing tests. -If a TestName is provided, -Invoke-Pester will only run tests that have a describe block with a -matching name. -By default, Invoke-Pester will end the test run with a -simple report of the number of tests passed and failed output to the -console. -One may want pester to "fail a build" in the event that any -tests fail. -To accomodate this, Invoke-Pester will return an exit -code equal to the number of failed tests if the EnableExit switch is -set. -Invoke-Pester will also write a NUnit style log of test results -if the OutputXml parameter is provided. -In these cases, Invoke-Pester -will write the result log to the path provided in the OutputXml -parameter. - -Optionally, Pester can generate a report of how much code is covered -by the tests, and information about any commands which were not -executed. - -## EXAMPLES - -### -------------------------- EXAMPLE 1 -------------------------- -``` -Invoke-Pester -``` - -This will find all *.Tests.ps1 files and run their tests. -No exit code will be returned and no log file will be saved. - -### -------------------------- EXAMPLE 2 -------------------------- -``` -Invoke-Pester -Script ./tests/Utils* -``` - -This will run all tests in files under ./Tests that begin with Utils and alsocontains .Tests. - -### -------------------------- EXAMPLE 3 -------------------------- -``` -Invoke-Pester -Script @{ Path = './tests/Utils*'; Parameters = @{ NamedParameter = 'Passed By Name' }; Arguments = @('Passed by position') } -``` - -Executes the same tests as in Example 1, but will run them with the equivalent of the following command line: & $testScriptPath -NamedParameter 'Passed By Name' 'Passed by position' - -### -------------------------- EXAMPLE 4 -------------------------- -``` -Invoke-Pester -TestName "Add Numbers" -``` - -This will only run the Describe block named "Add Numbers" - -### -------------------------- EXAMPLE 5 -------------------------- -``` -Invoke-Pester -EnableExit -OutputXml "./artifacts/TestResults.xml" -``` - -This runs all tests from the current directory downwards and writes the results according to the NUnit schema to artifacts/TestResults.xml just below the current directory. -The test run will return an exit code equal to the number of test failures. - -### -------------------------- EXAMPLE 6 -------------------------- -``` -Invoke-Pester -EnableExit -OutputFile "./artifacts/TestResults.xml" -OutputFormat NUnitxml -``` - -This runs all tests from the current directory downwards and writes the results to an output file and NUnitxml output format - -### -------------------------- EXAMPLE 7 -------------------------- -``` -Invoke-Pester -CodeCoverage 'ScriptUnderTest.ps1' -``` - -Runs all *.Tests.ps1 scripts in the current directory, and generates a coverage report for all commands in the "ScriptUnderTest.ps1" file. - -### -------------------------- EXAMPLE 8 -------------------------- -``` -Invoke-Pester -CodeCoverage @{ Path = 'ScriptUnderTest.ps1'; Function = 'FunctionUnderTest' } -``` - -Runs all *.Tests.ps1 scripts in the current directory, and generates a coverage report for all commands in the "FunctionUnderTest" function in the "ScriptUnderTest.ps1" file. - -### -------------------------- EXAMPLE 9 -------------------------- -``` -Invoke-Pester -CodeCoverage @{ Path = 'ScriptUnderTest.ps1'; StartLine = 10; EndLine = 20 } -``` - -Runs all *.Tests.ps1 scripts in the current directory, and generates a coverage report for all commands on lines 10 through 20 in the "ScriptUnderTest.ps1" file. - -## PARAMETERS - -### -Script -This parameter indicates which test scripts should be run. -This parameter may be passed simple strings (wildcards are allowed), or hashtables containing Path, Arguments and Parameters keys. -If hashtables are used, the Parameters key must refer to a hashtable, and the Arguments key must refer to an array; these will be splatted to the test script(s) indicated in the Path key. - -Note: If the path contains any wildcards, or if it refers to a directory, then Pester will search for and execute all test scripts named *.Tests.ps1 in the target path; the search is recursive. -If the path contains no wildcards and refers to a file, Pester will just try to execute that file regardless of its name. - -Aliased to 'Path' and 'relative_path' for backwards compatibility. - -```yaml -Type: Object[] -Parameter Sets: (All) -Aliases: Path, relative_path - -Required: False -Position: 1 -Default value: . -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -TestName -Informs Invoke-Pester to only run Describe blocks that match this name. - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: Name - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EnableExit -Will cause Invoke-Pester to exit with a exit code equal to the number of failed tests once all tests have been run. -Use this to "fail" a build when any tests fail. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OutputXml -The path where Invoke-Pester will save a NUnit formatted test results log file. -If this path is not provided, no log will be generated. - -```yaml -Type: String -Parameter Sets: LegacyOutputXml -Aliases: - -Required: False -Position: 4 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tag -Informs Invoke-Pester to only run Describe blocks tagged with the tags specified. -Aliased 'Tags' for backwards compatibility. - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: Tags - -Required: False -Position: 5 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ExcludeTag -Informs Invoke-Pester to not run blocks tagged with the tags specified. - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PassThru -Returns a Pester result object containing the information about the whole test run, and each test. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CodeCoverage -Instructs Pester to generate a code coverage report in addition to running tests. -You may pass either hashtables or strings to this parameter. -If strings are used, they must be paths (wildcards allowed) to source files, and all commands in the files are analyzed for code coverage. -By passing hashtables instead, you can limit the analysis to specific lines or functions within a file. -Hashtables must contain a Path key (which can be abbreviated to just "P"), and may contain Function (or "F"), StartLine (or "S"), and EndLine ("E") keys to narrow down the commands to be analyzed. -If Function is specified, StartLine and EndLine are ignored. -If only StartLine is defined, the entire script file starting with StartLine is analyzed. -If only EndLine is present, all lines in the script file up to and including EndLine are analyzed. -Both Function and Path (as well as simple strings passed instead of hashtables) may contain wildcards. - -```yaml -Type: Object[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Strict -Makes Pending and Skipped tests to Failed tests. -Useful for continuous integration where you need to make sure all tests passed. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OutputFile -{{Fill OutputFile Description}} - -```yaml -Type: String -Parameter Sets: NewOutputSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OutputFormat -{{Fill OutputFormat Description}} - -```yaml -Type: String -Parameter Sets: NewOutputSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Quiet -Disables the output Pester writes to screen. -No other output is generated unless you specify PassThru, or one of the Output parameters. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PesterOption -Sets advanced options for the test execution. -Enter a PesterOption object, such as one that you create by using the New-PesterOption cmdlet, or a hash table in which the keys are option names and the values are option values. -For more information on the options available, see the help for New-PesterOption. - -```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -## INPUTS - -## OUTPUTS - -## NOTES - -## RELATED LINKS - -[Describe](describe.md) - diff --git a/reference/6/Pester/It.md b/reference/6/Pester/It.md deleted file mode 100644 index 23d8439bee6b..000000000000 --- a/reference/6/Pester/It.md +++ /dev/null @@ -1,209 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -external help file: Pester-help.xml ---- - -# It - -## SYNOPSIS -Validates the results of a test inside of a Describe block. - -## SYNTAX - -### Normal (Default) -``` -It [-name] <String> [[-test] <ScriptBlock>] [-TestCases <IDictionary[]>] -``` - -### Pending -``` -It [-name] <String> [[-test] <ScriptBlock>] [-TestCases <IDictionary[]>] [-Pending] -``` - -### Skip -``` -It [-name] <String> [[-test] <ScriptBlock>] [-TestCases <IDictionary[]>] [-Skip] -``` - -## DESCRIPTION -The It command is intended to be used inside of a Describe or Context Block. -If you are familiar with the AAA pattern (Arrange-Act-Assert), the body of -the It block is the appropriate location for an assert. -The convention is to -assert a single expectation for each It block. -The code inside of the It block -should throw a terminating error if the expectation of the test is not met and -thus cause the test to fail. -The name of the It block should expressively state -the expectation of the test. - -In addition to using your own logic to test expectations and throw exceptions, -you may also use Pester's Should command to perform assertions in plain language. - -## EXAMPLES - -### -------------------------- EXAMPLE 1 -------------------------- -``` -function Add-Numbers($a, $b) { -``` - -return $a + $b -} - -Describe "Add-Numbers" { - It "adds positive numbers" { - $sum = Add-Numbers 2 3 - $sum | Should Be 5 - } - - It "adds negative numbers" { - $sum = Add-Numbers (-2) (-2) - $sum | Should Be (-4) - } - - It "adds one negative number to positive number" { - $sum = Add-Numbers (-2) 2 - $sum | Should Be 0 - } - - It "concatenates strings if given strings" { - $sum = Add-Numbers two three - $sum | Should Be "twothree" - } -} - -### -------------------------- EXAMPLE 2 -------------------------- -``` -function Add-Numbers($a, $b) { -``` - -return $a + $b -} - -Describe "Add-Numbers" { - $testCases = @( - @{ a = 2; b = 3; expectedResult = 5 } - @{ a = -2; b = -2; expectedResult = -4 } - @{ a = -2; b = 2; expectedResult = 0 } - @{ a = 'two'; b = 'three'; expectedResult = 'twothree' } - ) - - It 'Correctly adds \<a\> and \<b\> to get \<expectedResult\>' -TestCases $testCases { - param ($a, $b, $expectedResult) - - $sum = Add-Numbers $a $b - $sum | Should Be $expectedResult - } -} - -## PARAMETERS - -### -name -An expressive phsae describing the expected test outcome. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -test -The script block that should throw an exception if the -expectation of the test is not met.If you are following the -AAA pattern (Arrange-Act-Assert), this typically holds the -Assert. - -```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: {} -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -TestCases -Optional array of hashtable (or any IDictionary) objects. -If this parameter is used, -Pester will call the test script block once for each table in the TestCases array, -splatting the dictionary to the test script block as input. -If you want the name of -the test to appear differently for each test case, you can embed tokens into the Name -parameter with the syntax 'Adds numbers \<A\> and \<B\>' (assuming you have keys named A and B -in your TestCases hashtables.) - -```yaml -Type: IDictionary[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Pending -Use this parameter to explicitly mark the test as work-in-progress/not implemented/pending when you -need to distinguish a test that fails because it is not finished yet from a tests -that fail as a result of changes being made in the code base. -An empty test, that is a -test that contains nothing except whitespace or comments is marked as Pending by default. - -```yaml -Type: SwitchParameter -Parameter Sets: Pending -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Skip -Use this parameter to explicitly mark the test to be skipped. -This is preferable to temporarily -commenting out a test, because the test remains listed in the output. -Use the Strict parameter -of Invoke-Pester to force all skipped tests to fail. - -```yaml -Type: SwitchParameter -Parameter Sets: Skip -Aliases: Ignore - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -## INPUTS - -## OUTPUTS - -## NOTES - -## RELATED LINKS - -[Describe](Describe.md) - -[Context](Context.md) - -[about_Should]() diff --git a/reference/6/Pester/Mock.md b/reference/6/Pester/Mock.md deleted file mode 100644 index 674ec8770136..000000000000 --- a/reference/6/Pester/Mock.md +++ /dev/null @@ -1,287 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -external help file: Pester-help.xml ---- - -# Mock - -## SYNOPSIS -Mocks the behavior of an existing command with an alternate -implementation. - -## SYNTAX - -``` -Mock [[-CommandName] <String>] [[-MockWith] <ScriptBlock>] [-Verifiable] [[-ParameterFilter] <ScriptBlock>] - [[-ModuleName] <String>] -``` - -## DESCRIPTION -This creates new behavior for any existing command within the scope of a -Describe or Context block. -The function allows you to specify a script block -that will become the command's new behavior. - -Optionally, you may create a Parameter Filter which will examine the -parameters passed to the mocked command and will invoke the mocked -behavior only if the values of the parameter values pass the filter. -If -they do not, the original command implementation will be invoked instead -of a mock. - -You may create multiple mocks for the same command, each using a different -ParameterFilter. -ParameterFilters will be evaluated in reverse order of -their creation. -The last one created will be the first to be evaluated. -The mock of the first filter to pass will be used. -The exception to this -rule are Mocks with no filters. -They will always be evaluated last since -they will act as a "catch all" mock. - -Mocks can be marked Verifiable. -If so, the Assert-VerifiableMocks command -can be used to check if all Verifiable mocks were actually called. -If any -verifiable mock is not called, Assert-VerifiableMocks will throw an -exception and indicate all mocks not called. - -If you wish to mock commands that are called from inside a script module, -you can do so by using the -ModuleName parameter to the Mock command. -This -injects the mock into the specified module. -If you do not specify a -module name, the mock will be created in the same scope as the test script. -You may mock the same command multiple times, in different scopes, as needed. -Each module's mock maintains a separate call history and verified status. - -## EXAMPLES - -### -------------------------- EXAMPLE 1 -------------------------- -``` -Mock Get-ChildItem { return @{FullName = "A_File.TXT"} } -``` - -Using this Mock, all calls to Get-ChildItem will return a hashtable with a -FullName property returning "A_File.TXT" - -### -------------------------- EXAMPLE 2 -------------------------- -``` -Mock Get-ChildItem { return @{FullName = "A_File.TXT"} } -ParameterFilter { $Path -and $Path.StartsWith($env:temp) } -``` - -This Mock will only be applied to Get-ChildItem calls within the user's temp directory. - -### -------------------------- EXAMPLE 3 -------------------------- -``` -Mock Set-Content {} -Verifiable -ParameterFilter { $Path -eq "some_path" -and $Value -eq "Expected Value" } -``` - -When this mock is used, if the Mock is never invoked and Assert-VerifiableMocks is called, an exception will be thrown. -The command behavior will do nothing since the ScriptBlock is empty. - -### -------------------------- EXAMPLE 4 -------------------------- -``` -Mock Get-ChildItem { return @{FullName = "A_File.TXT"} } -ParameterFilter { $Path -and $Path.StartsWith($env:temp\1) } -``` - -Mock Get-ChildItem { return @{FullName = "B_File.TXT"} } -ParameterFilter { $Path -and $Path.StartsWith($env:temp\2) } -Mock Get-ChildItem { return @{FullName = "C_File.TXT"} } -ParameterFilter { $Path -and $Path.StartsWith($env:temp\3) } - -Multiple mocks of the same command may be used. -The parameter filter determines which is invoked. -Here, if Get-ChildItem is called on the "2" directory of the temp folder, then B_File.txt will be returned. - -### -------------------------- EXAMPLE 5 -------------------------- -``` -Mock Get-ChildItem { return @{FullName="B_File.TXT"} } -ParameterFilter { $Path -eq "$env:temp\me" } -``` - -Mock Get-ChildItem { return @{FullName="A_File.TXT"} } -ParameterFilter { $Path -and $Path.StartsWith($env:temp) } - -Get-ChildItem $env:temp\me - -Here, both mocks could apply since both filters will pass. -A_File.TXT will be returned because it was the most recent Mock created. - -### -------------------------- EXAMPLE 6 -------------------------- -``` -Mock Get-ChildItem { return @{FullName = "B_File.TXT"} } -ParameterFilter { $Path -eq "$env:temp\me" } -``` - -Mock Get-ChildItem { return @{FullName = "A_File.TXT"} } - -Get-ChildItem c:\windows - -Here, A_File.TXT will be returned. -Since no filter was specified, it will apply to any call to Get-ChildItem that does not pass another filter. - -### -------------------------- EXAMPLE 7 -------------------------- -``` -Mock Get-ChildItem { return @{FullName = "B_File.TXT"} } -ParameterFilter { $Path -eq "$env:temp\me" } -``` - -Mock Get-ChildItem { return @{FullName = "A_File.TXT"} } - -Get-ChildItem $env:temp\me - -Here, B_File.TXT will be returned. -Even though the filterless mock was created more recently. -This illustrates that filterless Mocks are always evaluated last regardlss of their creation order. - -### -------------------------- EXAMPLE 8 -------------------------- -``` -Mock Get-ChildItem { return @{FullName = "A_File.TXT"} } -ModuleName MyTestModule -``` - -Using this Mock, all calls to Get-ChildItem from within the MyTestModule module -will return a hashtable with a FullName property returning "A_File.TXT" - -### -------------------------- EXAMPLE 9 -------------------------- -``` -Get-Module -Name ModuleMockExample | Remove-Module -``` - -New-Module -Name ModuleMockExample -ScriptBlock { - function Hidden { "Internal Module Function" } - function Exported { Hidden } - - Export-ModuleMember -Function Exported -} | Import-Module -Force - -Describe "ModuleMockExample" { - - It "Hidden function is not directly accessible outside the module" { - { Hidden } | Should Throw - } - - It "Original Hidden function is called" { - Exported | Should Be "Internal Module Function" - } - - It "Hidden is replaced with our implementation" { - Mock Hidden { "Mocked" } -ModuleName ModuleMockExample - Exported | Should Be "Mocked" - } -} - -This example shows how calls to commands made from inside a module can be -mocked by using the -ModuleName parameter. - -## PARAMETERS - -### -CommandName -The name of the command to be mocked. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MockWith -A ScriptBlock specifying the behvior that will be used to mock CommandName. -The default is an empty ScriptBlock. -NOTE: Do not specify param or dynamicparam blocks in this script block. -These will be injected automatically based on the signature of the command -being mocked, and the MockWith script block can contain references to the -mocked commands parameter variables. - -```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: {} -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Verifiable -When this is set, the mock will be checked when Assert-VerifiableMocks is -called. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ParameterFilter -An optional filter to limit mocking behavior only to usages of -CommandName where the values of the parameters passed to the command -pass the filter. - -This ScriptBlock must return a boolean value. -See examples for usage. - -```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: {$True} -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ModuleName -Optional string specifying the name of the module where this command -is to be mocked. -This should be a module that _calls_ the mocked -command; it doesn't necessarily have to be the same module which -originally implemented the command. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -## INPUTS - -## OUTPUTS - -## NOTES - -## RELATED LINKS - -[Assert-MockCalled](Assert-MockCalled.md) - -[Assert-VerifiableMocks](Assert-VerifiableMocks.md) - -[Describe](Describe.md) - -[Context](Context.md) - -[It](It.md) - -[about_Should]() - -[about_Mocking]() diff --git a/reference/6/Pester/New-Fixture.md b/reference/6/Pester/New-Fixture.md deleted file mode 100644 index 3453128a1bf4..000000000000 --- a/reference/6/Pester/New-Fixture.md +++ /dev/null @@ -1,115 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -external help file: Pester-help.xml ---- - -# New-Fixture - -## SYNOPSIS -This function generates two scripts, one that defines a function -and another one that contains its tests. - -## SYNTAX - -``` -New-Fixture [[-Path] <String>] [-Name] <String> -``` - -## DESCRIPTION -This function generates two scripts, one that defines a function -and another one that contains its tests. -The files are by default -placed in the current directory and are called and populated as such: - - -The script defining the function: .\Clean.ps1: - -function Clean { - -} - -The script containg the example test .\Clean.Tests.ps1: - -$here = Split-Path -Parent $MyInvocation.MyCommand.Path -$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".") -. -"$here\$sut" - -Describe "Clean" { - - It "does something useful" { - $false | Should Be $true - } -} - -## EXAMPLES - -### -------------------------- EXAMPLE 1 -------------------------- -``` -New-Fixture -Name Clean -``` - -Creates the scripts in the current directory. - -### -------------------------- EXAMPLE 2 -------------------------- -``` -New-Fixture C:\Projects\Cleaner Clean -``` - -Creates the scripts in the C:\Projects\Cleaner directory. - -### -------------------------- EXAMPLE 3 -------------------------- -``` -New-Fixture Cleaner Clean -``` - -Creates a new folder named Cleaner in the current directory and creates the scripts in it. - -## PARAMETERS - -### -Path -Defines path where the test and the function should be created, you can use full or relative path. -If the parameter is not specified the scripts are created in the current directory. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: $PWD -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name -Defines the name of the function and the name of the test to be created. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -## INPUTS - -## OUTPUTS - -## NOTES - -## RELATED LINKS - -[about_Pester](https://github.com/pester/Pester/blob/master/en-US/about_Pester.help.txt) - -[about_Should](https://github.com/pester/Pester/blob/master/en-US/about_Should.help.txt) - diff --git a/reference/6/Pester/Pester.md b/reference/6/Pester/Pester.md deleted file mode 100644 index 3f1e6ee9b3d6..000000000000 --- a/reference/6/Pester/Pester.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-US -keywords: powershell,cmdlet -Help Version: 6.0 -Download Help Link: http://Please-enter-FwLink-manually -Module Guid: a699dea5-2c73-4616-a270-1f7abb777e71 -Module Name: Pester ---- - -# Pester Module -## Description -{{Manually Enter Description Here}} - -## Pester Cmdlets -### [AfterAll](AfterAll.md) -{{Manually Enter AfterAll Description Here}} - -### [AfterEach](AfterEach.md) -{{Manually Enter AfterEach Description Here}} - -### [Assert-MockCalled](Assert-MockCalled.md) -{{Manually Enter Assert-MockCalled Description Here}} - -### [Assert-VerifiableMocks](Assert-VerifiableMocks.md) -{{Manually Enter Assert-VerifiableMocks Description Here}} - -### [BeforeAll](BeforeAll.md) -{{Manually Enter BeforeAll Description Here}} - -### [BeforeEach](BeforeEach.md) -{{Manually Enter BeforeEach Description Here}} - -### [Context](Context.md) -{{Manually Enter Context Description Here}} - -### [Describe](Describe.md) -{{Manually Enter Describe Description Here}} - -### [Get-MockDynamicParameters](Get-MockDynamicParameters.md) -{{Manually Enter Get-MockDynamicParameters Description Here}} - -### [Get-TestDriveItem](Get-TestDriveItem.md) -{{Manually Enter Get-TestDriveItem Description Here}} - -### [In](In.md) -{{Manually Enter In Description Here}} - -### [InModuleScope](InModuleScope.md) -{{Manually Enter InModuleScope Description Here}} - -### [Invoke-Mock](Invoke-Mock.md) -{{Manually Enter Invoke-Mock Description Here}} - -### [Invoke-Pester](Invoke-Pester.md) -{{Manually Enter Invoke-Pester Description Here}} - -### [It](It.md) -{{Manually Enter It Description Here}} - -### [Mock](Mock.md) -{{Manually Enter Mock Description Here}} - -### [New-Fixture](New-Fixture.md) -{{Manually Enter New-Fixture Description Here}} - -### [Set-DynamicParameterVariables](Set-DynamicParameterVariables.md) -{{Manually Enter Set-DynamicParameterVariables Description Here}} - -### [Setup](Setup.md) -{{Manually Enter Setup Description Here}} - -### [Should](Should.md) -{{Manually Enter Should Description Here}} diff --git a/reference/6/Pester/Set-DynamicParameterVariables.md b/reference/6/Pester/Set-DynamicParameterVariables.md deleted file mode 100644 index 4a21e44ff096..000000000000 --- a/reference/6/Pester/Set-DynamicParameterVariables.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -external help file: Pester-help.xml ---- - -# Set-DynamicParameterVariables - -## SYNOPSIS -This command is used by Pester's Mocking framework. -You do not need to call it directly. - -## SYNTAX - -``` -Set-DynamicParameterVariables [-SessionState] <SessionState> [[-Parameters] <Hashtable>] - [[-Metadata] <CommandMetadata>] -``` - -## DESCRIPTION -{{Fill in the Description}} - -## EXAMPLES - -### Example 1 -``` -PS C:\> {{ Add example code here }} -``` - -{{ Add example description here }} - -## PARAMETERS - -### -SessionState -{{Fill SessionState Description}} - -```yaml -Type: SessionState -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Parameters -{{Fill Parameters Description}} - -```yaml -Type: Hashtable -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Metadata -{{Fill Metadata Description}} - -```yaml -Type: CommandMetadata -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -## INPUTS - -## OUTPUTS - -## NOTES - -## RELATED LINKS - diff --git a/reference/6/Pester/Setup.md b/reference/6/Pester/Setup.md deleted file mode 100644 index bcaeb69b3c38..000000000000 --- a/reference/6/Pester/Setup.md +++ /dev/null @@ -1,121 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -external help file: Pester-help.xml ---- - -# Setup - -## SYNOPSIS -{{Fill in the Synopsis}} - -## SYNTAX - -``` -Setup [-Dir] [-File] [[-Path] <Object>] [[-Content] <Object>] [-PassThru] -``` - -## DESCRIPTION -{{Fill in the Description}} - -## EXAMPLES - -### Example 1 -``` -PS C:\> {{ Add example code here }} -``` - -{{ Add example description here }} - -## PARAMETERS - -### -Content -{{Fill Content Description}} - -```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Dir -{{Fill Dir Description}} - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -File -{{Fill File Description}} - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PassThru -{{Fill PassThru Description}} - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Path -{{Fill Path Description}} - -```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 0 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -## INPUTS - -### None - - -## OUTPUTS - -### System.Object - -## NOTES - -## RELATED LINKS - diff --git a/reference/6/Pester/Should.md b/reference/6/Pester/Should.md deleted file mode 100644 index eecaa08574ea..000000000000 --- a/reference/6/Pester/Should.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -ms.date: 2017-06-09 -schema: 2.0.0 -locale: en-us -keywords: powershell,cmdlet -external help file: Pester-help.xml ---- - -# Should - -## SYNOPSIS -{{Fill in the Synopsis}} - -## SYNTAX - -``` -Should -``` - -## DESCRIPTION -{{Fill in the Description}} - -## EXAMPLES - -### Example 1 -``` -PS C:\> {{ Add example code here }} -``` - -{{ Add example description here }} - -## PARAMETERS - -## INPUTS - -### None - - -## OUTPUTS - -### System.Object - -## NOTES - -## RELATED LINKS -