Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ for the operating system.
## SYNTAX

```
Import-LocalizedData [[-BindingVariable] <String>] [[-UICulture] <String>] [-BaseDirectory <String>]
[-FileName <String>] [-SupportedCommand <String[]>] [<CommonParameters>]
Import-LocalizedData [[-BindingVariable] <String>] [[-UICulture] <String>]
[-BaseDirectory <String>] [-FileName <String>] [-SupportedCommand <String[]>]
[<CommonParameters>]
```

## DESCRIPTION
Expand Down
16 changes: 9 additions & 7 deletions reference/5.1/Microsoft.PowerShell.Utility/Import-PSSession.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ Imports commands from another session into the current session.
## SYNTAX

```
Import-PSSession [-Prefix <String>] [-DisableNameChecking] [[-CommandName] <String[]>] [-AllowClobber]
[-ArgumentList <Object[]>] [-CommandType <CommandTypes>] [-Module <String[]>]
[-FullyQualifiedModule <ModuleSpecification[]>] [[-FormatTypeName] <String[]>]
[-Certificate <X509Certificate2>] [-Session] <PSSession> [<CommonParameters>]
Import-PSSession [-Prefix <String>] [-DisableNameChecking] [[-CommandName] <String[]>]
[-AllowClobber] [-ArgumentList <Object[]>] [-CommandType <CommandTypes>]
[-Module <String[]>] [-FullyQualifiedModule <ModuleSpecification[]>]
[[-FormatTypeName] <String[]>] [-Certificate <X509Certificate2>] [-Session] <PSSession>
[<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -281,8 +282,8 @@ Function Start-BitsTransfer
Function Suspend-BitsTransfer
```

This command shows how to use the **Module** parameter of `Get-Command` to find out which commands were
imported into the session by an `Import-PSSession` command.
This command shows how to use the **Module** parameter of `Get-Command` to find out which commands
were imported into the session by an `Import-PSSession` command.

The first command uses the `Import-PSSession` cmdlet to import commands whose names include "bits"
from the PSSession in the `$S` variable. The `Import-PSSession` command returns a temporary module,
Expand Down Expand Up @@ -528,7 +529,8 @@ and module names. Wildcards are not permitted.

`Import-PSSession` cannot import providers from a snap-in.

For more information, see [about_PSSnapins](../Microsoft.PowerShell.Core/About/about_PSSnapins.md)
For more information, see
[about_PSSnapins](/powershell/module/Microsoft.PowerShell.Core/About/about_PSSnapins)
and [about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md).

```yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ Invoke-RestMethod [-Method <WebRequestMethod>] [-UseBasicParsing] [-Uri] <Uri>
[-WebSession <WebRequestSession>] [-SessionVariable <String>] [-Credential <PSCredential>]
[-UseDefaultCredentials] [-CertificateThumbprint <String>] [-Certificate <X509Certificate>]
[-UserAgent <String>] [-DisableKeepAlive] [-TimeoutSec <Int32>] [-Headers <IDictionary>]
[-MaximumRedirection <Int32>] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-ProxyUseDefaultCredentials]
[-Body <Object>] [-ContentType <String>] [-TransferEncoding <String>] [-InFile <String>] [-OutFile <String>]
[-PassThru] [<CommonParameters>]
[-MaximumRedirection <Int32>] [-Proxy <Uri>] [-ProxyCredential <PSCredential>]
[-ProxyUseDefaultCredentials] [-Body <Object>] [-ContentType <String>]
[-TransferEncoding <String>] [-InFile <String>] [-OutFile <String>] [-PassThru]
[<CommonParameters>]
```

## DESCRIPTION
Expand Down
5 changes: 3 additions & 2 deletions reference/5.1/Microsoft.PowerShell.Utility/New-Alias.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ Creates a new alias.
## SYNTAX

```
New-Alias [-Name] <String> [-Value] <String> [-Description <String>] [-Option <ScopedItemOptions>]
[-PassThru] [-Scope <String>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]
New-Alias [-Name] <String> [-Value] <String> [-Description <String>]
[-Option <ScopedItemOptions>] [-PassThru] [-Scope <String>] [-Force] [-WhatIf] [-Confirm]
[<CommonParameters>]
```

