Skip to content

refactoring TOC #2096

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 2, 2018
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
98 changes: 45 additions & 53 deletions reference/docs-conceptual/PowerShell-Scripting.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,64 +6,56 @@ title: PowerShell Scripting

# PowerShell

Built on the .NET Framework,
Windows PowerShell is a task-based command-line shell and scripting language;
it is designed specifically for system administrators and power-users,
to rapidly automate the administration of multiple operating systems
(Linux, macOS, Unix, and Windows)
and the processes related to the applications that run on those operating systems.
Built on the .NET Framework, PowerShell is a task-based command-line shell and scripting language;
it is designed specifically for system administrators and power-users, to rapidly automate the
administration of multiple operating systems (Linux, macOS, Unix, and Windows) and the processes
related to the applications that run on those operating systems.

### PowerShell is now open source
## PowerShell is open source

PowerShell base source code is now available in GitHub and open to community
contributions, see [PowerShell](https://github.com/powershell/powershell).
contributions. See [PowerShell source on GitHub](https://github.com/powershell/powershell).

You can start with the bits you need at [get PowerShell](https://github.com/PowerShell/PowerShell#get-powershell).
Or, perhaps, with a quick tour at [Getting Started](https://github.com/PowerShell/PowerShell/blob/master/docs/learning-powershell)

> **Note:**
> All links about PowerShell in GitHub will take you to GitHub.

# Documentation

The documentation collection is organized around 4 main sections:

## [What's new with PowerShell](whats-new/What-s-New-With-PowerShell.md)
In this section you'll find all announcements about the product (version by
version and release by release).

## [PowerShell Setup](setup/setup-reference.md)
In this section you'll find all you need to know to install all
versions of PowerShell, in all supported environments.

You will also find how to configure for: security, accessibility, remote access
and management, workflows, and web access.

## [Getting started with PowerShell](getting-started/Getting-Started-with-Windows-PowerShell.md)
This section is for users new to PowerShell to get all the information needed
to start using the product.
In this section:
- The [Getting Ready to Use Windows PowerShell](getting-started/Getting-Ready-to-Use-Windows-PowerShell.md)
that explains the necessary steps needed to setup PowerShell to execute and try
all code and command snippets presented in the 'Getting Started with PowerShell'
section.
- The [fundamental concepts](getting-started/fundamental-concepts.md) guide that
explains what is PowerShell and the basic concepts needed to start using it.
- A series of '[understanding <concept>](getting-started/understanding-concepts-reference.md)' topics
that cover the basics of PowerShell.
- A series of '[basic cookbook for <usage>](getting-started/cookbooks/basic-cookbooks-reference.md)'
topics that provide recipes to execute standard tasks around files, file system,
registry, processes, services, and similar day-to-day subjects.
- A curated guide to other sources for
[learning PowerShell](getting-started/more-powershell-learning.md).

## [Common PowerShell](core-powershell/core-powershell.md)
This section contains all reference material PowerShell.
Find in this section:
- The [PowerShell Integrated Scripting Environment \(ISE\)](core-powershell/ise-guide.md)
- The [PowerShell Console Window](core-powershell/console-guide.md)
- The [PowerShell Remote Management](core-powershell/Running-Remote-Commands.md)
- The [PowerShell Workflows](core-powershell/workflows-guide.md)
- The [PowerShell Web Access](core-powershell/web-access.md)
- The [PowerShell Glossary](Windows-PowerShell-Glossary.md)
## PowerShell design goals
Windows PowerShell is designed to improve the command-line and scripting environment by eliminating long-standing problems and adding new features.

### Discoverability
Windows PowerShell makes it easy to discover its features. For example, to find a list of cmdlets that view and change Windows services, type:

```
Get-Command *-Service
```

After discovering which cmdlet accomplishes a task, you can learn more about the cmdlet by using the Get-Help cmdlet. For example, to display help about the Get-Service cmdlet, type:

```
Get-Help Get-Service
```
Most cmdlets emit objects which can be manipulated and then rendered into text for display. To fully understand the output of that cmdlet, pipe its output to the Get-Member cmdlet. For example, the following command displays information about the members of the object output by the Get-Service cmdlet.

```
Get-Service | Get-Member
```

### Consistency
Managing systems can be a complex endeavor and tools that have a consistent interface help to control the inherent complexity. Unfortunately, neither command-line tools nor scriptable COM objects have been known for their consistency.

The consistency of Windows PowerShell is one of its primary assets. For example, if you learn how to use the Sort-Object cmdlet, you can use that knowledge to sort the output of any cmdlet. You do not have to learn the different sorting routines of each cmdlet.

In addition, cmdlet developers do not have to design sorting features for their cmdlets. Windows PowerShell gives them a framework that provides the basic features and forces them to be consistent about many aspects of the interface. The framework eliminates some of the choices that are typically left to the developer, but, in return, it makes the development of robust and easy-to-use cmdlets much simpler.

### Interactive and Scripting Environments
Windows PowerShell is a combined interactive and scripting environment that gives you access to command-line tools and COM objects, and also enables you to use the power of the .NET Framework Class Library (FCL).

This environment improves upon the Windows Command Prompt, which provides an interactive environment with multiple command-line tools. It also improves upon Windows Script Host (WSH) scripts, which let you use multiple command-line tools and COM automation objects, but do not provide an interactive environment.

By combining access to all of these features, Windows PowerShell extends the ability of the interactive user and the script writer, and makes system administration more manageable.

### Object Orientation
Although you interact with Windows PowerShell by typing commands in text, Windows PowerShell is based on objects, not text. The output of a command is an object. You can send the output object to another command as its input. As a result, Windows PowerShell provides a familiar interface to people experienced with other shells, while introducing a new and powerful command-line paradigm. It extends the concept of sending data between commands by enabling you to send objects, rather than text.

### Easy Transition to Scripting
Windows PowerShell makes it easy to transition from typing commands interactively to creating and running scripts. You can type commands at the Windows PowerShell command prompt to discover the commands that perform a task. Then, you can save those commands in a transcript or a history before copying them to a file for use as a script.
16 changes: 0 additions & 16 deletions reference/docs-conceptual/core-powershell/core-powershell.md

This file was deleted.

21 changes: 0 additions & 21 deletions reference/docs-conceptual/core-powershell/ise/ISE-Module.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,39 @@ title: Introducing the Windows PowerShell ISE
---

# Introducing the Windows PowerShell ISE
The Windows PowerShell Integrated Scripting Environment (ISE) is a host application for Windows PowerShell. In Windows PowerShell ISE, you can run commands and write, test, and debug scripts in a single Windows-based graphic user interface with multiline editing, tab completion, syntax coloring, selective execution, context-sensitive help, and support for right-to-left languages.
You can use menu items and keyboard shortcuts to perform many of the same tasks that you would perform in the Windows PowerShell console.  For example, when you debug a script in the Windows PowerShell ISE, to set a line breakpoint in a script, right-click the line of code, and then click **Toggle Breakpoint**.

Try these features in Windows PowerShell ISE.

- Multiline editing: To insert a blank line under the current line in the Command pane, press SHIFT+ENTER.
The Windows PowerShell Integrated Scripting Environment (ISE) is a host application for Windows
PowerShell. In Windows PowerShell ISE, you can run commands and write, test, and debug scripts in a
single Windows-based graphic user interface with multiline editing, tab completion, syntax
coloring, selective execution, context-sensitive help, and support for right-to-left languages. You
can use menu items and keyboard shortcuts to perform many of the same tasks that you would perform
in the Windows PowerShell console. For example, when you debug a script in the Windows PowerShell
ISE, to set a line breakpoint in a script, right-click the line of code, and then click **Toggle
Breakpoint**.

- Selective execution: To run part of a script, select the text you want to run, and then click the **Run Script** button. Or, press F5.
Try these features in Windows PowerShell ISE.

- Context-sensitive help: Type **Invoke-Item**, and then press F1. The Help file opens to the Help topic for the **Invoke-Item** cmdlet.
- Multiline editing: To insert a blank line under the current line in the Command pane, press
SHIFT+ENTER.
- Selective execution: To run part of a script, select the text you want to run, and then click the
**Run Script** button. Or, press F5.
- Context-sensitive help: Type **Invoke-Item**, and then press F1. The Help file opens to the Help
topic for the **Invoke-Item** cmdlet.

The Windows PowerShell ISE lets you customize some aspects of its appearance. It also has its own Windows PowerShell profile, where you can store functions, aliases, variables, and commands you use in the Windows PowerShell ISE.
The Windows PowerShell ISE lets you customize some aspects of its appearance. It also has its own
Windows PowerShell profile, where you can store functions, aliases, variables, and commands you use
in the Windows PowerShell ISE.

### To start the Windows PowerShell ISE

1. Do one of the following:
Do one of the following:

- Click **Start**, point to **All Programs**, point to **Windows PowerShell V2**, and then click **Windows PowerShell ISE**.

- In the Windows PowerShell console Cmd.exe, or in the Run box, type, **powershell_ise.exe**.
- Click **Start**, point to **All Programs**, point to **Windows PowerShell V2**, and then click
**Windows PowerShell ISE**.
- In the Windows PowerShell console Cmd.exe, or in the Run box, type, **powershell_ise.exe**.

### To get Help in the Windows PowerShell ISE

- On the **Help** menu, click **Windows PowerShell Help**. Or, press F1. The file that opens describes Windows PowerShell ISE and Windows PowerShell, including all of the help available from the Get-Help cmdlet.

On the **Help** menu, click **Windows PowerShell Help**. Or, press F1. The file that opens
describes Windows PowerShell ISE and Windows PowerShell, including all of the help available from
the Get-Help cmdlet.
Original file line number Diff line number Diff line change
Expand Up @@ -6,64 +6,59 @@ ms.assetid: d176a131-ab0c-43ee-80c1-f824ab8e4a05
---

# Purpose of the Windows PowerShell ISE Scripting Object Model
Objects are associated with the form and function of Windows PowerShell Integrated Scripting Environment (ISE). The object model reference provides details about the member properties and methods that these objects expose. Examples are provided to show how you can use scripts to directly access these methods and properties. The scripting object model makes the following range of tasks easier.

Objects are associated with the form and function of Windows PowerShell Integrated Scripting
Environment (ISE). The object model reference provides details about the member properties and
methods that these objects expose. Examples are provided to show how you can use scripts to
directly access these methods and properties. The scripting object model makes the following range
of tasks easier.

## Customizing the appearance of Windows PowerShell ISE
You can use the object model to modify the application settings and options. For example, you can modify them as follows:

- You can change the color of errors, warnings, verbose outputs, and debug outputs.
You can use the object model to modify the application settings and options. For example, you can
modify them as follows:

- You can change the color of errors, warnings, verbose outputs, and debug outputs.
- You can get or set the background colors for the Command pane, the Output pane, and the Script pane.

- You can set the foreground color for the Output pane.

- You can set the font name and font size for Windows PowerShell ISE.

- You can configure warnings. This setting includes warnings that are issued when a file is opened in multiple PowerShell tabs or when a script in the file is run before the file has been saved.

- You can switch between a view where the Script pane and the Output pane are side-by-side and a view where the Script pane is on top of the Output pane. You can dock the Command pane to the bottom or the top of the Output pane.
- You can configure warnings. This setting includes warnings that are issued when a file is opened
in multiple PowerShell tabs or when a script in the file is run before the file has been saved.
- You can switch between a view where the Script pane and the Output pane are side-by-side and a
view where the Script pane is on top of the Output pane. You can dock the Command pane to the
bottom or the top of the Output pane.

## Enhancing the functionality of Windows PowerShell ISE
You can use the object model to enhance the functionality of Windows PowerShell ISE. For example, you can:

- Add and modify the instance of Windows PowerShell ISE itself. For example, to change the menus, you can add new menu items and map the new menu items to scripts.

- Create scripts that perform some of the tasks that you can perform by using the menu commands and buttons in Windows PowerShell ISE. For example, you can add, remove, or select a PowerShell tab.

- Complement tasks that can be performed by using menu commands and buttons. For example, you can rename a PowerShell tab.

- Manipulate text buffers for the Command pane, the Output pane, and the Script pane that are associated with a file. For example, you can:

- Get or set all text.

- Get or set a text selection.

- Run a script or run a selected portion of a script.

- Scroll a line into view.

- Insert text at a caret position.

- Select a block of text.

- Get the last line number.

You can use the object model to enhance the functionality of Windows PowerShell ISE. For example,
you can:

- Add and modify the instance of Windows PowerShell ISE itself. For example, to change the menus,
you can add new menu items and map the new menu items to scripts.
- Create scripts that perform some of the tasks that you can perform by using the menu commands and
buttons in Windows PowerShell ISE. For example, you can add, remove, or select a PowerShell tab.
- Complement tasks that can be performed by using menu commands and buttons. For example, you can
rename a PowerShell tab.
- Manipulate text buffers for the Command pane, the Output pane, and the Script pane that are
associated with a file. For example, you can:
- Get or set all text.
- Get or set a text selection.
- Run a script or run a selected portion of a script.
- Scroll a line into view.
- Insert text at a caret position.
- Select a block of text.
- Get the last line number.
- Perform file operations. For example, you can:

- Open a file, save a file, or save a file by using a different name.

- Determine whether a file has been changed after it was last saved.

- Get the file name.

- Select a file.
- Open a file, save a file, or save a file by using a different name.
- Determine whether a file has been changed after it was last saved.
- Get the file name.
- Select a file.

## Automating tasks
You can use the scripting object model to create keyboard shortcuts for frequent operations.

## See Also
- [The ISE Object Model Hierarchy](The-ISE-Object-Model-Hierarchy.md)
- [Windows PowerShell ISE Object Model Reference](Windows-PowerShell-ISE-Object-Model-Reference.md)
- [The Windows PowerShell ISE Scripting Object Model](The-Windows-PowerShell-ISE-Scripting-Object-Model.md)
You can use the scripting object model to create keyboard shortcuts for frequent operations.


## See also
- [The ISE Object Model Hierarchy](The-ISE-Object-Model-Hierarchy.md)
- [Windows PowerShell ISE Object Model Reference](Windows-PowerShell-ISE-Object-Model-Reference.md)
- [The Windows PowerShell ISE Scripting Object Model](The-Windows-PowerShell-ISE-Scripting-Object-Model.md)

This file was deleted.

Loading