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
10 changes: 5 additions & 5 deletions reference/5.1/ISE/Get-IseSnippet.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function Parse-Snippet {
foreach ($SnippetFile in $SnippetFiles) {
Write-Host ""
$Title = Select-Xml -Path $SnippetFile.FullName -Namespace $SnippetNamespace -XPath "//x:Title" |
ForEach-Object {$_.Node.InnerXML}
ForEach-Object {$_.Node.InnerXml}
$Text = Select-Xml -Path $SnippetFile.FullName -Namespace $SnippetNamespace -XPath "//x:Script" |
ForEach-Object {$_.Node.InnerText}
Write-Host "Title: $Title"
Expand All @@ -83,10 +83,10 @@ function Parse-Snippet {
```Output
Title: Mandatory
Text:
Param
param
(
[parameter(Mandatory=True)]
[String[]]
[Parameter(Mandatory=True)]
[string[]]
$<ParameterName>
)

Expand Down Expand Up @@ -138,7 +138,7 @@ This cmdlet returns a file object representing the snippet file.

## NOTES

- The `New-IseSnippet` cmdlet stores new user-created snippets in unsigned .ps1xml files. As such,
- The `New-IseSnippet` cmdlet stores new user-created snippets in unsigned `.ps1xml` files. As such,
Windows PowerShell cannot add them to a session in which the execution policy is **AllSigned** or
**Restricted**. In a **Restricted** or **AllSigned** session, you can create, get, and import
unsigned user-created snippets, but you cannot use them in the session.
Expand Down
12 changes: 6 additions & 6 deletions reference/5.1/ISE/Import-IseSnippet.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Snippets** or press <kbd>Ctrl</kbd>+<kbd>J</kbd>.
Imported snippets are available only in the current session. To import the snippets into all Windows
PowerShell ISE sessions, add an `Import-IseSnippet` command to your Windows PowerShell profile or
copy the snippet files to your local snippets directory
`$HOME\Documents\WindowsPowershell\Snippets`.
`$HOME\Documents\WindowsPowerShell\Snippets`.

To import snippets, they must be properly formatted in the snippet XML for Windows PowerShell ISE
snippets and saved in Snippet.ps1xml files. To create eligible snippets, use the `New-IseSnippet`
Expand Down Expand Up @@ -78,9 +78,9 @@ Import-IseSnippet -Module SnippetModule -ListAvailable
This example gets snippets in all installed modules in the **PSModulePath** environment variable.

```powershell
($env:PSModulePath).split(";") |
($Env:PSModulePath).Split(";") |
ForEach-Object {dir $_\*\Snippets\*.Snippets.ps1xml -ErrorAction SilentlyContinue} |
ForEach-Object {$_.Fullname}
ForEach-Object {$_.FullName}
```

### Example 4: Import all module snippets
Expand All @@ -90,7 +90,7 @@ you don't need to run a command like this because modules that have snippets wil
`Import-IseSnippet` cmdlet to import them for you when the module is imported.

```powershell
($env:PSModulePath).split(";") |
($Env:PSModulePath).Split(";") |
ForEach-Object {dir $_\*\Snippets\*.Snippets.ps1xml -ErrorAction SilentlyContinue} |
ForEach-Object {$psISE.CurrentPowerShellTab.Snippets.Load($_)}
```
Expand All @@ -102,7 +102,7 @@ the current user. Unlike imported snippets, which affect only the current sessio
are available in every Windows PowerShell ISE session.

```powershell
($env:PSModulePath).split(";") |
($Env:PSModulePath).Split(";") |
ForEach-Object {dir $_\*\Snippets\*.Snippets.ps1xml -ErrorAction SilentlyContinue} |
Copy-Item -Destination $HOME\Documents\WindowsPowerShell\Snippets
```
Expand Down Expand Up @@ -215,7 +215,7 @@ This cmdlet returns no output.
**Microsoft.PowerShell.Host.ISE.ISESnippetCollection** objects. You can also use the **Load**
method of snippets in the Windows PowerShell ISE object model:
`$psISE.CurrentPowerShellTab.Snippets.Load()`
- The `New-IseSnippet` cmdlet stores new user-created snippets in unsigned .ps1xml files. As such,
- The `New-IseSnippet` cmdlet stores new user-created snippets in unsigned `.ps1xml` files. As such,
Windows PowerShell cannot load them into a session in which the execution policy is **AllSigned**
or **Restricted**. In a **Restricted** or **AllSigned** session, you can create, get, and import
unsigned user-created snippets, but you cannot use them in the session.
Expand Down
8 changes: 4 additions & 4 deletions reference/5.1/ISE/New-IseSnippet.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ This command creates a Comment-BasedHelp snippet for Windows PowerShell ISE. It

```powershell
$M = @'
Param
param
(
[parameter(Mandatory=$true)]
[String[]]
[Parameter(Mandatory=$true)]
[string[]]
$<ParameterName>
)
'@
Expand Down Expand Up @@ -227,7 +227,7 @@ This cmdlet returns no output.

## NOTES

`New-IseSnippet` stores new user-created snippets in unsigned .ps1xml files. As such, Windows
`New-IseSnippet` stores new user-created snippets in unsigned `.ps1xml` files. As such, Windows
PowerShell cannot add them to a session in which the execution policy is **AllSigned** or
**Restricted**. In a **Restricted** or **AllSigned** session, you can create, get, and import
unsigned user-created snippets, but you cannot use them in the session.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ have defined (two in the example above). For example, in this case:

```powershell
MyWebConfig -MachineName "TestMachine" -WebsiteFilePath `
"\\filesrv\WebFiles" -OutputPath "C:\Windows\system32\temp"
"\\filesrv\WebFiles" -OutputPath "C:\Windows\system32\Temp"
# OutputPath is optional
```

Expand All @@ -103,7 +103,7 @@ configuration, and enact those configurations. Note that you do not need to
create a separate MOF file for class-based DSC resources.

```powershell
Start-DscConfiguration -Verbose -Wait -Path "C:\Windows\system32\temp"
Start-DscConfiguration -Verbose -Wait -Path "C:\Windows\system32\Temp"
```

## USING DSC TO MAINTAIN CONFIGURATION STATE
Expand Down
22 changes: 11 additions & 11 deletions reference/5.1/Microsoft.PowerShell.Core/About/about_Eventlogs.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Get-WmiObject Win32_NTEventlogFile |
To find the Win32 event-related WMI classes, type:

```powershell
Get-WmiObject -List | where Name -Like "win32*event*"
Get-WmiObject -List | where Name -Like "Win32*Event*"
```

For more information, see [Get-EventLog][05] and [Get-WmiObject][06].
Expand All @@ -86,48 +86,48 @@ recorded in the Windows PowerShell event log.

There are six event log preference variables; two variables for each of the
three logging components: the engine (the Windows PowerShell program), the
providers, and the commands. The LifeCycleEvent variables log normal starting
and stopping events. The Health variables log error events.
providers, and the commands. The `LifecycleEvent` variables log normal starting
and stopping events. The `Health` variables log error events.

The following table lists the event log preference variables.

| Variable | Description |
| ---------------------------- | ----------------------------------------------- |
| `$LogEngineLifeCycleEvent` | Logs the start and stop of PowerShell |
| `$LogEngineLifecycleEvent` | Logs the start and stop of PowerShell |
| `$LogEngineHealthEvent` | Logs PowerShell program errors |
| `$LogProviderLifeCycleEvent` | Logs the start and stop of PowerShell providers |
| `$LogProviderLifecycleEvent` | Logs the start and stop of PowerShell providers |
| `$LogProviderHealthEvent` | Logs PowerShell provider errors |
| `$LogCommandLifeCycleEvent` | Logs the starting and completion of commands |
| `$LogCommandLifecycleEvent` | Logs the starting and completion of commands |
| `$LogCommandHealthEvent` | Logs command errors |

(For information about Windows PowerShell providers, see
[about_Providers][01].)

By default, only the following event types are enabled:

- `$LogEngineLifeCycleEvent`
- `$LogEngineLifecycleEvent`
- `$LogEngineHealthEvent`
- `$LogProviderLifeCycleEvent`
- `$LogProviderLifecycleEvent`
- `$LogProviderHealthEvent`

To enable an event type, set the preference variable for that event type to
`$true`. For example, to enable command life-cycle events, type:

```powershell
$LogCommandLifeCycleEvent
$LogCommandLifecycleEvent
```

Or, type:

```powershell
$LogCommandLifeCycleEvent = $true
$LogCommandLifecycleEvent = $true
```

To disable an event type, set the preference variable for that event type to
`$false`. For example, to disable command life-cycle events, type:

```powershell
$LogProviderLifeCycleEvent = $false
$LogProviderLifecycleEvent = $false
```

You can disable any event, except for the events that indicate that the Windows
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ private key:

```powershell
Get-WinEvent Microsoft-Windows-PowerShell/Operational |
Where-Object Id -eq 4104 |
Where-Object Id -EQ 4104 |
Unprotect-CmsMessage
```

Expand Down
22 changes: 11 additions & 11 deletions reference/5.1/Microsoft.PowerShell.Core/About/about_PSSnapins.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ Get-PSSnapin
To get the snap-in for each Windows PowerShell provider, type:

```powershell
Get-PSProvider | Format-List name, pssnapin
Get-PSProvider | Format-List Name, PSSnapIn
```

To get all the registered snap-ins on your system or to verify that a snap-in
is registered, type:

```powershell
Get-PSSnapin -registered
Get-PSSnapin -Registered
```

To get a list of the cmdlets in a Windows PowerShell snap-in, type:
Expand All @@ -70,7 +70,7 @@ your session.

## Add a snap-in to the current session

To add a registered snap-in to the current session, use the `Add-PsSnapin`
To add a registered snap-in to the current session, use the `Add-PSSnapin`
cmdlet. For example, to add the Microsoft SQL Server snap-in to the session,
type:

Expand All @@ -84,15 +84,15 @@ session unless you save them.

## Save a snap-ins

To use a snap-in in future Windows PowerShell sessions, add the `Add-PsSnapin`
To use a snap-in in future Windows PowerShell sessions, add the `Add-PSSnapin`
command to your Windows PowerShell profile. Or, export the snap-in names to a
console file.

If you add the `Add-PSSnapin` command to your profile, it's available in all
future Windows PowerShell sessions. If you export the names of the snap-ins in
your session, you can use the export file only when you need the snap-ins.

To add the `Add-PsSnapin` command to your Windows PowerShell profile, open your
To add the `Add-PSSnapin` command to your Windows PowerShell profile, open your
profile, paste or type the command, and then save the profile. For more
information, see [about_Profiles][03].

Expand All @@ -111,12 +111,12 @@ For more information, see [Export-Console][05].

To use a console file that includes the snap-in, start Windows PowerShell
(`powershell.exe`) from the command prompt in `cmd.exe` or in another Windows
PowerShell session. Use the **PsConsoleFile** parameter to specify the console
PowerShell session. Use the **PSConsoleFile** parameter to specify the console
file that includes the snap-in. For example, the following command starts
Windows PowerShell with the `NewConsole.psc1` console file:

```powershell
PowerShell.exe -psconsolefile NewConsole.psc1
powershell.exe -PSConsoleFile NewConsole.psc1
```

The providers and cmdlets in the snap-in are now available for use in the
Expand All @@ -125,7 +125,7 @@ session.
## Remove a snap-in

To remove a Windows PowerShell snap-in from the current session, use the
`Remove-PsSnapin` cmdlet. For example, to remove the SQL Server snap-in from the
`Remove-PSSnapin` cmdlet. For example, to remove the SQL Server snap-in from the
current session, type:

```powershell
Expand All @@ -148,9 +148,9 @@ For more information, see [about_EventLogs][01].
- [about_Profiles][03]
- [Get-Command][06]
- [Export-Console][05]
- [Add-PsSnapin][04]
- [Get-PsSnapin][07]
- [Remove-PsSnapin][08]
- [Add-PSSnapin][04]
- [Get-PSSnapin][07]
- [Remove-PSSnapin][08]

<!-- link references -->
[01]: about_EventLogs.md
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description: Explains how to use the PowerShell_Ise.exe command-line tool.
description: Explains how to use the `powershell_ise.exe` command-line tool.
Locale: en-US
ms.date: 06/09/2017
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_powershell_ise_exe?view=powershell-5.1&WT.mc_id=ps-gethelp
Expand All @@ -11,23 +11,22 @@ title: about_PowerShell_Ise_exe

## Short description

Explains how to use the PowerShell_Ise.exe command-line tool.
Explains how to use the `powershell_ise.exe` command-line tool.

## Long description

PowerShell_Ise.exe starts a Windows PowerShell Integrated
Running `powershell_ise.exe` starts a Windows PowerShell Integrated
Scripting Environment (ISE) session. You can run it in Cmd.exe
and in Windows PowerShell.

To run PowerShell_ISE.exe, type PowerShell_ISE.exe, PowerShell_ISE,
or ISE.
To run Windows PowerShell ISE, type `powershell_ise.exe`, `powershell_ise`,
or `ISE`.

## Syntax

```
PowerShell_Ise[.exe]
PowerShell_ISE[.exe]
ISE[.exe]
powershell_ise[.exe]
ISE
[-File]<FilePath[]> [-NoProfile] [-MTA]
-Help | ? | -? | /? Displays the syntax and describes the command-line switches.
```
Expand All @@ -43,7 +42,9 @@ commas to separate the file names within the string.

For example:

PowerShell_ISE -File "File1.ps1,File2.ps1,File3.xml".
```powershell
powershell_ise -File "File1.ps1,File2.ps1,File3.xml".
```

Spaces between the file names are permitted in Windows PowerShell,
but might not be interpreted correctly by other programs, such as
Expand All @@ -52,7 +53,7 @@ Cmd.exe.
You can use this parameter to open any text file, including Windows
PowerShell script files and XML files.

### -Mta
### -MTA

Starts Windows PowerShell ISE using a multi-threaded apartment. This
parameter is introduced in Windows PowerShell 3.0. Single-threaded
Expand All @@ -69,24 +70,24 @@ For more information, see [about_Profiles](about_Profiles.md).

### -Help -?, /?

Displays help for PowerShell_ISE.exe.
Displays help for `powershell_ise.exe`.

## Examples

These commands start Windows PowerShell ISE. The commands are equivalent
and can be used interchangeably.

```
PS C:> PowerShell_ISE.exe
PS C:> PowerShell_ISE
PS C:> powershell_ise.exe
PS C:> powershell_ise
PS C:> ISE
```

These commands open the Get-Profile.ps1 script in Windows PowerShell ISE.
The commands are equivalent and can be used interchangeably.

```
PS C:> PowerShell_ISE.exe -File .\Get-Profile.ps1
PS C:> powershell_ise.exe -File .\Get-Profile.ps1
PS C:> ISE -File .\Get-Profile.ps1
PS C:> ISE .\Get-Profile.ps1
```
Expand All @@ -106,10 +107,10 @@ This command starts Windows PowerShell ISE with no profiles.
PS C:> ISE -NoProfile
```

This command gets help for PowerShell_ISE.exe.
This command gets help for `powershell_ise.exe`.

```
PS C:> ISE -help
PS C:> ISE -Help
```

## See also
Expand Down
Loading