## DESCRIPTION
Expand Down
4 changes: 2 additions & 2 deletions reference/5.1/Microsoft.PowerShell.Utility/New-Event.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Creates a new event.
## SYNTAX

```
New-Event [-SourceIdentifier] <String> [[-Sender] <PSObject>] [[-EventArguments] <PSObject[]>]
[[-MessageData] <PSObject>] [<CommonParameters>]
New-Event [-SourceIdentifier] <String> [[-Sender] <PSObject>]
[[-EventArguments] <PSObject[]>] [[-MessageData] <PSObject>] [<CommonParameters>]
```

## DESCRIPTION
Expand Down
21 changes: 15 additions & 6 deletions reference/5.1/Microsoft.PowerShell.Utility/New-Object.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ Creates an instance of a Microsoft .NET Framework or COM object.
### Net (Default)

```
New-Object [-TypeName] <String> [[-ArgumentList] <Object[]>] [-Property <IDictionary>] [<CommonParameters>]
New-Object [-TypeName] <String> [[-ArgumentList] <Object[]>] [-Property <IDictionary>]
[<CommonParameters>]
```

### Com
Expand Down Expand Up @@ -92,8 +93,8 @@ At line:1 char:14
This example shows how to create and use a COM object to manage your Windows desktop.

The first command uses the **ComObject** parameter of the `New-Object` cmdlet to create a COM object
with the **Shell.Application** ProgID. It stores the resulting object in the `$objShell` variable. The
second command pipes the `$objShell` variable to the `Get-Member` cmdlet, which displays the
with the **Shell.Application** ProgID. It stores the resulting object in the `$objShell` variable.
The second command pipes the `$objShell` variable to the `Get-Member` cmdlet, which displays the
properties and methods of the COM object. Among the methods is the **ToggleDesktop** method. The
third command calls the **ToggleDesktop** method of the object to minimize the open windows on your
desktop.
Expand Down Expand Up @@ -209,9 +210,16 @@ Specifies an array of arguments to pass to the constructor of the .NET Framework
constructor takes a single parameter that is an array, you must wrap that parameter inside another
array. For example:

`$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate -ArgumentList (,$bytes)`
```powershell
$params = @{
TypeName = 'System.Security.Cryptography.X509Certificates.X509Certificate'
ArgumentList = (,$bytes)
}
$cert = New-Object @params
```

For more information about the behavior of **ArgumentList**, see [about_Splatting](../Microsoft.PowerShell.Core/About/about_Splatting.md#splatting-with-arrays).
For more information about the behavior of **ArgumentList**, see
[about_Splatting](../Microsoft.PowerShell.Core/About/about_Splatting.md#splatting-with-arrays).

The alias for **ArgumentList** is **Args**.

Expand Down Expand Up @@ -306,7 +314,8 @@ Accept wildcard characters: False

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-WarningAction, and -WarningVariable. For more information, see
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ order and uses the first path found:
$TempFile = New-TemporaryFile
```

This command generates a `.tmp` file in your temporary folder, and then stores a reference to the file
in the `$TempFile` variable. You can use this file later in your script.
This command generates a `.tmp` file in your temporary folder, and then stores a reference to the
file in the `$TempFile` variable. You can use this file later in your script.

## PARAMETERS

Expand Down Expand Up @@ -89,7 +89,8 @@ Accept wildcard characters: False

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-WarningAction, and -WarningVariable. For more information, see
[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).

## INPUTS

Expand Down
11 changes: 7 additions & 4 deletions reference/5.1/Microsoft.PowerShell.Utility/New-Variable.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ Creates a new variable.
## SYNTAX

```
New-Variable [-Name] <String> [[-Value] <Object>] [-Description <String>] [-Option <ScopedItemOptions>]
[-Visibility <SessionStateEntryVisibility>] [-Force] [-PassThru] [-Scope <String>] [-WhatIf] [-Confirm]
[<CommonParameters>]
New-Variable [-Name] <String> [[-Value] <Object>] [-Description <String>]
[-Option <ScopedItemOptions>] [-Visibility <SessionStateEntryVisibility>] [-Force]
[-PassThru] [-Scope <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -359,7 +359,10 @@ 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](https://go.microsoft.com/fwlink/?LinkID=113216).
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
-WarningAction, and -WarningVariable. For more information, see
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

Expand Down
6 changes: 4 additions & 2 deletions reference/5.1/Microsoft.PowerShell.Utility/Out-File.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ Sends output to a file.

```
Out-File [-FilePath] <string> [[-Encoding] <string>] [-Append] [-Force] [-NoClobber]
[-Width <int>] [-NoNewline] [-InputObject <psobject>] [-WhatIf] [-Confirm] [<CommonParameters>]
[-Width <int>] [-NoNewline] [-InputObject <psobject>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```

### ByLiteralPath

```
Out-File [[-Encoding] <string>] -LiteralPath <string> [-Append] [-Force] [-NoClobber]
[-Width <int>] [-NoNewline] [-InputObject <psobject>] [-WhatIf] [-Confirm] [<CommonParameters>]
[-Width <int>] [-NoNewline] [-InputObject <psobject>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```

## DESCRIPTION
Expand Down
22 changes: 11 additions & 11 deletions reference/5.1/Microsoft.PowerShell.Utility/Out-GridView.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ aliases:
- ogv
title: Out-GridView
---

# Out-GridView

## SYNOPSIS
Expand Down Expand Up @@ -322,7 +321,7 @@ Deserialized output from remote commands might not be formatted correctly in the
**To hide or show a column:**

1. Right-click any column header and click **Select Columns**.
2. In the **Select Columns** dialog box, use the arrow keys to move the columns between the Selected
1. In the **Select Columns** dialog box, use the arrow keys to move the columns between the Selected
columns to the Available columns boxes. Only columns in the **Select Columns** box appear in the
grid view window.

Expand All @@ -331,7 +330,7 @@ Deserialized output from remote commands might not be formatted correctly in the
You can drag and drop columns into the desired location. Or use the following steps:

1. Right-click any column header and click **Select Columns**.
2. In the **Select Columns** dialog box, use the **Move up** and **Move down** buttons to reorder
1. In the **Select Columns** dialog box, use the **Move up** and **Move down** buttons to reorder
the columns. Columns at the top of the list appear to the left of columns at the bottom of the
list in the grid view window.

Expand All @@ -346,9 +345,10 @@ You can drag and drop columns into the desired location. Or use the following st

- To select a row, select the row or use the up or down arrow to navigate to the row.
- To select all rows (except for the header row), press <kbd>CTRL</kbd>+<kbd>A</kbd>.
- To select consecutive rows, press and hold the <kbd>SHIFT</kbd> key while clicking the rows or using the
arrow keys.
- To select nonconsecutive rows, press the <kbd>CTRL</kbd> key and click to add a row to the selection.
- To select consecutive rows, press and hold the <kbd>SHIFT</kbd> key while clicking the rows or
using the arrow keys.
- To select nonconsecutive rows, press the <kbd>CTRL</kbd> key and click to add a row to the
selection.
- You cannot select columns, and you cannot select the entire column header row.

**How to Copy Rows**
Expand Down Expand Up @@ -404,11 +404,11 @@ The criteria only affects the display. It does not delete items from the table.

1. To display the **Add criteria** menu button, in the upper right corner of the window, click the
Expand arrow.
2. Click the **Add Criteria** menu button.
3. Click to select columns (properties). You can select one or many properties.
4. When you are finished selecting properties, click the **Add** button.
5. To cancel the additions, click **Cancel**.
6. To add more criteria, click the **Add Criteria** button again.
1. Click the **Add Criteria** menu button.
1. Click to select columns (properties). You can select one or many properties.
1. When you are finished selecting properties, click the **Add** button.
1. To cancel the additions, click **Cancel**.
1. To add more criteria, click the **Add Criteria** button again.

**How to Edit a Criterion**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Subscribes to the events that are generated by a Microsoft .NET Framework object
## SYNTAX

```
Register-ObjectEvent [-InputObject] <PSObject> [-EventName] <String> [[-SourceIdentifier] <String>]
[[-Action] <ScriptBlock>] [-MessageData <PSObject>] [-SupportEvent] [-Forward] [-MaxTriggerCount <Int32>]
[<CommonParameters>]
Register-ObjectEvent [-InputObject] <PSObject> [-EventName] <String>
[[-SourceIdentifier] <String>] [[-Action] <ScriptBlock>] [-MessageData <PSObject>]
[-SupportEvent] [-Forward] [-MaxTriggerCount <Int32>] [<CommonParameters>]
```

## DESCRIPTION
Expand All @@ -29,13 +29,13 @@ When the subscribed event is raised, it is added to the event queue in your sess
in the event queue, use the `Get-Event` cmdlet.

You can use the parameters of `Register-ObjectEvent` to specify property values of the events that
can help you to identify the event in the queue. You can also use the **Action** parameter to specify
actions to take when a subscribed event is raised and the **Forward** parameter to send remote events
to the event queue in the local session.
can help you to identify the event in the queue. You can also use the **Action** parameter to
specify actions to take when a subscribed event is raised and the **Forward** parameter to send
remote events to the event queue in the local session.

When you subscribe to an event, an event subscriber is added to your session. To get the event
subscribers in the session, use the `Get-EventSubscriber` cmdlet. To cancel the subscription, use the
`Unregister-Event` cmdlet, which deletes the event subscriber from the session.
subscribers in the session, use the `Get-EventSubscriber` cmdlet. To cancel the subscription, use
the `Unregister-Event` cmdlet, which deletes the event subscriber from the session.

## EXAMPLES

Expand Down Expand Up @@ -80,12 +80,13 @@ Id Name PSJobTypeName State HasMoreData Location Com
5 3db2d67a-efff-... NotStarted False New-Event @newEventArgs
```

The action uses the `$Sender` and `$EventArgs` automatic variables which are populated only for event
actions.
The action uses the `$Sender` and `$EventArgs` automatic variables which are populated only for
event actions.

The `Register-ObjectEvent` command returns a job object that represents the action, which runs as
a background job. You can use the Job cmdlets, such as `Get-Job` and `Receive-Job`, to manage the
background job. For more information, see [about_Jobs](../Microsoft.PowerShell.Core/About/about_Jobs.md).
background job. For more information, see
[about_Jobs](../Microsoft.PowerShell.Core/About/about_Jobs.md).

### Example 3: Subscribe to object events on remote computers

Expand Down Expand Up @@ -180,11 +181,12 @@ Information : {}
47
```

The **PSEventJob** has a **Module** property that contains a dynamic script module that implements the
action. Using the call operator (`&`), we invoke the command in the module to display the
The **PSEventJob** has a **Module** property that contains a dynamic script module that implements
the action. Using the call operator (`&`), we invoke the command in the module to display the
value of the `$Random` variable.

For more information about modules, see [about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md).
For more information about modules, see
[about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md).

## PARAMETERS

Expand Down Expand Up @@ -346,7 +348,8 @@ Accept wildcard characters: False

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-WarningAction, and -WarningVariable. For more information, see
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Remove-PSBreakpoint -Id 2

### Example 4: Use a function to remove all breakpoints

This simple function deletes all of the breakpoints in the current console.
This simple function deletes all the breakpoints in the current session.

```powershell
function del-psb { Get-PSBreakpoint | Remove-PSBreakpoint }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ current session.
Remove-TypeData -Path "$PSHOME\Modules\PSScheduledJob", "$PSHOME\Modules\PSWorkflow\PSWorkflow.types.ps1xml"
```

For more information about modules, see [about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md).
For more information about modules, see
[about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md).

### Example 5: Remove extended types from a remote session

Expand Down
10 changes: 6 additions & 4 deletions reference/5.1/Microsoft.PowerShell.Utility/Remove-Variable.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Deletes a variable and its value.
## SYNTAX

```
Remove-Variable [-Name] <String[]> [-Include <String[]>] [-Exclude <String[]>] [-Force] [-Scope <String>]
[-WhatIf] [-Confirm] [<CommonParameters>]
Remove-Variable [-Name] <String[]> [-Include <String[]>] [-Exclude <String[]>] [-Force]
[-Scope <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -120,7 +120,8 @@ Gets only the variables in the specified scope. The acceptable values for this p
- A number relative to the current scope (0 through the number of scopes, where 0 is the current
scope and 1 is its parent)

Local is the default. For more information, see [about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md).
Local is the default. For more information, see
[about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md).

```yaml
Type: System.String
Expand Down Expand Up @@ -170,7 +171,8 @@ Accept wildcard characters: False

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-WarningAction, and -WarningVariable. For more information, see
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

Expand Down
Loading