diff --git a/README.md b/README.md index 55be2ece7f1d..53351b22bf78 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,43 @@ -## Microsoft Open Source Code of Conduct +# Microsoft Open Source Code of Conduct This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. [![Build status](https://ci.appveyor.com/api/projects/status/onshefxnc4g4pv87/branch/staging?svg=true)](https://ci.appveyor.com/project/PowerShell/powershell-docs/branch/staging) -# PowerShell Documentation +## PowerShell Documentation -Welcome to the PowerShell-Docs repository, housing the official Windows PowerShell documentation. +Welcome to the PowerShell-Docs repository, housing the official PowerShell documentation. ## Repository Structure -Each folder in this repo publishes to [MSDN](https://msdn.microsoft.com/en-us/powershell). The folders correspond to the following PowerShell assets: -* [/dsc/](https://msdn.microsoft.com/en-us/powershell/dsc/) is for the Desired State Configuration feature -* [/gallery/](https://msdn.microsoft.com/powershell/gallery) is for the [PowerShell Gallery](https://www.powershellgallery.com/) -* [/jea/](https://msdn.microsoft.com/powershell/jea/) is for the Just Enough Administration feature -* [/reference/](https://msdn.microsoft.com/powershell/reference/) is for PowerShell module reference across versions 3.0, 4.0, 5.0, 5.1, and 6.0 - * This content will be retrieved by the `Get-Help` cmdlet in the future -* [/scripting/](https://msdn.microsoft.com/en-us/powershell/scripting/) is general PowerShell reference content -* [/wmf](https://msdn.microsoft.com/en-us/powershell/wmf/readme) contains release notes for the Windows Management Framework, the package used to distribute new versions of PowerShell to previous versions of Windows. + +Each folder in this repo publishes to [Microsoft Docs](https://docs.microsoft.com/powershell). The folders +correspond to the following PowerShell assets: + +- [/dsc/](https://docs.microsoft.com/powershell/dsc/) is for the Desired State Configuration feature +- [/gallery/](https://docs.microsoft.com/powershell/gallery) is for the [PowerShell Gallery](https://www.powershellgallery.com/) +- [/jea/](https://docs.microsoft.com/powershell/jea/) is for the Just Enough Administration feature +- [/reference/](https://docs.microsoft.com/powershell/scripting/) is for PowerShell conceptual topics + and module reference across versions 3.0, 4.0, 5.0, 5.1, and 6.0 + - This content will be retrieved by the `Get-Help` cmdlet in the future +- [/wmf](https://docs.microsoft.com/powershell/wmf/readme) contains release notes for the Windows + Management Framework, the package used to distribute new versions of PowerShell to previous versions of Windows. ## Contributing -We actively merge contributions into this repository via [pull request](https://help.github.com/articles/using-pull-requests/) into the *staging* branch. -Please note that before you submit a pull request you must [sign a Contribution License Agreement](https://cla.microsoft.com/) to ensure that the community is free to use your submissions. +We actively merge contributions into this repository via [pull request](https://help.github.com/articles/using-pull-requests/) +into the *staging* branch. +Please note that before you submit a pull request you must [sign a Contribution License Agreement](https://cla.microsoft.com/) +to ensure that the community is free to use your submissions. + For more information on contributing, read our [contributions guide](CONTRIBUTING.md). There is a draft [style guide](./STYLE.md) to review before making contributions. -Please use the Issue and Pull Request templates to help keep documentation consistent across versions. +Please use the Issue and Pull Request templates to help keep documentation consistent across versions. ## Licenses -There are two license files for this project. +There are two license files for this project. The MIT License applies to the code contained in this repo. -The Creative Commons license applies to the documentation. +The Creative Commons license applies to the documentation. diff --git a/dsc/TOC.md b/dsc/TOC.md deleted file mode 100644 index abd927c7a952..000000000000 --- a/dsc/TOC.md +++ /dev/null @@ -1,205 +0,0 @@ -# [Overview](overview.md) - -## [Desired State Configuration Overview for Decision Makers](decisionMaker.md) - -## [Desired State Configuration Overview for Engineers](DscForEngineers.md) - -## [DSC quick start](quickStart.md) - -# [Configurations](configurations.md) - -## [Enacting configurations](enactingConfigurations.md) - -## [Separating configuration and environment data](separatingEnvData.md) - -## [Using resources with multiple versions](sxsResource.md) - -## [Running DSC with user credentials](runAsUser.md) - -## [Specifying cross-node dependencies](crossNodeDependencies.md) - -## [Configuration data](configData.md) - -### [Credential options in configuration data](configDataCredentials.md) - -## [Nesting configurations](compositeConfigs.md) - -## [Securing the configuration MOF file](secureMOF.md) - -## [Partial Configurations](partialConfigs.md) - -## [Writing help for DSC configurations](configHelp.md) - -## [Configure a virtual machine at initial boot-up by using DSC](bootstrapDsc.md) - -### [DSCAutomationHostEnabled registry key](DSCAutomationHostEnabled.md) - -# [Resources](resources.md) - -## [Built-in resources](builtInResource.md) - -### [Archive Resource](archiveResource.md) - -### [Environment Resource](environmentResource.md) - -### [File Resource](fileResource.md) - -### [Group Resource](groupResource.md) - -### [GroupSet Resource](groupSetResource.md) - -### [Log Resource](logResource.md) - -### [Package Resource](packageResource.md) - -### [ProcessSet Resource](processSetResource.md) - -### [Registry Resource](registryResource.md) - -### [Script Resource](scriptResource.md) - -### [Service Resource](serviceResource.md) - -### [ServiceSet Resource](serviceSetResource.md) - -### [User Resource](userResource.md) - -### [WaitForAllResource](waitForAllResource.md) - -### [WaitForAnyResource](waitForAnyResource.md) - -### [WaitForSomeResource](waitForSomeResource.md) - -### [WindowsFeature Resource](windowsfeatureResource.md) - -### [WindowsFeatureSet Resource](windowsFeatureSetResource.md) - -### [WindowsOptionalFeature Resource](windowsOptionalFeatureResource.md) - -### [WindowsOptionalFeatureSet Resource](windowsOptionalFeatureSetResource.md) - -### [WindowsPackageCab Resource](windowsPackageCabResource.md) - -### [WindowsProcess Resource](windowsProcessResource.md) - -## [Authoring custom resources](authoringResource.md) - -### [MOF-based custom resources](authoringResourceMOF.md) - -#### [MOF-based resource in C#](authoringResourceMofCS.md) - -### [Class-based custom resouces](authoringResourceClass.md) - -### [Composite resources](authoringResourceComposite.md) - -### [Writing a single-instance DSC resource (best practice)](singleInstance.md) - -### [Resource authoring checklist](resourceAuthoringChecklist.md) - -## [Debugging DSC resources](debugResource.md) - -## [Calling DSC resource methods directly](directCallResource.md) - -# Local Configuration Manager - -## [Configuring the Local Configuration Manager (LCM)](metaConfig.md) - -## [Configuring the LCM in PowerShell 4.0](metaConfig4.md) - -# The DSC pull model - -## [DSC Pull Service](pullServer.md) - -## [Setting up a DSC SMB pull server](pullServerSMB.md) - -## [Setting up a pull client](pullClient.md) - -### [Setting up a pull client using configuration names](pullClientConfigNames.md) - -### [Setting up a pull client using configuration ID](pullClientConfigID.md) - -## [Using a DSC report server](reportServer.md) - -## [Pull server best practices](secureServer.md) - -# [DSC examples](dscExamples.md) - -## [Building a CI/CD pipeline with DSC, Pester, and Visual Studio Team Services](dscCiCd.md) - -## [Separating configuration and environment data](separatingEnvData.md) - -# [Troubleshooting DSC](troubleshooting.md) - -# [Using DSC on Nano Server](nanoDsc.md) - -# DSC on Linux - -## [Getting started with DSC for Linux](lnxGettingStarted.md) - -## [Built-in resources for Linux](lnxBuiltInResources.md) - -### [nxArchive Resource](lnxArchiveResource.md) - -### [nxEnvironment Resource](lnxEnvironmentResource.md) - -### [nxFile Resource](lnxFileResource.md) - -### [nxFileLine Resource](lnxFileLineResource.md) - -### [nxGroup Resource](lnxGroupResource.md) - -### [nxPackage Resource](lnxPackageResource.md) - -### [nxService Resource](lnxServiceResource.md) - -### [nxSshAuthorizedKeys Resource](lnxSshAuthorizedKeysResource.md) - -### [nxUser Resource](lnxUserResource.md) - -# [Using DSC on Microsoft Azure](azureDsc.md) - -# DSC MOF Reference - -## [MSFT_DSCLocalConfigurationManager class](msft-dsclocalconfigurationmanager.md) - -### [ApplyConfiguration method of the MSFT_DSCLocalConfigurationManager class](msft-dsclocalconfigurationmanager-applyconfiguration.md) - -### [DisableDebugConfiguration method of the MSFT_DSCLocalConfigurationManager class](msft-dsclocalconfigurationmanager-disabledebugconfiguration.md) - -### [EnableDebugConfiguration method of the MSFT_DSCLocalConfigurationManager class](msft-dsclocalconfigurationmanager-enabledebugconfiguration.md) - -### [GetConfiguration method of the MSFT_DSCLocalConfigurationManager class](msft-dsclocalconfigurationmanager-getconfiguration.md) - -### [GetConfigurationResultOutput method of the MSFT_DSCLocalConfigurationManager class](msft-dsclocalconfigurationmanager-getconfigurationresultoutput.md) - -### [GetConfigurationStatus method of the MSFT_DSCLocalConfigurationManager class](msft-dsclocalconfigurationmanager-getconfigurationstatus.md) - -### [GetMetaConfiguration method of the MSFT_DSCLocalConfigurationManager class](msft-dsclocalconfigurationmanager-getmetaconfiguration.md) - -### [PerformRequiredConfigurationChecks method of the MSFT_DSCLocalConfigurationManager class](msft-dsclocalconfigurationmanager-performrequiredconfigurationchecks.md) - -### [RemoveConfiguration method of the MSFT_DSCLocalConfigurationManager class](msft-dsclocalconfigurationmanager-removeconfiguration.md) - -### [ResourceGet method of the MSFT_DSCLocalConfigurationManager class](msft-dsclocalconfigurationmanager-resourceget.md) - -### [ResourceSet method of the MSFT_DSCLocalConfigurationManager class](msft-dsclocalconfigurationmanager-resourceset.md) - -### [ResourceTest method of the MSFT_DSCLocalConfigurationManager class](msft-dsclocalconfigurationmanager-resourcetest.md) - -### [RollBack method of the MSFT_DSCLocalConfigurationManager class](msft-dsclocalconfigurationmanager-rollback.md) - -### [SendConfiguration method of the MSFT_DSCLocalConfigurationManager class](msft-dsclocalconfigurationmanager-sendconfiguration.md) - -### [SendConfigurationApply method of the MSFT_DSCLocalConfigurationManager class](msft-dsclocalconfigurationmanager-sendconfigurationapply.md) - -### [SendConfigurationApplyAsync method of the MSFT_DSCLocalConfigurationManager class](msft-dsclocalconfigurationmanager-sendconfigurationapplyasync.md) - -### [SendMetaConfigurationApply method of the MSFT_DSCLocalConfigurationManager class](msft-dsclocalconfigurationmanager-sendmetaconfigurationapply.md) - -### [StopConfiguration method of the MSFT_DSCLocalConfigurationManager class](msft-dsclocalconfigurationmanager-stopconfiguration.md) - -### [TestConfiguration method of the MSFT_DSCLocalConfigurationManager class](msft-dsclocalconfigurationmanager-testconfiguration.md) - -# More Resources - -## [Whitepapers](whitepapers.md) diff --git a/dsc/TOC.yml b/dsc/TOC.yml new file mode 100644 index 000000000000..63bf81b6710b --- /dev/null +++ b/dsc/TOC.yml @@ -0,0 +1,221 @@ +- name: Overview + href: overview.md + items: + - name: Desired State Configuration Overview for Decision Makers + href: decisionMaker.md + - name: Desired State Configuration Overview for Engineers + href: DscForEngineers.md + - name: DSC quick start + href: quickStart.md +- name: Configurations + href: configurations.md + items: + - name: Enacting configurations + href: enactingConfigurations.md + - name: Separating configuration and environment data + href: separatingEnvData.md + - name: Using resources with multiple versions + href: sxsResource.md + - name: Running DSC with user credentials + href: runAsUser.md + - name: Specifying cross-node dependencies + href: crossNodeDependencies.md + - name: Configuration data + href: configData.md + items: + - name: Credential options in configuration data + href: configDataCredentials.md + - name: Nesting configurations + href: compositeConfigs.md + - name: Securing the configuration MOF file + href: secureMOF.md + - name: Partial Configurations + href: partialConfigs.md + - name: Writing help for DSC configurations + href: configHelp.md + - name: Configure a virtual machine at initial boot-up by using DSC + href: bootstrapDsc.md + items: + - name: DSCAutomationHostEnabled registry key + href: DSCAutomationHostEnabled.md +- name: Resources + href: resources.md + items: + - name: Built-in resources + href: builtInResource.md + items: + - name: Archive Resource + href: archiveResource.md + - name: Environment Resource + href: environmentResource.md + - name: File Resource + href: fileResource.md + - name: Group Resource + href: groupResource.md + - name: GroupSet Resource + href: groupSetResource.md + - name: Log Resource + href: logResource.md + - name: Package Resource + href: packageResource.md + - name: ProcessSet Resource + href: processSetResource.md + - name: Registry Resource + href: registryResource.md + - name: Script Resource + href: scriptResource.md + - name: Service Resource + href: serviceResource.md + - name: ServiceSet Resource + href: serviceSetResource.md + - name: User Resource + href: userResource.md + - name: WaitForAllResource + href: waitForAllResource.md + - name: WaitForAnyResource + href: waitForAnyResource.md + - name: WaitForSomeResource + href: waitForSomeResource.md + - name: WindowsFeature Resource + href: windowsfeatureResource.md + - name: WindowsFeatureSet Resource + href: windowsFeatureSetResource.md + - name: WindowsOptionalFeature Resource + href: windowsOptionalFeatureResource.md + - name: WindowsOptionalFeatureSet Resource + href: windowsOptionalFeatureSetResource.md + - name: WindowsPackageCab Resource + href: windowsPackageCabResource.md + - name: WindowsProcess Resource + href: windowsProcessResource.md + - name: Authoring custom resources + href: authoringResource.md + items: + - name: MOF-based custom resources + href: authoringResourceMOF.md + items: + - name: MOF-based resource in C# + href: authoringResourceMofCS.md + - name: Class-based custom resouces + href: authoringResourceClass.md + - name: Composite resources + href: authoringResourceComposite.md + - name: Writing a single-instance DSC resource (best practice) + href: singleInstance.md + - name: Resource authoring checklist + href: resourceAuthoringChecklist.md + - name: Debugging DSC resources + href: debugResource.md + - name: Calling DSC resource methods directly + href: directCallResource.md +- name: Local Configuration Manager + items: + - name: Configuring the Local Configuration Manager (LCM) + href: metaConfig.md + - name: Configuring the LCM in PowerShell 4.0 + href: metaConfig4.md +- name: The DSC pull model + items: + - name: DSC Pull Service + href: pullServer.md + - name: Setting up a DSC SMB pull server + href: pullServerSMB.md + - name: Setting up a pull client + href: pullClient.md + items: + - name: Setting up a pull client using configuration names + href: pullClientConfigNames.md + - name: Setting up a pull client using configuration ID + href: pullClientConfigID.md + - name: Using a DSC report server + href: reportServer.md + - name: Pull server best practices + href: secureServer.md +- name: DSC examples + href: dscExamples.md + items: + - name: Building a CI/CD pipeline with DSC, Pester, and Visual Studio Team Services + href: dscCiCd.md + - name: Separating configuration and environment data + href: separatingEnvData.md +- name: Troubleshooting DSC + href: troubleshooting.md +- name: Using DSC on Nano Server + href: nanoDsc.md +- name: DSC on Linux + items: + - name: Getting started with DSC for Linux + href: lnxGettingStarted.md + - name: Built-in resources for Linux + href: lnxBuiltInResources.md + items: + - name: nxArchive Resource + href: lnxArchiveResource.md + - name: nxEnvironment Resource + href: lnxEnvironmentResource.md + - name: nxFile Resource + href: lnxFileResource.md + - name: nxFileLine Resource + href: lnxFileLineResource.md + - name: nxGroup Resource + href: lnxGroupResource.md + - name: nxPackage Resource + href: lnxPackageResource.md + - name: nxService Resource + href: lnxServiceResource.md + - name: nxSshAuthorizedKeys Resource + href: lnxSshAuthorizedKeysResource.md + - name: nxUser Resource + href: lnxUserResource.md +- name: Using DSC on Microsoft Azure + href: azureDsc.md + items: + - name: DSC Extension History + href: azureDscexthistory.md +- name: DSC MOF Reference + items: + - name: MSFT_DSCLocalConfigurationManager class + href: msft-dsclocalconfigurationmanager.md + items: + - name: ApplyConfiguration method of the MSFT_DSCLocalConfigurationManager class + href: msft-dsclocalconfigurationmanager-applyconfiguration.md + - name: DisableDebugConfiguration method of the MSFT_DSCLocalConfigurationManager class + href: msft-dsclocalconfigurationmanager-disabledebugconfiguration.md + - name: EnableDebugConfiguration method of the MSFT_DSCLocalConfigurationManager class + href: msft-dsclocalconfigurationmanager-enabledebugconfiguration.md + - name: GetConfiguration method of the MSFT_DSCLocalConfigurationManager class + href: msft-dsclocalconfigurationmanager-getconfiguration.md + - name: GetConfigurationResultOutput method of the MSFT_DSCLocalConfigurationManager class + href: msft-dsclocalconfigurationmanager-getconfigurationresultoutput.md + - name: GetConfigurationStatus method of the MSFT_DSCLocalConfigurationManager class + href: msft-dsclocalconfigurationmanager-getconfigurationstatus.md + - name: GetMetaConfiguration method of the MSFT_DSCLocalConfigurationManager class + href: msft-dsclocalconfigurationmanager-getmetaconfiguration.md + - name: PerformRequiredConfigurationChecks method of the MSFT_DSCLocalConfigurationManager class + href: msft-dsclocalconfigurationmanager-performrequiredconfigurationchecks.md + - name: RemoveConfiguration method of the MSFT_DSCLocalConfigurationManager class + href: msft-dsclocalconfigurationmanager-removeconfiguration.md + - name: ResourceGet method of the MSFT_DSCLocalConfigurationManager class + href: msft-dsclocalconfigurationmanager-resourceget.md + - name: ResourceSet method of the MSFT_DSCLocalConfigurationManager class + href: msft-dsclocalconfigurationmanager-resourceset.md + - name: ResourceTest method of the MSFT_DSCLocalConfigurationManager class + href: msft-dsclocalconfigurationmanager-resourcetest.md + - name: RollBack method of the MSFT_DSCLocalConfigurationManager class + href: msft-dsclocalconfigurationmanager-rollback.md + - name: SendConfiguration method of the MSFT_DSCLocalConfigurationManager class + href: msft-dsclocalconfigurationmanager-sendconfiguration.md + - name: SendConfigurationApply method of the MSFT_DSCLocalConfigurationManager class + href: msft-dsclocalconfigurationmanager-sendconfigurationapply.md + - name: SendConfigurationApplyAsync method of the MSFT_DSCLocalConfigurationManager class + href: msft-dsclocalconfigurationmanager-sendconfigurationapplyasync.md + - name: SendMetaConfigurationApply method of the MSFT_DSCLocalConfigurationManager class + href: msft-dsclocalconfigurationmanager-sendmetaconfigurationapply.md + - name: StopConfiguration method of the MSFT_DSCLocalConfigurationManager class + href: msft-dsclocalconfigurationmanager-stopconfiguration.md + - name: TestConfiguration method of the MSFT_DSCLocalConfigurationManager class + href: msft-dsclocalconfigurationmanager-testconfiguration.md +- name: More Resources + items: + - name: Whitepapers + href: whitepapers.md diff --git a/dsc/authoringResourceMofDesigner.md b/dsc/authoringResourceMofDesigner.md index 964c0de9d655..80eb796113fa 100644 --- a/dsc/authoringResourceMofDesigner.md +++ b/dsc/authoringResourceMofDesigner.md @@ -29,7 +29,7 @@ To create the properties, we use the **New-xDscResourceProperty** cmdlet. The fo ```powershell $UserName = New-xDscResourceProperty –Name UserName -Type String -Attribute Key $Ensure = New-xDscResourceProperty –Name Ensure -Type String -Attribute Write –ValidateSet “Present”, “Absent” -$DomainCredential = New-xDscResourceProperty –Name DomainCredential-Type PSCredential -Attribute Write +$DomainCredential = New-xDscResourceProperty –Name DomainCredential -Type PSCredential -Attribute Write $Password = New-xDscResourceProperty –Name Password -Type PSCredential -Attribute Write ``` @@ -177,4 +177,4 @@ The Resource Designer tool exposes one more cmdlet that can be used to test the [Build Custom Windows PowerShell Desired State Configuration Resources](authoringResource.md) #### Other Resources -[xDscResourceDesigner Module](https://powershellgallery.com/packages/xDscResourceDesigner) \ No newline at end of file +[xDscResourceDesigner Module](https://powershellgallery.com/packages/xDscResourceDesigner) diff --git a/dsc/azureDsc.md b/dsc/azureDsc.md index 28e88a4e9ee7..b53d714ac090 100644 --- a/dsc/azureDsc.md +++ b/dsc/azureDsc.md @@ -1,30 +1,31 @@ --- -ms.date: 2017-06-12 +ms.date: 2018-03-15 ms.topic: conceptual keywords: dsc,powershell,configuration,setup title: Using DSC on Microsoft Azure --- - # Using DSC on Microsoft Azure -Desired State Configuration (DSC) is supported in Microsoft Azure through the -[Azure Desired State Configuration extension handler](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-extensions-dsc-overview) and through -[Azure Automation DSC](https://docs.microsoft.com/azure/automation/automation-dsc-overview). +Desired State Configuration (DSC) is supported in Microsoft Azure through the +[Azure Desired State Configuration extension handler](/azure/virtual-machines/virtual-machines-windows-extensions-dsc-overview) +and through [Azure Automation DSC](/azure/automation/automation-dsc-overview). ## Azure Desired State Configuration extension handler -The Azure DSC extension allows VMs hosted in Microsoft Azure to be managed with DSC. For more information, see the following topics: +The Azure DSC extension allows VMs hosted in Microsoft Azure to be managed with DSC. +For more information, see the following topics: -- [Azure Desired State Configuration extension handler](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-extensions-dsc-overview) -- [Windows VMSS and Desired State Configuration with Azure Resource Manager templates](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-extensions-dsc-template) -- [Passing credentials to the Azure DSC extension handler](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-extensions-dsc-credentials) +- [Azure Desired State Configuration extension handler](/azure/virtual-machines/virtual-machines-windows-extensions-dsc-overview) +- [Windows VMSS and Desired State Configuration with Azure Resource Manager templates](/azure/virtual-machines/virtual-machines-windows-extensions-dsc-template) +- [Passing credentials to the Azure DSC extension handler](/azure/virtual-machines/virtual-machines-windows-extensions-dsc-credentials) +- [Azure Desired State Configuration extension history](azureDscexthistory.md) ## Azure Automation DSC -The [Azure Automation service](https://azure.microsoft.com/services/automation/) allows you to manage DSC configurations, resources, and managed nodes from within Azure. For -more information, see the following topics: - -- [Azure Automation DSC](https://docs.microsoft.com/azure/automation/automation-dsc-overview) -- [Getting started with Azure Automation DSC](https://docs.microsoft.com/azure/automation/automation-dsc-getting-started) -- [Onboarding machines for management by Azure Automation DSC](https://docs.microsoft.com/azure/automation/automation-dsc-onboarding) +The [Azure Automation service](https://azure.microsoft.com/services/automation/) allows you to +manage DSC configurations, resources, and managed nodes from within Azure. For more information, +see the following topics: +- [Azure Automation DSC](/azure/automation/automation-dsc-overview) +- [Getting started with Azure Automation DSC](/azure/automation/automation-dsc-getting-started) +- [Onboarding machines for management by Azure Automation DSC](/azure/automation/automation-dsc-onboarding) \ No newline at end of file diff --git a/dsc/azureDscexthistory.md b/dsc/azureDscexthistory.md new file mode 100644 index 000000000000..78cfeb5ad1d5 --- /dev/null +++ b/dsc/azureDscexthistory.md @@ -0,0 +1,251 @@ +--- +description: Learn about the version history for the Desired State Configuration (DSC) extension in Azure. +ms.date: 2018-03-14 +ms.topic: conceptual +keywords: dsc, powershell, azure, extension +title: Azure DSC Extension Version History +author: DCtheGeek +ms.author: dacoulte +--- +# Azure Desired State Configuration extension version history + +The Azure Desired State Configuration (DSC) VM Extension is updated as-needed to support enhancements and new capabilities delivered by Azure, Windows Server, and the Windows Management Framework (WMF) that includes Windows PowerShell. + +This article will provide information about each version of the Azure DSC VM Extension, what environments it supports, and comments and remarks on new features or changes. + +## Latest Versions + +### Version 2.75 + +- **Release date:** + - March 5, 2018 +- **OS support:** + - Windows Server 2016 + - Windows Server 2012 R2 + - Windows Server 2012 + - Windows Server 2008 R2 SP1 + - Windows Client 7/8.1/10 + - Nano Server +- **WMF support:** + - WMF 5.1 + - WMF 5.0 RTM + - WMF 4.0 Update + - WMF 4.0 +- **Environment:** + - Azure +- **Remarks:** This version uses DSC as included in Windows Server 2016; for other Windows OSes, it installs the [Windows Management Framework 5.1](https://blogs.msdn.microsoft.com/powershell/2016/12/06/wmf-5-1-releasing-january-2017/) (installing WMF requires a reboot). For Nano Server, DSC role is installed on the VM. +- **New features:** + - After GitHub's recent move to TLS 1.2, you can't onboard a VM to Azure Automation DSC using DIY Resource Manager templates available on Azure Marketplace or use DSC extension to get any config hosted on GitHub. You will see an error similar to the following while deploying the extension: + + ```json + { + "code": "DeploymentFailed", + "message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug for usage details.", + "details": [{ + "code": "Conflict", + "message": "{ + \"status\": \"Failed\", + \"error\": { + \"code\": \"ResourceDeploymentFailure\", + \"message\": \"The resource operation completed with terminal provisioning state 'Failed'.\", + \"details\": [ { + \"code\": \"VMExtensionProvisioningError\", + \"message\": \"VM has reported a failure when processing extension 'Microsoft.Powershell.DSC'. + Error message: \\\"The DSC Extension failed to execute: Error downloading + https://github.com/Azure/azure-quickstart-templates/raw/master/dsc-extension-azure-automation-pullserver/UpdateLCMforAAPull.zip + after 29 attempts: The request was aborted: Could not create SSL/TLS secure channel..\\nMore information about the failure can + be found in the logs located under 'C:\\\\WindowsAzure\\\\Logs\\\\Plugins\\\\Microsoft.Powershell.DSC\\\\2.74.0.0' on the VM.\\\".\" + } ] + } + }" + }] + } + ``` + + - In the new extension version, TLS 1.2 is now enforced. While deploying the extension if you already had the AutoUpgradeMinorVersion = true in the Resource Manager template, then the extension will get autoupgraded to 2.75. For manual updates, specify `TypeHandlerVersion = 2.75` in your Resource Manager template. + +### Version 2.19 + +- **Release date:** + - June 3, 2016 +- **OS support:** + - Windows Server 2016 Technical Preview + - Windows Server 2012 R2 + - Windows Server 2012 + - Windows Server 2008 R2 SP1 +- **WMF support:** + - WMF 5.0 RTM + - WMF 4.0 Update + - WMF 4.0 +- **Environment:** + - Azure + - Azure China + - Azure Government +- **Remarks:** This version uses DSC as included in Windows Server 2016 Technical Preview; for other OSes, it installs the [Windows Management Framework 5.0 RTM](https://blogs.msdn.microsoft.com/powershell/2015/12/16/windows-management-framework-wmf-5-0-rtm-is-now-available/) (installing WMF requires a reboot). +- **New features:** + - The DSC Extension is now on boarded to Azure China. This version primarily contains fixes for running the Extension on Azure China. + +## Supported Versions + +> [!WARNING] +> Versions 2.4 through 2.13 use WMF 5.0 Public Preview whose signing certificates expired in August 2016. For more information about this issue, see [blog post](https://blogs.msdn.microsoft.com/powershell/2016/05/24/azure-dsc-extension-versions-2-4-up-to-2-13-will-retire-in-august/). + +### Version 2.70 - 2.72 + +- **Release date:** November 13, 2017 +- **OS support:** Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 R2 SP1, Windows Client 7/8.1/10, Nano Server +- **WMF support:** WMF 5.1, WMF 5.0 RTM, WMF 4.0 Update, WMF 4.0 +- **Environment:** Azure +- **Remarks:** This version uses DSC as included in Windows Server 2016; for other Windows OSes, it installs the [Windows Management Framework 5.1](https://blogs.msdn.microsoft.com/powershell/2016/12/06/wmf-5-1-releasing-january-2017/) (installing WMF requires a reboot). For Nano Server, DSC role is installed on the VM. +- **New features:** + - Bug fixes & improvements that simplifies using DSC Azure Automation through the portal UI as well as Resource Manager template. For more information, see [Default Configuration Script](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/extensions-dsc-overview#default-configuration-script) in the DSC Extension documentation. + +### Version 2.26 + +- **Release date:** June 9, 2017 +- **OS support:** Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 R2 SP1, Windows Client 7/8.1/10, Nano Server +- **WMF support:** WMF 5.1, WMF 5.0 RTM, WMF 4.0 Update, WMF 4.0 +- **Environment:** Azure +- **Remarks:** This version uses DSC as included in Windows Server 2016; for other Windows OSes, it installs the [Windows Management Framework 5.1](https://blogs.msdn.microsoft.com/powershell/2016/12/06/wmf-5-1-releasing-january-2017/) (installing WMF requires a reboot). For Nano Server, DSC role is installed on the VM. +- **New features:** + - Telemetry improvements. + +### Version 2.25 + +- **Release date:** June 2, 2017 +- **OS support:** Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 R2 SP1, Windows Client 7/8.1/10, Nano Server +- **WMF support:** WMF 5.1, WMF 5.0 RTM, WMF 4.0 Update, WMF 4.0 +- **Environment:** Azure +- **Remarks:** This version uses DSC as included in Windows Server 2016; for other Windows OSes, it installs the [Windows Management Framework 5.1](https://blogs.msdn.microsoft.com/powershell/2016/12/06/wmf-5-1-releasing-january-2017/) (installing WMF requires a reboot). For Nano Server, DSC role is installed on the VM. +- **New features:** + - Several bug fixes and other minor improvements were added. + +### Version 2.24 + +- **Release date:** April 13, 2017 +- **OS support:** Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 R2 SP1, Nano Server +- **WMF support:** WMF 5.1, WMF 5.0 RTM, WMF 4.0 Update, WMF 4.0 +- **Environment:** Azure +- **Remarks:** This version uses DSC as included in Windows Server 2016; for other Windows OSes, it installs the [Windows Management Framework 5.1](https://blogs.msdn.microsoft.com/powershell/2016/12/06/wmf-5-1-releasing-january-2017/) (installing WMF requires a reboot). For Nano Server, DSC role is installed on the VM. +- **New features:** + - Exposes VM UUID & DSC Agent ID as extension metadata. Other minor improvements were added. + +### Version 2.23 + +- **Release date:** March 15, 2017 +- **OS support:** Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 R2 SP1, Nano Server +- **WMF support:** WMF 5.1, WMF 5.0 RTM, WMF 4.0 Update, WMF 4.0 +- **Environment:** Azure +- **Remarks:** This version uses DSC as included in Windows Server 2016; for other Windows OSes, it installs the [Windows Management Framework 5.1](https://blogs.msdn.microsoft.com/powershell/2016/12/06/wmf-5-1-releasing-january-2017/) (installing WMF requires a reboot). For Nano Server, DSC role is installed on the VM. +- **New features:** + - Lots of bug fixes and other improvements were added. + +### Version 2.22 + +- **Release date:** February 8, 2017 +- **OS support:** Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 R2 SP1, Nano Server +- **WMF support:** WMF 5.1, WMF 5.0 RTM, WMF 4.0 Update, WMF 4.0 +- **Environment:** Azure +- **Remarks:** This version uses DSC as included in Windows Server 2016; for other Windows OSes, it installs the [Windows Management Framework 5.1](https://blogs.msdn.microsoft.com/powershell/2016/12/06/wmf-5-1-releasing-january-2017/) (installing WMF requires a reboot). For Nano Server, DSC role is installed on the VM. +- **New features:** + - The DSC Extension now has support for WMF 5.1. + - Minor other improvements were added. + +### Version 2.21 + +- **Release date:** December 2, 2016 +- **OS support:** Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 R2 SP1, Nano Server +- **WMF support:** WMF 5.1 Preview, WMF 5.0 RTM, WMF 4.0 Update, WMF 4.0 +- **Environment:** Azure +- **Remarks:** This version uses DSC as included in Windows Server 2016; for other Windows OSes, it installs the [Windows Management Framework 5.0 RTM](https://blogs.msdn.microsoft.com/powershell/2015/12/16/windows-management-framework-wmf-5-0-rtm-is-now-available/) (installing WMF requires a reboot). For Nano Server, DSC role is installed on the VM. +- **New features:** + - The DSC Extension is now available on Nano Server. This version primarily contains code changes for running the Extension on Nano Server. + - Minor other improvements were added. + +### Version 2.20 + +- **Release date:** August 2, 2016 +- **OS support:** Windows Server 2016 Technical Preview, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 R2 SP1 +- **WMF support:** WMF 5.1 Preview, WMF 5.0 RTM, WMF 4.0 Update, WMF 4.0 +- **Environment:** Azure +- **Remarks:** This version uses DSC as included in Windows Server 2016 Technical Preview; for other Windows OSes, it installs the [Windows Management Framework 5.0 RTM](https://blogs.msdn.microsoft.com/powershell/2015/12/16/windows-management-framework-wmf-5-0-rtm-is-now-available/) (installing WMF requires a reboot). +- **New features:** + - Support for WMF 5.1 Preview. When first published, this version was an optional upgrade and you had to specify Wmfversion = ‘5.1PP’ in Resource Manager templates to install WMF 5.1 preview. Wmfversion = ‘latest’ still installs the [WMF 5.0 RTM](https://blogs.msdn.microsoft.com/powershell/2015/12/16/windows-management-framework-wmf-5-0-rtm-is-now-available/). For more information on WMF 5.1 preview, see [this blog]( https://blogs.msdn.microsoft.com/powershell/2016/07/16/announcing-windows-management-framework-wmf-5-1-preview/). + - Minor other fixes and improvements were added. + +### Version 2.19 + +- **Release date:** June 3, 2016 +- **OS support:** Windows Server 2016 Technical Preview, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 R2 SP1 +- **WMF support:** WMF 5.0 RTM, WMF 4.0 Update, WMF 4.0 +- **Environment:** Azure, Azure China, Azure Government +- **Remarks:** This version uses DSC as included in Windows Server 2016 Technical Preview; for other Windows OSes, it installs the [Windows Management Framework 5.0 RTM](https://blogs.msdn.microsoft.com/powershell/2015/12/16/windows-management-framework-wmf-5-0-rtm-is-now-available/) (installing WMF requires a reboot). +- **New features:** + - The DSC Extension is now onboarded to Azure China. This version primarily contains fixes for running the Extension on Azure China. + +### Version 2.18 + +- **Release date:** June 3, 2016 +- **OS support:** Windows Server 2016 Technical Preview, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 R2 SP1 +- **WMF support:** WMF 5.0 RTM, WMF 4.0 Update, WMF 4.0 +- **Environment:** Azure +- **Remarks:** This version uses DSC as included in Windows Server 2016 Technical Preview; for other Windows OSes, it installs the [Windows Management Framework 5.0 RTM](https://blogs.msdn.microsoft.com/powershell/2015/12/16/windows-management-framework-wmf-5-0-rtm-is-now-available/) (installing WMF requires a reboot). +- **New features:** + - Make telemetry non-blocking when an error occurs during telemetry hotfix download (known Azure DNS issue) or during install. + - Fix for the intermittent issue where extension stops processing configuration after a reboot. This was causing the DSC Extension to remain in ‘transitioning’ state. + - Minor other fixes and improvements were added. + +### Version 2.17 + +- **Release date:** April 26, 2016 +- **OS support:** Windows Server 2016 Technical Preview, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 R2 SP1 +- **WMF support:** WMF 5.0 RTM, WMF 4.0 Update, WMF 4.0 +- **Environment:** Azure +- **Remarks:** This version uses DSC as included in Windows Server 2016 Technical Preview; for other Windows OSes, it installs the [Windows Management Framework 5.0 RTM](https://blogs.msdn.microsoft.com/powershell/2015/12/16/windows-management-framework-wmf-5-0-rtm-is-now-available/) (installing WMF requires a reboot). +- **New features:** + - Support for WMF 4.0 Update. For more information on WMF 4.0 Update, see [this blog](https://blogs.msdn.microsoft.com/powershell/2016/01/19/windows-management-framework-wmf-4-0-update-now-available-for-windows-server-2012-windows-server-2008-r2-sp1-and-windows-7-sp1/). + - Retry logic on errors that occur during the DSC Extension install or while applying a DSC configuration post extension install. As a part of this change, the extension will retry the installation if a previous install failed or re-enact a DSC configuration that had previously failed, for a maximum three times until it reaches the completion state (Success/Error) or if a new request comes. If the extension fails due to invalid user settings/user input, it does not retry. In this case, the extension needs to be invoked again with a new request and correct user settings. Note: The DSC Extension is dependent on the Azure VM agent for the retries. Azure VM agent invokes the extension with the last failed request until it reaches a success or error state. + +### Version 2.16 + +- **Release date:** April 21, 2016 +- **OS support:** Windows Server 2016 Technical Preview, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 R2 SP1 +- **WMF support:** WMF 5.0 RTM, WMF 4.0 +- **Environment:** Azure +- **Remarks:** This version uses DSC as included in Windows Server 2016 Technical Preview; for other Windows OSes, it installs the [Windows Management Framework 5.0 RTM](https://blogs.msdn.microsoft.com/powershell/2015/12/16/windows-management-framework-wmf-5-0-rtm-is-now-available/) (installing WMF requires a reboot). +- **New features:** + - Improvement in error handling and other minor bug fixes. + - New property in DSC Extension settings. ‘ForcePullAndApply’ in AdvancedOptions is added to enable the DSC Extension enact DSC configurations when the refresh mode is Pull (as opposed to the default Push mode). For more information, please refer to [this blog](https://blogs.msdn.microsoft.com/powershell/2016/02/26/arm-dsc-extension-settings/) to get more information on the DSC Extension settings. + +### Version 2.15 + +- **Release date:** March 14, 2016 +- **OS support:** Windows Server 2016 Technical Preview, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 R2 SP1 +- **WMF support:** WMF 5.0 RTM, WMF 4.0 +- **Environment:** Azure +- **Remarks:** This version uses DSC as included in Windows Server 2016 Technical Preview; for other Windows OSes, it installs the [Windows Management Framework 5.0 RTM](https://blogs.msdn.microsoft.com/powershell/2015/12/16/windows-management-framework-wmf-5-0-rtm-is-now-available/) (installing WMF requires a reboot). +- **New features:** + - In extension version 2.14, changes to install WMF RTM were included. While upgrading from extension version 2.13.2.0 to 2.14.0.0, you may notice that some DSC cmdlets fail or your configuration fails with an error – ‘No Instance found with given property values’. For more information, see the [DSC release notes](https://msdn.microsoft.com/en-us/powershell/wmf/limitation_dsc). The workarounds for these issues have been added in 2.15 version. + - Unfortunately, if you have already installed version 2.14 and are running into one of the above two issues, you will need to perform these steps manually. In an elevated PowerShell session: + - `Remove-Item -Path $env:SystemRoot\system32\Configuration\DSCEngineCache.mof` + - `mofcomp $env:windir\system32\wbem\DscCoreConfProv.mof` + +### Version 2.14 + +- **Release date:** February 25, 2016 +- **OS support:** Windows Server 2016 Technical Preview, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 R2 SP1 +- **WMF support:** WMF 5.0 RTM, WMF 4.0 +- **Environment:** Azure +- **Remarks:** This version uses DSC as included in Windows Server 2016 Technical Preview; for other Windows OSes, it installs the [Windows Management Framework 5.0 RTM](https://blogs.msdn.microsoft.com/powershell/2015/12/16/windows-management-framework-wmf-5-0-rtm-is-now-available/) (installing WMF requires a reboot). +- **New features:** + - Uses WMF RTM. + - Enables data collection in order to improve the quality of the DSC Extension. For more information, see [the blog](https://blogs.msdn.microsoft.com/powershell/2016/02/02/azure-dsc-extension-data-collection-2/). + - Provides an updated settings format for the extension in a Resource Manager template. For more information, see [the blog](https://blogs.msdn.microsoft.com/powershell/2016/02/26/arm-dsc-extension-settings/). + - Bug fixes and other enhancements. + +## Next steps + +- For more information about PowerShell DSC, go to the [PowerShell documentation center](overview.md). +- Examine the [Resource Manager template for the DSC extension](/azure/virtual-machines/windows/extensions-dsc-template). +- For more functionality that you can manage by using PowerShell DSC, and for more DSC resources, browse the [PowerShell gallery](https://www.powershellgallery.com/packages?q=DscResource&x=0&y=0). +- For details about passing sensitive parameters into configurations, see [Manage credentials securely with the DSC extension handler](/azure/virtual-machines/windows/extensions-dsc-credentials). \ No newline at end of file diff --git a/dsc/docfx.json b/dsc/docfx.json index 8d4d435b0573..df4d40711b9b 100644 --- a/dsc/docfx.json +++ b/dsc/docfx.json @@ -10,7 +10,7 @@ } ], "globalMetadata": { - "breadcrumb_path":"bread/toc.json", + "breadcrumb_path":"~/bread/toc.yml", "uhfHeaderId": "MSDocsHeader-Powershell", "layout": "conceptual", "ROBOTS": "INDEX, FOLLOW", diff --git a/gallery/TOC.md b/gallery/TOC.md deleted file mode 100644 index 57ec5223eb1c..000000000000 --- a/gallery/TOC.md +++ /dev/null @@ -1,67 +0,0 @@ -# [Overview](readme.md) -## Gallery -### [Getting started](psgallery/psgallery_gettingstarted.md) -### [Health Status](psgallery/psgallery_status.md) -### [Gallery FAQs](psgallery/psgallery_faqs.md) -### [Gallery Items tab](psgallery/psgallery_items_tab.md) -### [Gallery search syntax](psgallery/psgallery_search_syntax.md) -### [Items with Compatible PSEditions](psgallery/psgallery_pseditions.md) -### [FileList view](psgallery/psgallery_filelist_feature.md) -### [Deploy to Azure Automation](psgallery/psgallery_deploy_to_azure_automation.md) -### [Creating a PowerShellGallery Account](psgallery/psgallery_creating_an_account.md) -### [Creating and publishing items](psgallery/Creating-and-Publishing-an-item.md) -### [Publishing guidelines and best practices](psgallery/psgallery-PublishingGuidelines.md) -### [Item manifest and Gallery UI](psgallery/psgallery_ItemManifestAffectingUI.md) -### [Unlisting items](psgallery/psgallery_unlist_items.md) -### [Deleting items](psgallery/Deleting-Items.md) -### [Managing item owners](psgallery/Managing-Item-Owners.md) -### [Report Abuse](psgallery/psgallery_report_abuse.md) -### [Dispute resolution](psgallery/psgallery_dispute_resolution.md) -### [Contacting item owners](psgallery/psgallery_contacting_item_owners.md) -### [Contacting administrators](psgallery/psgallery_contacting_administrators.md) -### [Providing Feedback via Social Media or Comments](psgallery/psgallery-SocialMediaFeedback.md) -### [Require License Acceptance on Items details](psgallery/psgallery_requires_license_acceptance.md) -### [Require License Acceptance on Deploy to Azure Automation](psgallery/psgallery_deploy_to_azure_automation_requireLicenseAcceptance.md) - -# [PowerShellGet](psget/overview.md) -## [Get PowerShellGet Module](psget/get_psget_module.md) - -## Module -### [Find Modules](psget/module/psget_find-module.md) -### [Find DSC Resources](psget/module/psget_find-dscresource.md) -### [Find Role Capabilities](psget/module/psget_find-rolecapability.md) -### [Find Commands](psget/module/psget_find-command.md) -### [Save](psget/module/psget_save-module.md) -### [Install](psget/module/psget_install-module.md) -### [Update](psget/module/psget_update-module.md) -### [Uninstall](psget/module/psget_uninstall-module.md) -### [Get installed modules](psget/module/psget_get-installedmodule.md) -### [Update module manifest](psget/module/psget_update-modulemanifest.md) -### [Publish](psget/module/psget_publish-module.md) -### [Modules with PSEditions](psget/module/modulewithpseditionsupport.md) -### [Modules Requiring License Acceptance](psget/module/RequireLicenseAcceptance.md) -### [Prerelease Versions](psget/module/PreReleaseModule.md) -### [Troubleshooting](psget/psget_cmdlets_troubleshooting.md) - -## Script -### [Find](psget/script/psget_find-script.md) -### [Save](psget/script/psget_save-script.md) -### [Install](psget/script/psget_install-script.md) -### [Update](psget/script/psget_update-script.md) -### [Uninstall](psget/script/psget_uninstall-script.md) -### [Get installed scipts](psget/script/psget_get-installedscript.md) -### [Create script file with metadata](psget/script/psget_new-scriptfileinfo.md) -### [Test script file metadata](psget/script/psget_test-scriptfileinfo.md) -### [Update script file metadata](psget/script/psget_update-scriptfileinfo.md) -### [Publish](psget/script/psget_publish-script.md) -### [Scripts with PSEditions](psget/script/scriptwithpseditionsupport.md) -### [Require License Acceptance for Scripts](psget/script/script_RequireLicenseAcceptance.md) -### [Prerelease Versions](psget/script/PreReleaseScript.md) -## Repository management -### [Bootstrapping NuGet provider and NuGet.exe](psget/repository/bootstrapping_nuget_proivder_and_exe.md) -### [Registering repository](psget/repository/psget_register-psrepository.md) -### [Listing registered repository](psget/repository/psget_get-psrepository.md) -### [Modifying registered repository](psget/repository/psget_set-psrepository.md) -### [Unregistering repository](psget/repository/psget_unregister-psrepository.md) - -## [PackageManagement cmdlets](psget/oneget/PackageManagement_cmdlets.md) diff --git a/gallery/TOC.yml b/gallery/TOC.yml new file mode 100644 index 000000000000..cd9234e172e7 --- /dev/null +++ b/gallery/TOC.yml @@ -0,0 +1,128 @@ +- name: Overview + href: readme.md + items: + - name: Gallery + items: + - name: Getting started + href: psgallery/psgallery_gettingstarted.md + - name: Health Status + href: psgallery/psgallery_status.md + - name: Gallery FAQs + href: psgallery/psgallery_faqs.md + - name: Gallery Items tab + href: psgallery/psgallery_items_tab.md + - name: Gallery search syntax + href: psgallery/psgallery_search_syntax.md + - name: Items with Compatible PSEditions + href: psgallery/psgallery_pseditions.md + - name: FileList view + href: psgallery/psgallery_filelist_feature.md + - name: Deploy to Azure Automation + href: psgallery/psgallery_deploy_to_azure_automation.md + - name: Creating a PowerShellGallery Account + href: psgallery/psgallery_creating_an_account.md + - name: Creating and publishing items + href: psgallery/Creating-and-Publishing-an-item.md + - name: Publishing guidelines and best practices + href: psgallery/psgallery-PublishingGuidelines.md + - name: Item manifest and Gallery UI + href: psgallery/psgallery_ItemManifestAffectingUI.md + - name: Unlisting items + href: psgallery/psgallery_unlist_items.md + - name: Deleting items + href: psgallery/Deleting-Items.md + - name: Managing item owners + href: psgallery/Managing-Item-Owners.md + - name: Report Abuse + href: psgallery/psgallery_report_abuse.md + - name: Dispute resolution + href: psgallery/psgallery_dispute_resolution.md + - name: Contacting item owners + href: psgallery/psgallery_contacting_item_owners.md + - name: Contacting administrators + href: psgallery/psgallery_contacting_administrators.md + - name: Providing Feedback via Social Media or Comments + href: psgallery/psgallery-SocialMediaFeedback.md + - name: Require License Acceptance on Items details + href: psgallery/psgallery_requires_license_acceptance.md + - name: Require License Acceptance on Deploy to Azure Automation + href: psgallery/psgallery_deploy_to_azure_automation_requireLicenseAcceptance.md +- name: PowerShellGet + href: psget/overview.md + items: + - name: Get PowerShellGet Module + href: psget/get_psget_module.md + - name: Module + items: + - name: Find Modules + href: psget/module/psget_find-module.md + - name: Find DSC Resources + href: psget/module/psget_find-dscresource.md + - name: Find Role Capabilities + href: psget/module/psget_find-rolecapability.md + - name: Find Commands + href: psget/module/psget_find-command.md + - name: Save + href: psget/module/psget_save-module.md + - name: Install + href: psget/module/psget_install-module.md + - name: Update + href: psget/module/psget_update-module.md + - name: Uninstall + href: psget/module/psget_uninstall-module.md + - name: Get installed modules + href: psget/module/psget_get-installedmodule.md + - name: Update module manifest + href: psget/module/psget_update-modulemanifest.md + - name: Publish + href: psget/module/psget_publish-module.md + - name: Modules with PSEditions + href: psget/module/modulewithpseditionsupport.md + - name: Modules Requiring License Acceptance + href: psget/module/RequireLicenseAcceptance.md + - name: Prerelease Versions + href: psget/module/PreReleaseModule.md + - name: Troubleshooting + href: psget/psget_cmdlets_troubleshooting.md + - name: Script + items: + - name: Find + href: psget/script/psget_find-script.md + - name: Save + href: psget/script/psget_save-script.md + - name: Install + href: psget/script/psget_install-script.md + - name: Update + href: psget/script/psget_update-script.md + - name: Uninstall + href: psget/script/psget_uninstall-script.md + - name: Get installed scipts + href: psget/script/psget_get-installedscript.md + - name: Create script file with metadata + href: psget/script/psget_new-scriptfileinfo.md + - name: Test script file metadata + href: psget/script/psget_test-scriptfileinfo.md + - name: Update script file metadata + href: psget/script/psget_update-scriptfileinfo.md + - name: Publish + href: psget/script/psget_publish-script.md + - name: Scripts with PSEditions + href: psget/script/scriptwithpseditionsupport.md + - name: Require License Acceptance for Scripts + href: psget/script/script_RequireLicenseAcceptance.md + - name: Prerelease Versions + href: psget/script/PreReleaseScript.md + - name: Repository management + items: + - name: Bootstrapping NuGet provider and NuGet.exe + href: psget/repository/bootstrapping_nuget_proivder_and_exe.md + - name: Registering repository + href: psget/repository/psget_register-psrepository.md + - name: Listing registered repository + href: psget/repository/psget_get-psrepository.md + - name: Modifying registered repository + href: psget/repository/psget_set-psrepository.md + - name: Unregistering repository + href: psget/repository/psget_unregister-psrepository.md + - name: PackageManagement cmdlets + href: psget/oneget/PackageManagement_cmdlets.md diff --git a/gallery/docfx.json b/gallery/docfx.json index 7015d17719f4..af03c10b1955 100644 --- a/gallery/docfx.json +++ b/gallery/docfx.json @@ -10,7 +10,7 @@ } ], "globalMetadata": { - "breadcrumb_path": "/powershell/gallery/bread/toc.json", + "breadcrumb_path": "/powershell/gallery/bread/toc.yml", "ROBOTS": "INDEX, FOLLOW", "uhfHeaderId": "MSDocsHeader-Powershell", "ms.prod": "powershell", diff --git a/gallery/psget/get_psget_module.md b/gallery/psget/get_psget_module.md index c61229b1f836..7571a153cd53 100644 --- a/gallery/psget/get_psget_module.md +++ b/gallery/psget/get_psget_module.md @@ -54,4 +54,5 @@ Exit ```powershell Copy-Item "C:\LocalFolder\PowerShellGet\*" "$env:ProgramFiles\WindowsPowerShell\Modules\PowerShellGet\" -Recurse -Force -Copy-Item "C:\LocalFolder\PackageManagement\*" "$env:ProgramFiles\WindowsPowerShell\Modules\PackageManagement\" -Recurse -Force \ No newline at end of file +Copy-Item "C:\LocalFolder\PackageManagement\*" "$env:ProgramFiles\WindowsPowerShell\Modules\PackageManagement\" -Recurse -Force +``` diff --git a/gallery/psget/module/modulewithpseditionsupport.md b/gallery/psget/module/modulewithpseditionsupport.md index fe0473688050..66f785cdaca0 100644 --- a/gallery/psget/module/modulewithpseditionsupport.md +++ b/gallery/psget/module/modulewithpseditionsupport.md @@ -220,8 +220,8 @@ Mode LastWriteTime Length Name -a---- 7/5/2016 1:35 PM 0 MyCoreClrRM.dl ``` -## PowerShell Gallery users can find the list of modules supported on a specific PowerShell Edition using tags PSEdition_Desktop and PSEditon_Core. -Modules without PSEdition_Desktop and PSEditon_Core tags are considered to work fine on PowerShell Desktop editions. +## PowerShell Gallery users can find the list of modules supported on a specific PowerShell Edition using tags PSEdition_Desktop and PSEdition_Core. +Modules without PSEdition_Desktop and PSEdition_Core tags are considered to work fine on PowerShell Desktop editions. ```powershell diff --git a/jea/TOC.MD b/jea/TOC.MD deleted file mode 100644 index 2af6fcc53fec..000000000000 --- a/jea/TOC.MD +++ /dev/null @@ -1,11 +0,0 @@ - -# [Overview](overview.md) - -# Deploy JEA -## [Prerequisites](prerequisites.md) -## [Role Capabilities](role-capabilities.md) -## [Session Configurations](session-configurations.md) -## [Registering JEA](register-jea.md) -## [Using JEA](using-jea.md) -## [Security Considerations](security-considerations.md) -## [Audit and Report on JEA](audit-and-report.md) diff --git a/jea/TOC.yml b/jea/TOC.yml new file mode 100644 index 000000000000..58213d9786a5 --- /dev/null +++ b/jea/TOC.yml @@ -0,0 +1,18 @@ +- name: Overview + href: overview.md +- name: Deploy JEA + items: + - name: Prerequisites + href: prerequisites.md + - name: Role Capabilities + href: role-capabilities.md + - name: Session Configurations + href: session-configurations.md + - name: Registering JEA + href: register-jea.md + - name: Using JEA + href: using-jea.md + - name: Security Considerations + href: security-considerations.md + - name: Audit and Report on JEA + href: audit-and-report.md diff --git a/jea/docfx.json b/jea/docfx.json index 431b86b21360..653e62d53740 100644 --- a/jea/docfx.json +++ b/jea/docfx.json @@ -10,7 +10,7 @@ } ], "globalMetadata": { - "breadcrumb_path": "bread/toc.json", + "breadcrumb_path": "bread/toc.yml", "uhfHeaderId": "MSDocsHeader-Powershell", "ROBOTS": "INDEX, FOLLOW", "ms.prod": "powershell", diff --git a/reference/5.0/Microsoft.PowerShell.Management/Test-Connection.md b/reference/5.0/Microsoft.PowerShell.Management/Test-Connection.md index 07a5fc5c2513..fae7289283e2 100644 --- a/reference/5.0/Microsoft.PowerShell.Management/Test-Connection.md +++ b/reference/5.0/Microsoft.PowerShell.Management/Test-Connection.md @@ -238,7 +238,7 @@ Aliases: Required: False Position: Named -Default value: None +Default value: 4 Accept pipeline input: False Accept wildcard characters: False ``` diff --git a/reference/5.1/Microsoft.PowerShell.Management/Test-Connection.md b/reference/5.1/Microsoft.PowerShell.Management/Test-Connection.md index 1535a2d06f93..1b5bb763a4d2 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Test-Connection.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Test-Connection.md @@ -200,7 +200,7 @@ Aliases: Required: False Position: Named -Default value: None +Default value: 4 Accept pipeline input: False Accept wildcard characters: False ``` diff --git a/reference/6/Microsoft.PowerShell.Core/Remove-Module.md b/reference/6/Microsoft.PowerShell.Core/Remove-Module.md index 147020c472a1..eb42a5345d3d 100644 --- a/reference/6/Microsoft.PowerShell.Core/Remove-Module.md +++ b/reference/6/Microsoft.PowerShell.Core/Remove-Module.md @@ -205,6 +205,23 @@ You can pipe module names and module objects to **Remove-Module**. This cmdlet does not generate any output. ## NOTES +When removing a module, there is an event on the module that will execute. +This event allows a module to react to being removed and perform some cleanup such as freeing up resources. Example: + +$OnRemoveScript = { + + \# perform cleanup + + $cachedSessions | Remove-PSSession + +} + +$ExecutionContext.SessionState.Module.OnRemove += $OnRemoveScript + +For full consistency, it might be also useful to react to the closing of the PowerShell process: + +Register-EngineEvent -SourceIdentifier ([System.Management.Automation.PsEngineEvent]::Exiting) -Action $OnRemoveScript + ## RELATED LINKS diff --git a/reference/6/Microsoft.PowerShell.Management/Test-Connection.md b/reference/6/Microsoft.PowerShell.Management/Test-Connection.md index 24030991762f..8acd339e20a9 100644 --- a/reference/6/Microsoft.PowerShell.Management/Test-Connection.md +++ b/reference/6/Microsoft.PowerShell.Management/Test-Connection.md @@ -201,7 +201,7 @@ Aliases: Required: False Position: Named -Default value: None +Default value: 4 Accept pipeline input: False Accept wildcard characters: False ``` diff --git a/reference/6/PackageManagement/Install-PackageProvider.md b/reference/6/PackageManagement/Install-PackageProvider.md index cfbdf744c59e..f7cb0dae1ba2 100644 --- a/reference/6/PackageManagement/Install-PackageProvider.md +++ b/reference/6/PackageManagement/Install-PackageProvider.md @@ -33,7 +33,7 @@ Install-PackageProvider [-Scope ] [-InputObject] [- ## DESCRIPTION The **Install-PackageProvider** cmdlet installs matching Package Management providers that are available in package sources registered with **PowerShellGet**. By default, this includes modules available in the Windows PowerShell Gallery with the **PackageManagement**. -The ** PowerShellGet** Package Management provider is used for finding providers in these repositories. +The **PowerShellGet** Package Management provider is used for finding providers in these repositories. This cmdlet also installs matching Package Management providers that are available using the Package Management bootstrapping application. diff --git a/reference/docfx.json b/reference/docfx.json index ffb21c5245ab..5b366ceaf4b9 100644 --- a/reference/docfx.json +++ b/reference/docfx.json @@ -49,7 +49,7 @@ "overwrite": [], "externalReference": [], "globalMetadata": { - "breadcrumb_path": "/powershell/bread-pscore/toc.json", + "breadcrumb_path": "/powershell/bread-pscore/toc.yml", "uhfHeaderId": "MSDocsHeader-Powershell", "apiPlatform": "powershell", "ms.devlang": "powershell", diff --git a/reference/docs-conceptual/core-powershell/ise/How-to-Create-a-PowerShell-Tab-in-Windows-PowerShell-ISE.md b/reference/docs-conceptual/core-powershell/ise/How-to-Create-a-PowerShell-Tab-in-Windows-PowerShell-ISE.md index 78261e99aae0..e7351f88e256 100644 --- a/reference/docs-conceptual/core-powershell/ise/How-to-Create-a-PowerShell-Tab-in-Windows-PowerShell-ISE.md +++ b/reference/docs-conceptual/core-powershell/ise/How-to-Create-a-PowerShell-Tab-in-Windows-PowerShell-ISE.md @@ -4,8 +4,8 @@ keywords: powershell,cmdlet title: How to Create a PowerShell Tab in Windows PowerShell ISE ms.assetid: c10c18c7-9ece-4fd0-83dc-a19c53d4fd83 --- - # How to Create a PowerShell Tab in Windows PowerShell ISE + Tabs in the Windows PowerShell Integrated Scripting Environment (ISE) allow you to simultaneously create and use several execution environments within the same application. @@ -67,6 +67,5 @@ see [How to Save a Script](How-to-Write-and-Run-Scripts-in-the-Windows-PowerShel ## See Also -- [Using the Windows PowerShell ISE](Using-the-Windows-PowerShell-ISE.md) -- [How to Use the Console Pane in the Windows PowerShell ISE](How-to-Use-the-Console-Pane-in-the-Windows-PowerShell-ISE.md) - +- [Introducing the Windows PowerShell ISE](Introducing-the-Windows-PowerShell-ISE.md) +- [How to Use the Console Pane in the Windows PowerShell ISE](How-to-Use-the-Console-Pane-in-the-Windows-PowerShell-ISE.md) \ No newline at end of file diff --git a/reference/docs-conceptual/core-powershell/ise/How-to-Debug-Scripts-in-Windows-PowerShell-ISE.md b/reference/docs-conceptual/core-powershell/ise/How-to-Debug-Scripts-in-Windows-PowerShell-ISE.md index 015c55dd09bc..546b2414246b 100644 --- a/reference/docs-conceptual/core-powershell/ise/How-to-Debug-Scripts-in-Windows-PowerShell-ISE.md +++ b/reference/docs-conceptual/core-powershell/ise/How-to-Debug-Scripts-in-Windows-PowerShell-ISE.md @@ -38,7 +38,7 @@ Displays all breakpoints in the current Windows PowerShell session. On the **Debug** menu, click **List Breakpoints**. The following script is an example of how you can list all breakpoints from the Console Pane by using the [Get-PSBreakpoint](https://technet.microsoft.com/library/0bf48936-00ab-411c-b5e0-9b10a812a3c6) cmdlet. ``` PowerShell -# This command lists all breakpoints in the current session. +# This command lists all breakpoints in the current session. Get-PSBreakpoint ``` @@ -83,7 +83,7 @@ Disable-PSBreakpoint -Id 0 Disabling a breakpoint does not remove it; it turns it off until it is enabled. To disable all breakpoints in the current session, on the **Debug** menu, click **Disable all Breakpoints**. The following script is an example of how you can disable all breakpoints from the Console Pane by using the [Disable-PSBreakpoint](https://technet.microsoft.com/library/d4974e9b-0aaa-4e20-b87f-f599a413e4e8) cmdlet. ``` PowerShell -# This command disables all breakpoints in the current session. +# This command disables all breakpoints in the current session. # You can abbreviate this command as: "gbp | dbp". Get-PSBreakpoint | Disable-PSBreakpoint ``` @@ -100,7 +100,7 @@ Enable-PSBreakpoint -Id 0, 1, 5 To enable all breakpoints defined in the current session, on the **Debug** menu, click **Enable all Breakpoints**. The following script is an example of how you can enable all breakpoints from the Console Pane by using the [Enable-PSBreakpoint](https://technet.microsoft.com/library/739e1091-3b3f-405f-a428-bec7543e5df0) cmdlet. ``` PowerShell -# This command enables all breakpoints in the current session. +# This command enables all breakpoints in the current session. # You can abbreviate the command by using their aliases: "gbp | ebp". Get-PSBreakpoint | Enable-PSBreakpoint ``` @@ -175,5 +175,4 @@ C:\ps-test\MyScript.ps1 ``` ## See Also -- [Using the Windows PowerShell ISE](Using-the-Windows-PowerShell-ISE.md) - +- [Exploring the Windows PowerShell ISE](../../getting-started/fundamental/exploring-the-windows-powershell-ise.md) diff --git a/reference/docs-conceptual/core-powershell/ise/How-to-Use-Profiles-in-Windows-PowerShell-ISE.md b/reference/docs-conceptual/core-powershell/ise/How-to-Use-Profiles-in-Windows-PowerShell-ISE.md index 19df5bdd544e..12a3cb0a3cee 100644 --- a/reference/docs-conceptual/core-powershell/ise/How-to-Use-Profiles-in-Windows-PowerShell-ISE.md +++ b/reference/docs-conceptual/core-powershell/ise/How-to-Use-Profiles-in-Windows-PowerShell-ISE.md @@ -4,8 +4,8 @@ keywords: powershell,cmdlet title: How to Use Profiles in Windows PowerShell ISE ms.assetid: 0219626a-6da5-4acc-b630-d058e8b29cc6 --- - # How to Use Profiles in Windows PowerShell ISE + This topic explains how to use Profiles in Windows PowerShell® Integrated Scripting Environment (ISE). We recommend that before performing the tasks in this section, you review [about_Profiles [v4]](https://technet.microsoft.com/library/e1d9e30a-70cc-4f36-949f-fc7cd96b4054(v=wps.630)), or in the Console Pane, type, `Get-Help about_Profiles` and press **ENTER**. A profile is a Windows PowerShell ISE script that runs automatically when you start a new session. You can create one or more Windows PowerShell profiles for Windows PowerShell ISE and use them to add the configure the Windows PowerShell or Windows PowerShell ISE environment, preparing it for your use, with variables, aliases, functions, and color and font preferences that you want available. A profile affects every Windows PowerShell ISE session that you start. @@ -14,6 +14,7 @@ A profile is a Windows PowerShell ISE script that runs automatically when you st > The Windows PowerShell execution policy determines whether you can run scripts and load a profile. The default execution policy, “Restricted,” prevents all scripts from running, including profiles. If you use the “Restricted” policy, the profile cannot load. For more information about execution policy, see [about_Execution_Policies [v4]](https://technet.microsoft.com/library/347708dc-1515-4d74-978b-8334603472e6(v=wps.630)). ## Selecting a profile to use in the Windows PowerShell ISE + Windows PowerShell ISE supports profiles for the current user and all users. It also supports the Windows PowerShell profiles that apply to all hosts. The profile that you use is determined by how you use Windows PowerShell and Windows PowerShell ISE. @@ -32,31 +33,32 @@ The following are profiles that can be created and used in Windows PowerShell IS | **All users, All hosts** | `$PROFILE.AllUsersAllHosts` | ## To create a new profile + To create a new “Current user, Windows PowerShell ISE” profile, run this command: ```powershell -if (!(Test-Path -Path $PROFILE )) +if (!(Test-Path -Path $PROFILE )) { New-Item -Type File -Path $PROFILE -Force } ``` To create a new “All users, Windows PowerShell ISE” profile, run this command: ```powershell -if (!(Test-Path -Path $PROFILE.AllUsersCurrentHost)) +if (!(Test-Path -Path $PROFILE.AllUsersCurrentHost)) { New-Item -Type File -Path $PROFILE.AllUsersCurrentHost -Force } ``` To create a new “Current user, All Hosts” profile, run this command: ```powershell -if (!(Test-Path -Path $PROFILE.CurrentUserAllHosts)) +if (!(Test-Path -Path $PROFILE.CurrentUserAllHosts)) { New-Item -Type File -Path $PROFILE.CurrentUserAllHosts -Force } ``` To create a new “All users, All Hosts” profile, type: ```powershell -if (!(Test-Path -Path $PROFILE.AllUsersAllHosts)) +if (!(Test-Path -Path $PROFILE.AllUsersAllHosts)) { New-Item -Type File -Path $PROFILE.AllUsersAllHosts -Force } ``` @@ -73,6 +75,6 @@ if (!(Test-Path -Path $PROFILE.AllUsersAllHosts)) 3. To save your profile file, on the **File** menu, click **Save**. Next time you open the Windows PowerShell ISE, your customizations are applied. ## See Also -- [about_Profiles [v4]](https://technet.microsoft.com/library/e1d9e30a-70cc-4f36-949f-fc7cd96b4054(v=wps.630)) -- [Using the Windows PowerShell ISE](Using-the-Windows-PowerShell-ISE.md) +- [about_Profiles [v4]](https://technet.microsoft.com/library/e1d9e30a-70cc-4f36-949f-fc7cd96b4054(v=wps.630)) +- [Introducing the Windows PowerShell ISE](Introducing-the-Windows-PowerShell-ISE.md) \ No newline at end of file diff --git a/reference/docs-conceptual/core-powershell/ise/How-to-Use-Tab-Completion-in-the-Script-Pane-and-Console-Pane.md b/reference/docs-conceptual/core-powershell/ise/How-to-Use-Tab-Completion-in-the-Script-Pane-and-Console-Pane.md index 35cf4833e2a9..410ac0c2741c 100644 --- a/reference/docs-conceptual/core-powershell/ise/How-to-Use-Tab-Completion-in-the-Script-Pane-and-Console-Pane.md +++ b/reference/docs-conceptual/core-powershell/ise/How-to-Use-Tab-Completion-in-the-Script-Pane-and-Console-Pane.md @@ -4,22 +4,24 @@ keywords: powershell,cmdlet title: How to Use Tab Completion in the Script Pane and Console Pane ms.assetid: 3b752c3c-0bd0-4eca-a2d3-2d5a37fd9d84 --- - # How to Use Tab Completion in the Script Pane and Console Pane + Tab completion provides automatic help when you are typing in the Script Pane or in the Command Pane. Use the following steps to take advantage of this feature: ## To automatically complete a command entry + In the Command Pane or Script Pane, type a few characters of a command and then press TAB to select the desired completion text. If multiple items begin with the text that you initially typed, then continue pressing Tab until the item you want appears. Tab completion can help with typing a cmdlet name, parameter name, variable name, object property name, or a file path. > [!NOTE] > In the Script Pane, pressing TAB will automatically complete a command only when you are editing .ps1, .psd1, or .psm1 files. Tab completion works any time when you are typing in the Command Pane. ## To automatically complete a cmdlet parameter entry + In the Command Pane or Script pane, type a cmdlet followed by a dash, and then press TAB. For example, type `Get-Process -` and then press TAB multiple times to display each of the parameters for the cmdlet in turn. ## See Also -- [Using Windows PowerShell ISE](using-the-windows-powershell-ise.md) -- [How to Create a PowerShell Tab](How-to-Create-a-PowerShell-Tab-in-Windows-PowerShell-ISE.md) +- [Introducing the Windows PowerShell ISE](Introducing-the-Windows-PowerShell-ISE.md) +- [How to Create a PowerShell Tab](How-to-Create-a-PowerShell-Tab-in-Windows-PowerShell-ISE.md) \ No newline at end of file diff --git a/reference/docs-conceptual/core-powershell/ise/How-to-Use-the-Console-Pane-in-the-Windows-PowerShell-ISE.md b/reference/docs-conceptual/core-powershell/ise/How-to-Use-the-Console-Pane-in-the-Windows-PowerShell-ISE.md index 74fbb8aa53ef..14260fa1a4fe 100644 --- a/reference/docs-conceptual/core-powershell/ise/How-to-Use-the-Console-Pane-in-the-Windows-PowerShell-ISE.md +++ b/reference/docs-conceptual/core-powershell/ise/How-to-Use-the-Console-Pane-in-the-Windows-PowerShell-ISE.md @@ -4,8 +4,8 @@ keywords: powershell,cmdlet title: How to Use the Console Pane in the Windows PowerShell ISE ms.assetid: 44d67705-87c7-4a69-a53e-6471fdebb757 --- - # How to Use the Console Pane in the Windows PowerShell ISE + The Console pane in the Windows PowerShell Integrated Scripting Environment (ISE) operates exactly like the stand-alone Windows PowerShell ISE console window. To run a command in the Console Pane, type a command, and then press ENTER. To enter multiple commands that you want to execute in sequence, type SHIFT+ENTER between commands. See [How to Use Tab Completion in the Script Pane and Console Pane](How-to-Use-Tab-Completion-in-the-Script-Pane-and-Console-Pane.md) for help in typing commands. @@ -21,5 +21,5 @@ Beginning in Windows PowerShell v3, the Output pane was combined with the Consol - Clear all the text in the Console pane. To clear the Console pane, you can click the **Clear Console Pane** icon on the toolbar, or run the command **Clear-Host** or its alias, **cls**. ## See Also -- [Using the Windows PowerShell ISE](Using-the-Windows-PowerShell-ISE.md) +- [Introducing the Windows PowerShell ISE](Introducing-the-Windows-PowerShell-ISE.md) \ No newline at end of file diff --git a/reference/docs-conceptual/core-powershell/ise/How-to-Write-and-Run-Scripts-in-the-Windows-PowerShell-ISE.md b/reference/docs-conceptual/core-powershell/ise/How-to-Write-and-Run-Scripts-in-the-Windows-PowerShell-ISE.md index 7bd06cb58cc8..76bdd90afc6d 100644 --- a/reference/docs-conceptual/core-powershell/ise/How-to-Write-and-Run-Scripts-in-the-Windows-PowerShell-ISE.md +++ b/reference/docs-conceptual/core-powershell/ise/How-to-Write-and-Run-Scripts-in-the-Windows-PowerShell-ISE.md @@ -135,5 +135,4 @@ Windows PowerShell ISE supports the following encoding options: ASCII, BigEndian Windows PowerShell ISE does not change the encoding of scripts that were created by in other editors, even when you use the Save or Save As commands in Windows PowerShell ISE. ## See Also -- [Using the Windows PowerShell ISE](Using-the-Windows-PowerShell-ISE.md) - +- [Exploring the Windows PowerShell ISE](../../getting-started/fundamental/exploring-the-windows-powershell-ise.md) diff --git a/reference/docs-conceptual/core-powershell/ise/The-ISE-Object-Model-Hierarchy.md b/reference/docs-conceptual/core-powershell/ise/The-ISE-Object-Model-Hierarchy.md index 597e26937f15..a89b4c1ae48b 100644 --- a/reference/docs-conceptual/core-powershell/ise/The-ISE-Object-Model-Hierarchy.md +++ b/reference/docs-conceptual/core-powershell/ise/The-ISE-Object-Model-Hierarchy.md @@ -3,13 +3,13 @@ ms.date: 2017-06-05 keywords: powershell,cmdlet title: The ISE Object Model Hierarchy --- - # The ISE Object Model Hierarchy -This topic shows the hierarchy of objects that are part of -Windows PowerShell Integrated Scripting Environment (ISE). -Windows PowerShell ISE is included in Windows PowerShell 3.0 -and in Windows PowerShell 4.0. -Click an object to take you to the reference documentation + +This topic shows the hierarchy of objects that are part of +Windows PowerShell Integrated Scripting Environment (ISE). +Windows PowerShell ISE is included in Windows PowerShell 3.0 +and in Windows PowerShell 4.0. +Click an object to take you to the reference documentation for the class that defines the object. ## $psISE Object @@ -39,7 +39,7 @@ edge of the Windows PowerShell ISE window. The **$psISE.CurrentVisibleHorizontalTool** object is an instance of the [ISEAddOnTool](The-ISEAddOnTool-Object.md) class. -It represents the installed add-on tool that is currently docked to the +It represents the installed add-on tool that is currently docked to the right-hand edge of the Windows PowerShell ISE window. ## [$psISE.Options](The-ISEOptions-Object.md) @@ -55,11 +55,12 @@ It is an instance of the Microsoft.PowerShell.Host.ISE.ISEOptions class. The **$psISE.PowerShellTabs** object is an instance of the [PowerShellTabCollection](The-PowerShellTabCollection-Object.md) class. It is a collection of all the currently open PowerShell tabs that represent -the available Windows PowerShell run environments on the local computer -or on connected remote computers. +the available Windows PowerShell run environments on the local computer +or on connected remote computers. Each member in the collection is an instance of the [PowerShellTab](The-PowerShellTab-Object.md) class. ## See Also -- [The Windows PowerShell ISE Scripting Object Model](The-Windows-PowerShell-ISE-Scripting-Object-Model.md) -- [Windows PowerShell ISE Object Model Reference](Windows-PowerShell-ISE-Object-Model-Reference.md) + +- [Purpose of the Windows PowerShell ISE Scripting Object Model](Purpose-of-the-Windows-PowerShell-ISE-Scripting-Object-Model.md) +- [The ISE Object Model Hierarchy](The-ISE-Object-Model-Hierarchy.md) \ No newline at end of file diff --git a/reference/docs-conceptual/core-powershell/ise/The-ISEAddOnTool-Object.md b/reference/docs-conceptual/core-powershell/ise/The-ISEAddOnTool-Object.md index 19b180856abe..7d285f2d9304 100644 --- a/reference/docs-conceptual/core-powershell/ise/The-ISEAddOnTool-Object.md +++ b/reference/docs-conceptual/core-powershell/ise/The-ISEAddOnTool-Object.md @@ -4,25 +4,27 @@ keywords: powershell,cmdlet title: The ISEAddOnTool Object ms.assetid: ce84d8bc-07ba-41f6-bdde-d6f3fddcd1e3 --- - # The ISEAddOnTool Object - An **ISEAddonTool** object represents an installed add-on tool that provides additional functionality toWindows PowerShell ISE. An example is the **Commands** tool that you can display by clicking **View**, then **Show Command Add-on**. This tool is then accessible to you by manipulating the various available **ISEAddOnTool** objects. - Each add-on tool can be associated with either the vertical pane or the horizontal pane. The vertical pane is docked to the right edge of Windows PowerShell ISE. The horizontal pane is docked to the bottom edge. +An **ISEAddonTool** object represents an installed add-on tool that provides additional functionality toWindows PowerShell ISE. An example is the **Commands** tool that you can display by clicking **View**, then **Show Command Add-on**. This tool is then accessible to you by manipulating the various available **ISEAddOnTool** objects. + +Each add-on tool can be associated with either the vertical pane or the horizontal pane. The vertical pane is docked to the right edge of Windows PowerShell ISE. The horizontal pane is docked to the bottom edge. - Each PowerShell tab in Windows PowerShell ISE can have its own set of add-on tools installed. See [$psISE.CurrentPowerShellTab.HorizontalAddOnTools](The-PowerShellTab-Object.md) and [$psISE.CurrentPowerShellTab.VerticalAddOnTools](The-PowerShellTab-Object.md) to access the collection of tools available to the currently selected tab or the same properties on any of the **PowerShellTab** objects in the [$psISE.PowerShellTabs](The-PowerShellTabCollection-Object.md) collection object. +Each PowerShell tab in Windows PowerShell ISE can have its own set of add-on tools installed. See [$psISE.CurrentPowerShellTab.HorizontalAddOnTools](The-PowerShellTab-Object.md) and [$psISE.CurrentPowerShellTab.VerticalAddOnTools](The-PowerShellTab-Object.md) to access the collection of tools available to the currently selected tab or the same properties on any of the **PowerShellTab** objects in the [$psISE.PowerShellTabs](The-PowerShellTabCollection-Object.md) collection object. ## Methods - There are no Windows PowerShell ISE-specific methods available for objects of this class. + +There are no Windows PowerShell ISE-specific methods available for objects of this class. ## Properties ### Control - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - The **Control** property provides read access to many of the details of the Commands add-on tool. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. -``` +The **Control** property provides read access to many of the details of the Commands add-on tool. + +```powershell # View the properties of the Commands add-on tool. # (assumes that it is visible in the vertical pane) $psISE.CurrentVisibleVerticalTool.Control @@ -130,37 +132,35 @@ TouchesDirectlyOver : {} DependencyObjectType : System.Windows.DependencyObjectType IsSealed : False Dispatcher : System.Windows.Threading.Dispatcher - ``` ### IsVisible - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - The Boolean property that indicates whether the add-on tool is currently visible in its assigned pane. If it is visible, you can set the **IsVisible** property to **$false** to hide the tool, or set the **IsVisible** property to **$true** to make an add-on tool visible on its PowerShell tab. Note that after an add-on tool is hidden, it is no longer accessible through the **CurrentVisibleHorizontalTool** or **CurrentVisibleVerticalTool** objects, and therefore cannot be made visible by using this property on that object. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. -``` +The Boolean property that indicates whether the add-on tool is currently visible in its assigned pane. If it is visible, you can set the **IsVisible** property to **$false** to hide the tool, or set the **IsVisible** property to **$true** to make an add-on tool visible on its PowerShell tab. Note that after an add-on tool is hidden, it is no longer accessible through the **CurrentVisibleHorizontalTool** or **CurrentVisibleVerticalTool** objects, and therefore cannot be made visible by using this property on that object. + +```powershell # Hide the current tool in the vertical tool pane $psISE.CurrentVisibleVerticalTool.IsVisible = $false # Show the first tool on the currently selected PowerShell tab -$psISE.CurrentPowerShellTab.VerticalAddOnTools[0].IsVisible=$true - +$psISE.CurrentPowerShellTab.VerticalAddOnTools[0].IsVisible = $true ``` ### Name - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - The read-only property that gets the name of the add-on tool. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. -``` +The read-only property that gets the name of the add-on tool. + +```powershell # Gets the name of the visible vertical pane add-on tool. -$psISE.CurrentVisibleVerticalTool.name +$psISE.CurrentVisibleVerticalTool.Name Commands - ``` ## See Also -- [The ISEAddOnToolCollection Object](The-ISEAddOnToolCollection-Object.md) -- [The Windows PowerShell ISE Scripting Object Model](The-Windows-PowerShell-ISE-Scripting-Object-Model.md) -- [Windows PowerShell ISE Object Model Reference](Windows-PowerShell-ISE-Object-Model-Reference.md) -- [The ISE Object Model Hierarchy](The-ISE-Object-Model-Hierarchy.md) +- [The ISEAddOnToolCollection Object](The-ISEAddOnToolCollection-Object.md) +- [Purpose of the Windows PowerShell ISE Scripting Object Model](Purpose-of-the-Windows-PowerShell-ISE-Scripting-Object-Model.md) +- [The ISE Object Model Hierarchy](The-ISE-Object-Model-Hierarchy.md) \ No newline at end of file diff --git a/reference/docs-conceptual/core-powershell/ise/The-ISEAddOnToolCollection-Object.md b/reference/docs-conceptual/core-powershell/ise/The-ISEAddOnToolCollection-Object.md index 50d5bd29b2a8..04fd2eef7eda 100644 --- a/reference/docs-conceptual/core-powershell/ise/The-ISEAddOnToolCollection-Object.md +++ b/reference/docs-conceptual/core-powershell/ise/The-ISEAddOnToolCollection-Object.md @@ -4,25 +4,26 @@ keywords: powershell,cmdlet title: The ISEAddOnToolCollection Object ms.assetid: 634eab89-0845-4016-974b-361b09bb8f7b --- - # The ISEAddOnToolCollection Object - The **ISEAddOnToolCollection** object is a collection of **ISEAddOnTool** objects. An example is the **$psISE.CurrentPowerShellTab.VerticalAddOnTools** object. + +The **ISEAddOnToolCollection** object is a collection of **ISEAddOnTool** objects. An example is the **$psISE.CurrentPowerShellTab.VerticalAddOnTools** object. ## Methods ### Add\( Name, ControlType, \[IsVisible\] \) - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - Adds a new add-on tool to the collection. It returns the newly added add-on tool. Before you run this command, you must install the add-on tool on the local computer and load the assembly. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - **Name** - String - Specifies the display name of the add-on tool that is added to Windows PowerShell ISE. +Adds a new add-on tool to the collection. It returns the newly added add-on tool. Before you run this command, you must install the add-on tool on the local computer and load the assembly. - **ControlType** -Type - Specifies the control that is added. +**Name** - String +Specifies the display name of the add-on tool that is added to Windows PowerShell ISE. - **\[IsVisible\]** - optional Boolean - If set to **$true**, the add-on tool is immediately visible in the associated tool pane. +**ControlType** -Type +Specifies the control that is added. + +**\[IsVisible\]** - optional Boolean +If set to **$true**, the add-on tool is immediately visible in the associated tool pane. ```powershell # Load a DLL with an add-on and then add it to the ISE @@ -31,12 +32,13 @@ $psISE.CurrentPowerShellTab.VerticalAddOnTools.Add("Solutions", [ISESimpleSoluti ``` ### Remove\( Item \) - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - Removes the specified add-on tool from the collection. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. + +Removes the specified add-on tool from the collection. - **Item** - Microsoft.PowerShell.Host.ISE.ISEAddOnTool - Specifies the object to be removed from Windows PowerShell ISE. +**Item** - Microsoft.PowerShell.Host.ISE.ISEAddOnTool +Specifies the object to be removed from Windows PowerShell ISE. ```powershell # Load a DLL with an add-on and then add it to the ISE @@ -45,39 +47,39 @@ $psISE.CurrentPowerShellTab.VerticalAddOnTools.Add("Solutions", [ISESimpleSoluti ``` ### SetSelectedPowerShellTab\( psTab \) - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - Selects the PowerShell tab that the **psTab** parameter specifies. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - **psTab** - Microsoft.PowerShell.Host.ISE.PowerShellTab - The PowerShell tab to select. +Selects the PowerShell tab that the **psTab** parameter specifies. + +**psTab** - Microsoft.PowerShell.Host.ISE.PowerShellTab +The PowerShell tab to select. ```powershell - $newTab = $psISE.PowerShellTabs.Add() -# Change the DisplayName of the new PowerShell tab. -$newTab.DisplayName="Brand New Tab" +$newTab = $psISE.PowerShellTabs.Add() +# Change the DisplayName of the new PowerShell tab. +$newTab.DisplayName = 'Brand New Tab' ``` ### Remove\( psTab \) - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - Removes the PowerShell tab that the **psTab** parameter specifies. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. + +Removes the PowerShell tab that the **psTab** parameter specifies. - **psTab** - Microsoft.PowerShell.Host.ISE.PowerShellTab - The PowerShell tab to remove. +**psTab** - Microsoft.PowerShell.Host.ISE.PowerShellTab +The PowerShell tab to remove. ```powershell $newTab = $psISE.PowerShellTabs.Add() -Change the DisplayName of the new PowerShell tab. -$newTab.DisplayName="This tab will go away in 5 seconds" -sleep 5 +Change the DisplayName of the new PowerShell tab. +$newTab.DisplayName = 'This tab will go away in 5 seconds' +sleep 5 $psISE.PowerShellTabs.Remove($newTab) ``` ## See Also -- [The PowerShellTab Object](The-PowerShellTab-Object.md) -- [The Windows PowerShell ISE Scripting Object Model](The-Windows-PowerShell-ISE-Scripting-Object-Model.md) -- [Windows PowerShell ISE Object Model Reference](Windows-PowerShell-ISE-Object-Model-Reference.md) -- [The ISE Object Model Hierarchy](The-ISE-Object-Model-Hierarchy.md) - +- [The PowerShellTab Object](The-PowerShellTab-Object.md) +- [Purpose of the Windows PowerShell ISE Scripting Object Model](Purpose-of-the-Windows-PowerShell-ISE-Scripting-Object-Model.md) +- [The ISE Object Model Hierarchy](The-ISE-Object-Model-Hierarchy.md) \ No newline at end of file diff --git a/reference/docs-conceptual/core-powershell/ise/The-ISEEditor-Object.md b/reference/docs-conceptual/core-powershell/ise/The-ISEEditor-Object.md index fbbe0534389a..cf6d8a55dfc2 100644 --- a/reference/docs-conceptual/core-powershell/ise/The-ISEEditor-Object.md +++ b/reference/docs-conceptual/core-powershell/ise/The-ISEEditor-Object.md @@ -3,16 +3,17 @@ ms.date: 2017-06-05 keywords: powershell,cmdlet title: The ISEEditor Object --- - # The ISEEditor Object - An **ISEEditor** object is an instance of the Microsoft.PowerShell.Host.ISE.ISEEditor class. The Console pane is an **ISEEditor** object. Each [ISEFile](The-ISEFile-Object.md) object has an associated **ISEEditor** object. The following sections list the methods and properties of an **ISEEditor** object. + +An **ISEEditor** object is an instance of the Microsoft.PowerShell.Host.ISE.ISEEditor class. The Console pane is an **ISEEditor** object. Each [ISEFile](The-ISEFile-Object.md) object has an associated **ISEEditor** object. The following sections list the methods and properties of an **ISEEditor** object. ## Methods ### Clear\(\) - Supported in Windows PowerShell ISE 2.0 and later. - Clears the text in the editor. +Supported in Windows PowerShell ISE 2.0 and later. + +Clears the text in the editor. ```powershell # Clears the text in the Console pane. @@ -20,104 +21,113 @@ $psISE.CurrentPowerShellTab.ConsolePane.Clear() ``` ### EnsureVisible\(int lineNumber\) - Supported in Windows PowerShell ISE 2.0 and later. - Scrolls the editor so that the line that corresponds to the specified **lineNumber** parameter value is visible. It throws an exception if the specified line number is outside the range of 1,last line number, which defines the valid line numbers. +Supported in Windows PowerShell ISE 2.0 and later. - **lineNumber** - The number of the line that is to be made visible. +Scrolls the editor so that the line that corresponds to the specified **lineNumber** parameter value is visible. It throws an exception if the specified line number is outside the range of 1,last line number, which defines the valid line numbers. + +**lineNumber** +The number of the line that is to be made visible. ```powershell -# Scrolls the text in the Script pane so that the fifth line is in view. +# Scrolls the text in the Script pane so that the fifth line is in view. $psISE.CurrentFile.Editor.EnsureVisible(5) ``` ### Focus\(\) - Supported in Windows PowerShell ISE 2.0 and later. - Sets the focus to the editor. +Supported in Windows PowerShell ISE 2.0 and later. + +Sets the focus to the editor. ```powershell -# Sets focus to the Console pane. +# Sets focus to the Console pane. $psISE.CurrentPowerShellTab.ConsolePane.Focus() ``` ### GetLineLength\(int lineNumber \) - Supported in Windows PowerShell ISE 2.0 and later. - Gets the line length as an integer for the line that is specified by the line number. +Supported in Windows PowerShell ISE 2.0 and later. - **lineNumber** - The number of the line of which to get the length. +Gets the line length as an integer for the line that is specified by the line number. - **Returns** - The line length for the line at the specified line number. +**lineNumber** +The number of the line of which to get the length. + +**Returns** +The line length for the line at the specified line number. ```powershell -# Gets the length of the first line in the text of the Command pane. +# Gets the length of the first line in the text of the Command pane. $psISE.CurrentPowerShellTab.ConsolePane.GetLineLength(1) ``` ### GoToMatch\(\) - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - Moves the caret to the matching character if the **CanGoToMatch** property of the editor object is **$true**, which occurs when the caret is immediately before an opening parenthesis, bracket, or brace - \(,\[,{ - or immediately after a closing parenthesis, bracket, or brace - \),\],}. The caret is placed before an opening character or after a closing character. If the **CanGoToMatch** property is **$false**, then this method does nothing. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. + +Moves the caret to the matching character if the **CanGoToMatch** property of the editor object is **$true**, which occurs when the caret is immediately before an opening parenthesis, bracket, or brace - \(,\[,{ - or immediately after a closing parenthesis, bracket, or brace - \),\],}. The caret is placed before an opening character or after a closing character. If the **CanGoToMatch** property is **$false**, then this method does nothing. ```powershell -# Test to see if the caret is next to a parenthesis, bracket, or brace. +# Goes to the matching character if CanGoToMatch() is $true +$psISE.CurrentPowerShellTab.ConsolePane.GoToMatch() ``` ### InsertText\( text \) - Supported in Windows PowerShell ISE 2.0 and later. - Replaces the selection with text or inserts text at the current caret position. +Supported in Windows PowerShell ISE 2.0 and later. + +Replaces the selection with text or inserts text at the current caret position. - **text** - String - The text to insert. +**text** - String +The text to insert. - See the [Scripting Example](#scripting-example) later in this topic. +See the [Scripting Example](#scripting-example) later in this topic. ### Select\( startLine, startColumn, endLine, endColumn \) - Supported in Windows PowerShell ISE 2.0 and later. - Selects the text from the **startLine**, **startColumn**, **endLine**, and **endColumn** parameters. +Supported in Windows PowerShell ISE 2.0 and later. - **startLine** - Integer - The line where the selection starts. +Selects the text from the **startLine**, **startColumn**, **endLine**, and **endColumn** parameters. - **startColumn** - Integer - The column within the start line where the selection starts. +**startLine** - Integer +The line where the selection starts. - **endLine** - Integer - The line where the selection ends. +**startColumn** - Integer +The column within the start line where the selection starts. - **endColumn** - Integer - The column within the end line where the selection ends. +**endLine** - Integer +The line where the selection ends. - See the [Scripting Example](#scripting-example) later in this topic. +**endColumn** - Integer +The column within the end line where the selection ends. + +See the [Scripting Example](#scripting-example) later in this topic. ### SelectCaretLine\(\) - Supported in Windows PowerShell ISE 2.0 and later. - Selects the entire line of text that currently contains the caret. +Supported in Windows PowerShell ISE 2.0 and later. + +Selects the entire line of text that currently contains the caret. ```powershell # First, set the caret position on line 5. -$psISE.CurrentFile.Editor.SetCaretPosition(5,1) +$psISE.CurrentFile.Editor.SetCaretPosition(5,1) # Now select that entire line of text $psISE.CurrentFile.Editor.SelectCaretLine() ``` ### SetCaretPosition\( lineNumber, columnNumber \) - Supported in Windows PowerShell ISE 2.0 and later. - Sets the caret position at the line number and the column number. It throws an exception if either the caret line number or the caret column number are out of their respective valid ranges. +Supported in Windows PowerShell ISE 2.0 and later. + +Sets the caret position at the line number and the column number. It throws an exception if either the caret line number or the caret column number are out of their respective valid ranges. - **lineNumber** - Integer - The caret line number. +**lineNumber** - Integer +The caret line number. - **columnNumber** - Integer - The caret column number. +**columnNumber** - Integer +The caret column number. ```powershell # Set the CaretPosition. @@ -125,9 +135,10 @@ $psISE.CurrentFile.Editor.SetCaretPosition(5,1) ``` ### ToggleOutliningExpansion\(\) - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - Causes all the outline sections to expand or collapse. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. + +Causes all the outline sections to expand or collapse. ```powershell # Toggle the outlining expansion @@ -137,9 +148,10 @@ $psISE.CurrentFile.Editor.ToggleOutliningExpansion() ## Properties ### CanGoToMatch - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - The read-only Boolean property to indicate whether the caret is next to a parenthesis, bracket, or brace - \(\), \[\], {}. If the caret is immediately before the opening character or immediately after the closing character of a pair, then this property value is **$true**. Otherwise, it is **$false**. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. + +The read-only Boolean property to indicate whether the caret is next to a parenthesis, bracket, or brace - \(\), \[\], {}. If the caret is immediately before the opening character or immediately after the closing character of a pair, then this property value is **$true**. Otherwise, it is **$false**. ```powershell # Test to see if the caret is next to a parenthesis, bracket, or brace @@ -147,9 +159,10 @@ $psISE.CurrentFile.Editor.CanGoToMatch ``` ### CaretColumn - Supported in Windows PowerShell ISE 2.0 and later. - The read-only property that gets the column number that corresponds to the position of the caret. +Supported in Windows PowerShell ISE 2.0 and later. + +The read-only property that gets the column number that corresponds to the position of the caret. ```powershell # Get the CaretColumn. @@ -157,9 +170,10 @@ $psISE.CurrentFile.Editor.CaretColumn ``` ### CaretLine - Supported in Windows PowerShell ISE 2.0 and later. - The read-only property that gets the number of the line that contains the caret. +Supported in Windows PowerShell ISE 2.0 and later. + +The read-only property that gets the number of the line that contains the caret. ```powershell # Get the CaretLine. @@ -167,9 +181,10 @@ $psISE.CurrentFile.Editor.CaretLine ``` ### CaretLineText - Supported in Windows PowerShell ISE 2.0 and later. - The read-only property that gets the complete line of text that contains the caret. +Supported in Windows PowerShell ISE 2.0 and later. + +The read-only property that gets the complete line of text that contains the caret. ```powershell # Get all of the text on the line that contains the caret. @@ -177,9 +192,10 @@ $psISE.CurrentFile.Editor.CaretLineText ``` ### LineCount - Supported in Windows PowerShell ISE 2.0 and later. - The read-only property that gets the line count from the editor. +Supported in Windows PowerShell ISE 2.0 and later. + +The read-only property that gets the line count from the editor. ```powershell # Get the LineCount. @@ -187,24 +203,26 @@ $psISE.CurrentFile.Editor.LineCount ``` ### SelectedText - Supported in Windows PowerShell ISE 2.0 and later. - The read-only property that gets the selected text from the editor. +Supported in Windows PowerShell ISE 2.0 and later. - See the [Scripting Example](#scripting-example) later in this topic. +The read-only property that gets the selected text from the editor. + +See the [Scripting Example](#scripting-example) later in this topic. ### Text - Supported in Windows PowerShell ISE 2.0 and later. - The read/write property that gets or sets the text in the editor. +Supported in Windows PowerShell ISE 2.0 and later. + +The read/write property that gets or sets the text in the editor. - See the [Scripting Example](#scripting-example) later in this topic. +See the [Scripting Example](#scripting-example) later in this topic. ## Scripting Example ```powershell # This illustrates how you can use the length of a line to -# select the entire line and shows how you can make it lowercase. +# select the entire line and shows how you can make it lowercase. # You must run this in the Console pane. It will not run in the Script pane. # Begin by getting a variable that points to the editor. $myEditor = $psISE.CurrentFile.Editor @@ -218,10 +236,10 @@ $myEditor.InsertText("LINE3 `n") $myEditor.InsertText("LINE4 `n") $myEditor.InsertText("LINE5 `n") -# Use the GetLineLength method to get the length of the third line. -$endColumn= $myEditor.GetLineLength(3) +# Use the GetLineLength method to get the length of the third line. +$endColumn = $myEditor.GetLineLength(3) # Select the text in the first three lines. -$myEditor.Select(1,1,3,$endColumn + 1) +$myEditor.Select(1, 1, 3, $endColumn + 1) $selection = $myEditor.SelectedText # Clear all the text in the editor. $myEditor.Clear() @@ -230,10 +248,8 @@ $myEditor.InsertText($selection.ToLower()) ``` ## See Also -- [The ISEFile Object](The-ISEFile-Object.md) -- [The PowerShellTab Object](The-PowerShellTab-Object.md) -- [The Windows PowerShell ISE Scripting Object Model](The-Windows-PowerShell-ISE-Scripting-Object-Model.md) -- [Windows PowerShell ISE Object Model Reference](Windows-PowerShell-ISE-Object-Model-Reference.md) -- [The ISE Object Model Hierarchy](The-ISE-Object-Model-Hierarchy.md) - +- [The ISEFile Object](The-ISEFile-Object.md) +- [The PowerShellTab Object](The-PowerShellTab-Object.md) +- [Purpose of the Windows PowerShell ISE Scripting Object Model](Purpose-of-the-Windows-PowerShell-ISE-Scripting-Object-Model.md) +- [The ISE Object Model Hierarchy](The-ISE-Object-Model-Hierarchy.md) \ No newline at end of file diff --git a/reference/docs-conceptual/core-powershell/ise/The-ISEFile-Object.md b/reference/docs-conceptual/core-powershell/ise/The-ISEFile-Object.md index 804b66a2d8a3..fea8c09b0fbb 100644 --- a/reference/docs-conceptual/core-powershell/ise/The-ISEFile-Object.md +++ b/reference/docs-conceptual/core-powershell/ise/The-ISEFile-Object.md @@ -4,136 +4,136 @@ keywords: powershell,cmdlet title: The ISEFile Object ms.assetid: 1c6d91f3-c556-42a2-a017-79b6b7b4b7db --- - # The ISEFile Object - An **ISEFile** object represents a file in Windows PowerShell® Integrated Scripting Environment (ISE). It is an instance of the Microsoft.PowerShell.Host.ISE.ISEFile class. This topic lists its member methods and member properties. The **$psISE.CurrentFile** and the files in the Files collection in a PowerShell tab are all instances of the Microsoft.PowerShell.Host.ISE.ISEFile class. + +An **ISEFile** object represents a file in Windows PowerShell® Integrated Scripting Environment (ISE). It is an instance of the Microsoft.PowerShell.Host.ISE.ISEFile class. This topic lists its member methods and member properties. The **$psISE.CurrentFile** and the files in the Files collection in a PowerShell tab are all instances of the Microsoft.PowerShell.Host.ISE.ISEFile class. ## Methods ### Save\( \[saveEncoding\] \) - Supported in Windows PowerShell ISE 2.0 and later. - Saves the file to disk. +Supported in Windows PowerShell ISE 2.0 and later. - **\[saveEncoding\]** - optional [System.Text.Encoding](http://msdn.microsoft.com/library/system.text.encoding.aspx) - An optional character encoding parameter to be used for the saved file. The default value is **UTF8**. +Saves the file to disk. - **Exceptions** - - **System.IO.IOException**: The file could not be saved. +**\[saveEncoding\]** - optional [System.Text.Encoding](http://msdn.microsoft.com/library/system.text.encoding.aspx) +An optional character encoding parameter to be used for the saved file. The default value is **UTF8**. -``` +**Exceptions** + +- **System.IO.IOException**: The file could not be saved. + +```powershell # Save the file using the default encoding (UTF8) -$psIse.CurrentFile.Save() +$psISE.CurrentFile.Save() # Save the file as ASCII. -$psIse.CurrentFile.Save( [System.Text.Encoding]::ASCII ) +$psISE.CurrentFile.Save([System.Text.Encoding]::ASCII) # Gets the current encoding. -$myfile=$psIse.CurrentFile +$myfile = $psISE.CurrentFile $myfile.Encoding - ``` ### SaveAs\(filename, \[saveEncoding\]\) - Supported in Windows PowerShell ISE 2.0 and later. - Saves the file with the specified file name and encoding. +Supported in Windows PowerShell ISE 2.0 and later. - **filename** - String - The name to be used to save the file. +Saves the file with the specified file name and encoding. - **\[saveEncoding\]** - optional [System.Text.Encoding](http://msdn.microsoft.com/library/system.text.encoding.aspx) - An optional character encoding parameter to be used for the saved file. The default value is **UTF8**. +**filename** - String +The name to be used to save the file. - **Exceptions** - - **System.ArgumentNullException**: The **filename** parameter is null. +**\[saveEncoding\]** - optional [System.Text.Encoding](http://msdn.microsoft.com/library/system.text.encoding.aspx) +An optional character encoding parameter to be used for the saved file. The default value is **UTF8**. -- **System.ArgumentException**: The **filename** parameter is empty. +**Exceptions** +- **System.ArgumentNullException**: The **filename** parameter is null. +- **System.ArgumentException**: The **filename** parameter is empty. - **System.IO.IOException**: The file could not be saved. -``` -# Save the file with a full path and name. +```powershell +# Save the file with a full path and name. $fullpath = "c:\temp\newname.txt" -$psIse.CurrentFile.SaveAs($fullPath) -# Save the file with a full path and name and explicitly as UTF8. -$psIse.CurrentFile.SaveAs( $fullPath, [System.Text.Encoding]::UTF8 ) - +$psISE.CurrentFile.SaveAs($fullPath) +# Save the file with a full path and name and explicitly as UTF8. +$psISE.CurrentFile.SaveAs($fullPath, [System.Text.Encoding]::UTF8) ``` ## Properties ### DisplayName - Supported in Windows PowerShell ISE 2.0 and later. - The read-only property that gets the string that contains the display name of this file. The name is shown on the **File** tab at the top of the editor. The presence of an asterisk \(\*\) at the end of the name indicates that the file has changes that have not been saved. +Supported in Windows PowerShell ISE 2.0 and later. -``` -# Shows the display name of the file. -$psIse.CurrentFile.DisplayName +The read-only property that gets the string that contains the display name of this file. The name is shown on the **File** tab at the top of the editor. The presence of an asterisk \(\*\) at the end of the name indicates that the file has changes that have not been saved. +```powershell +# Shows the display name of the file. +$psISE.CurrentFile.DisplayName ``` ### Editor - Supported in Windows PowerShell ISE 2.0 and later. - The read-only property that gets the [editor object](The-ISEEditor-Object.md) that is used for the specified file. +Supported in Windows PowerShell ISE 2.0 and later. -``` -# Gets the editor and the text. -$psIse.CurrentFile.Editor.Text +The read-only property that gets the [editor object](The-ISEEditor-Object.md) that is used for the specified file. +```powershell +# Gets the editor and the text. +$psISE.CurrentFile.Editor.Text ``` ### Encoding - Supported in Windows PowerShell ISE 2.0 and later. - The read-only property that gets the original file encoding. This is a **System.Text.Encoding** object. +Supported in Windows PowerShell ISE 2.0 and later. -``` -# Shows the encoding for the file. -$psIse.CurrentFile.Encoding +The read-only property that gets the original file encoding. This is a **System.Text.Encoding** object. +```powershell +# Shows the encoding for the file. +$psISE.CurrentFile.Encoding ``` ### FullPath - Supported in Windows PowerShell ISE 2.0 and later. - The read-only property that gets the string that specifies the full path of the opened file. +Supported in Windows PowerShell ISE 2.0 and later. -``` -# Shows the full path for the file. -$psIse.CurrentFile.FullPath +The read-only property that gets the string that specifies the full path of the opened file. +```powershell +# Shows the full path for the file. +$psISE.CurrentFile.FullPath ``` ### IsSaved - Supported in Windows PowerShell ISE 2.0 and later. - The read-only Boolean property that returns **$true** if the file has been saved after it was last modified. +Supported in Windows PowerShell ISE 2.0 and later. -``` +The read-only Boolean property that returns **$true** if the file has been saved after it was last modified. + +```powershell # Determines whether the file has been saved since it was last modified. -$myfile=$psIse.CurrentFile +$myfile = $psISE.CurrentFile $myfile.IsSaved - ``` ### IsUntitled - Supported in Windows PowerShell ISE 2.0 and later. - The read-only property that returns **$true** if the file has never been given a title. +Supported in Windows PowerShell ISE 2.0 and later. -``` +The read-only property that returns **$true** if the file has never been given a title. + +```powershell # Determines whether the file has never been given a title. $psISE.CurrentFile.IsUntitled $psISE.CurrentFile.SaveAs("temp.txt") $psISE.CurrentFile.IsUntitled - ``` ## See Also -- [The ISEFileCollectionObject](The-ISEFileCollection-Object.md) -- [The Windows PowerShell ISE Scripting Object Model](The-Windows-PowerShell-ISE-Scripting-Object-Model.md) -- [Windows PowerShell ISE Object Model Reference](Windows-PowerShell-ISE-Object-Model-Reference.md) -- [The ISE Object Model Hierarchy](The-ISE-Object-Model-Hierarchy.md) + +- [The ISEFileCollectionObject](The-ISEFileCollection-Object.md) +- [Purpose of the Windows PowerShell ISE Scripting Object Model](Purpose-of-the-Windows-PowerShell-ISE-Scripting-Object-Model.md) +- [The ISE Object Model Hierarchy](The-ISE-Object-Model-Hierarchy.md) \ No newline at end of file diff --git a/reference/docs-conceptual/core-powershell/ise/The-ISEFileCollection-Object.md b/reference/docs-conceptual/core-powershell/ise/The-ISEFileCollection-Object.md index 12a6604cbaa3..7acc34359cf9 100644 --- a/reference/docs-conceptual/core-powershell/ise/The-ISEFileCollection-Object.md +++ b/reference/docs-conceptual/core-powershell/ise/The-ISEFileCollection-Object.md @@ -4,41 +4,42 @@ keywords: powershell,cmdlet title: The ISEFileCollection Object ms.assetid: 0f86a427-ea38-4bce-85f8-06c98d30d508 --- - # The ISEFileCollection Object - The **ISEFileCollection** object is a collection of **ISEFile** objects. An example is the $psISE.CurrentPowerShellTab.Files collection. + +The **ISEFileCollection** object is a collection of **ISEFile** objects. An example is the $psISE.CurrentPowerShellTab.Files collection. ## Methods ### Add\( \[fullPath\] \) - Supported in Windows PowerShell ISE 2.0 and later. - Creates and returns a new untitled file and adds it to the collection. The **IsUntitled** property of the newly created file is **$true**. +Supported in Windows PowerShell ISE 2.0 and later. - **\[fullPath\]** - Optional string - The fully specified path of the file. An exception is generated if you include the **fullPath** parameter and a relative path, or if you use a file name instead of the full path. +Creates and returns a new untitled file and adds it to the collection. The **IsUntitled** property of the newly created file is **$true**. -``` +**\[fullPath\]** - Optional string +The fully specified path of the file. An exception is generated if you include the **fullPath** parameter and a relative path, or if you use a file name instead of the full path. + +```powershell # Adds a new untitled file to the collection of files in the current PowerShell tab. $newFile = $psISE.CurrentPowerShellTab.Files.Add() # Adds a file specified by its full path to the collection of files in the current PowerShell tab. $psISE.CurrentPowerShellTab.Files.Add("$pshome\Examples\profile.ps1") - ``` ### Remove\( File, \[Force\] \) - Supported in Windows PowerShell ISE 2.0 and later. - Removes a specified file from the current PowerShell tab. +Supported in Windows PowerShell ISE 2.0 and later. - **File** - String - The ISEFile file that you want to remove from the collection. If the file has not been saved, this method throws an exception. Use the **Force** switch parameter to force the removal of an unsaved file. +Removes a specified file from the current PowerShell tab. - **\[Force\]** - optional Boolean - If set to **$true**, grants permission to remove the file even if it has not been saved after last use. The default is **$false**. +**File** - String +The ISEFile file that you want to remove from the collection. If the file has not been saved, this method throws an exception. Use the **Force** switch parameter to force the removal of an unsaved file. -``` +**\[Force\]** - optional Boolean +If set to **$true**, grants permission to remove the file even if it has not been saved after last use. The default is **$false**. + +```powershell # Removes the first opened file from the file collection associated with the current PowerShell tab. # If the file has not yet been saved, then an exception is generated. $firstfile = $psISE.CurrentPowerShellTab.Files[0] @@ -50,23 +51,22 @@ $psISE.CurrentPowerShellTab.Files.Remove($firstfile, $true) ``` ### SetSelectedFile\( selectedFile \) - Supported in Windows PowerShell ISE 2.0 and later. - Selects the file that is specified by the **selectedFile** parameter. +Supported in Windows PowerShell ISE 2.0 and later. - **selectedFile** - Microsoft.PowerShell.Host.ISE.ISEFile - The ISEFile file that you want to select. +Selects the file that is specified by the **selectedFile** parameter. -``` +**selectedFile** - Microsoft.PowerShell.Host.ISE.ISEFile +The ISEFile file that you want to select. +```powershell # Selects the specified file. $firstfile = $psISE.CurrentPowerShellTab.Files[0] $psISE.CurrentPowerShellTab.Files.SetSelectedFile($firstfile) - ``` ## See Also -- [The ISEFile Object](The-ISEFile-Object.md) -- [The Windows PowerShell ISE Scripting Object Model](The-Windows-PowerShell-ISE-Scripting-Object-Model.md) -- [Windows PowerShell ISE Object Model Reference](Windows-PowerShell-ISE-Object-Model-Reference.md) -- [The ISE Object Model Hierarchy](The-ISE-Object-Model-Hierarchy.md) + +- [The ISEFile Object](The-ISEFile-Object.md) +- [Purpose of the Windows PowerShell ISE Scripting Object Model](Purpose-of-the-Windows-PowerShell-ISE-Scripting-Object-Model.md) +- [The ISE Object Model Hierarchy](The-ISE-Object-Model-Hierarchy.md) \ No newline at end of file diff --git a/reference/docs-conceptual/core-powershell/ise/The-ISEMenuItem-Object.md b/reference/docs-conceptual/core-powershell/ise/The-ISEMenuItem-Object.md index 2c109843faa8..7b0948cfa73d 100644 --- a/reference/docs-conceptual/core-powershell/ise/The-ISEMenuItem-Object.md +++ b/reference/docs-conceptual/core-powershell/ise/The-ISEMenuItem-Object.md @@ -4,84 +4,86 @@ keywords: powershell,cmdlet title: The ISEMenuItem Object ms.assetid: a16660bd-0aee-46fd-ac17-3f022165d089 --- - # The ISEMenuItem Object - An **ISEMenuItem** object is an instance of the Microsoft.PowerShell.Host.ISE.ISEMenuItem class. All menu objects on the **Add-ons** menu are instances of the **Microsoft.PowerShell.Host.ISE.ISEMenuItem** class. + +An **ISEMenuItem** object is an instance of the Microsoft.PowerShell.Host.ISE.ISEMenuItem class. All menu objects on the **Add-ons** menu are instances of the **Microsoft.PowerShell.Host.ISE.ISEMenuItem** class. ## Properties ### DisplayName - Supported in Windows PowerShell ISE 2.0 and later. - The read-only property that gets the display name of the menu item. +Supported in Windows PowerShell ISE 2.0 and later. -``` +The read-only property that gets the display name of the menu item. + +```powershell # Get the display name of the Add-ons menu item $psISE.CurrentPowerShellTab.AddOnsMenu.SubMenus.Clear() -$psISE.CurrentPowerShellTab.AddOnsMenu.SubMenus.Add("_Process",{get-process},"Alt+P") +$psISE.CurrentPowerShellTab.AddOnsMenu.SubMenus.Add('_Process', {Get-Process}, 'Alt+P') $psISE.CurrentPowerShellTab.AddOnsMenu.DisplayName - ``` ### Action - Supported in Windows PowerShell ISE 2.0 and later. - The read-only property that gets the block of script. It invokes the action when you click the menu item. +Supported in Windows PowerShell ISE 2.0 and later. -``` +The read-only property that gets the block of script. It invokes the action when you click the menu item. + +```powershell # Get the action associated with the first submenu item. $psISE.CurrentPowerShellTab.AddOnsMenu.SubMenus.Clear() -$psISE.CurrentPowerShellTab.AddOnsMenu.SubMenus.Add("_Process",{get-process},"Alt+P") +$psISE.CurrentPowerShellTab.AddOnsMenu.SubMenus.Add('_Process', {Get-Process}, 'Alt+P') $psISE.CurrentPowerShellTab.AddOnsMenu.Submenus[0].Action -# Invoke the script associated with the first submenu item +# Invoke the script associated with the first submenu item $psISE.CurrentPowerShellTab.AddOnsMenu.Submenus[0].Action.Invoke() ``` ### Shortcut - Supported in Windows PowerShell ISE 2.0 and later. - The read-only property that gets the Windows input keyboard shortcut for the menu item. +Supported in Windows PowerShell ISE 2.0 and later. -``` +The read-only property that gets the Windows input keyboard shortcut for the menu item. + +```powershell # Get the shortcut for the first submenu item. $psISE.CurrentPowerShellTab.AddOnsMenu.SubMenus.Clear() -$psISE.CurrentPowerShellTab.AddOnsMenu.SubMenus.Add("_Process",{get-process},"Alt+P") +$psISE.CurrentPowerShellTab.AddOnsMenu.SubMenus.Add('_Process', {Get-Process}, 'Alt+P') $psISE.CurrentPowerShellTab.AddOnsMenu.Submenus[0].Shortcut ``` ### Submenus - Supported in Windows PowerShell ISE 2.0 and later. - The read-only property that gets the [list of submenus](The-ISEMenuItemCollection-Object.md) of the menu item. +Supported in Windows PowerShell ISE 2.0 and later. -``` +The read-only property that gets the [list of submenus](The-ISEMenuItemCollection-Object.md) of the menu item. + +```powershell # List the submenus of the Add-ons menu $psISE.CurrentPowerShellTab.AddOnsMenu.SubMenus.Clear() -$psISE.CurrentPowerShellTab.AddOnsMenu.SubMenus.Add("_Process",{get-process},"Alt+P") +$psISE.CurrentPowerShellTab.AddOnsMenu.SubMenus.Add('_Process', {Get-Process}, 'Alt+P') $psISE.CurrentPowerShellTab.AddOnsMenu.Submenus ``` ## Scripting example - To better understand the use of the Add-ons menu and its scriptable properties, read through the following scripting example. -``` +To better understand the use of the Add-ons menu and its scriptable properties, read through the following scripting example. +```powershell # This is a scripting example that shows the use of the Add-ons menu. # Clear the Add-ons menu if any entries currently exist $psISE.CurrentPowerShellTab.AddOnsMenu.SubMenus.Clear() # Add an Add-ons menu item with an shortcut and fast access key. # Note the use of “_” as opposed to the “&” for mapping to the fast access key letter for the menu item. -$menuAdded = $psISE.CurrentPowerShellTab.AddOnsMenu.SubMenus.Add("_Process",{get-process},"Alt+P") -# Add a nested menu - a parent and a child submenu item. -$parentAdded = $psISE.CurrentPowerShellTab.AddOnsMenu.SubMenus.Add("Parent",$null,$null) -$parentAdded.SubMenus.Add("_Dir",{dir},"Alt+D") - +$menuAdded = $psISE.CurrentPowerShellTab.AddOnsMenu.SubMenus.Add('_Process', {Get-Process}, 'Alt+P') +# Add a nested menu - a parent and a child submenu item. +$parentAdded = $psISE.CurrentPowerShellTab.AddOnsMenu.SubMenus.Add('Parent', $null, $null) +$parentAdded.SubMenus.Add('_Dir', {dir}, 'Alt+D') ``` ## See Also -- [The ISEMenuItemCollection Object](The-ISEMenuItemCollection-Object.md) -- [The Windows PowerShell ISE Scripting Object Model](The-Windows-PowerShell-ISE-Scripting-Object-Model.md) -- [Windows PowerShell ISE Object Model Reference](Windows-PowerShell-ISE-Object-Model-Reference.md) -- [The ISE Object Model Hierarchy](The-ISE-Object-Model-Hierarchy.md) + +- [The ISEMenuItemCollection Object](The-ISEMenuItemCollection-Object.md) +- [Purpose of the Windows PowerShell ISE Scripting Object Model](Purpose-of-the-Windows-PowerShell-ISE-Scripting-Object-Model.md) +- [The ISE Object Model Hierarchy](The-ISE-Object-Model-Hierarchy.md) \ No newline at end of file diff --git a/reference/docs-conceptual/core-powershell/ise/The-ISEMenuItemCollection-Object.md b/reference/docs-conceptual/core-powershell/ise/The-ISEMenuItemCollection-Object.md index 54bb10058793..adb3b4dd6275 100644 --- a/reference/docs-conceptual/core-powershell/ise/The-ISEMenuItemCollection-Object.md +++ b/reference/docs-conceptual/core-powershell/ise/The-ISEMenuItemCollection-Object.md @@ -4,50 +4,49 @@ keywords: powershell,cmdlet title: The ISEMenuItemCollection Object ms.assetid: 0c0f5484-3320-408e-8534-5bd1c8e48512 --- - # The ISEMenuItemCollection Object - An **ISEMenuItemCollection** object is a collection of **ISEMenuItem** objects. It is an instance of the Microsoft.PowerShell.Host.ISE.ISEMenuItemCollection class. An example is the **$psISE.CurrentPowerShellTab.AddOnsMenu.Submenus** object that is used to customize the **Add-On** menu in Windows PowerShell® Integrated Scripting Environment (ISE). + +An **ISEMenuItemCollection** object is a collection of **ISEMenuItem** objects. It is an instance of the Microsoft.PowerShell.Host.ISE.ISEMenuItemCollection class. An example is the **$psISE.CurrentPowerShellTab.AddOnsMenu.Submenus** object that is used to customize the **Add-On** menu in Windows PowerShell® Integrated Scripting Environment (ISE). ## Method ### Add\(string DisplayName, System.Management.Automation.ScriptBlock Action, System.Windows.Input.KeyGesture Shortcut \) - Supported in Windows PowerShell ISE 2.0 and later. - Adds a menu item to the collection. +Supported in Windows PowerShell ISE 2.0 and later. - **DisplayName** - The display name of the menu to be added. +Adds a menu item to the collection. - **Action** - The **System.Management.Automation.ScriptBlock** object that specifies the action that is associated with this menu item. +**DisplayName** +The display name of the menu to be added. - **Shortcut** - The keyboard shortcut for the action. +**Action** +The **System.Management.Automation.ScriptBlock** object that specifies the action that is associated with this menu item. - **Returns** - The ISEMenuItem object that was just added. +**Shortcut** +The keyboard shortcut for the action. -``` +**Returns** +The ISEMenuItem object that was just added. + +```powershell # Create an Add-ons menu with an fast access key and a shortcut. # Note the use of "_" as opposed to the "&" for mapping to the fast access key letter for the menu item. -$menuAdded = $psISE.CurrentPowerShellTab.AddOnsMenu.SubMenus.Add("_Process",{get-process},"Alt+P") +$menuAdded = $psISE.CurrentPowerShellTab.AddOnsMenu.SubMenus.Add('_Process', {Get-Process}, 'Alt+P') ``` ### Clear\(\) - Supported in Windows PowerShell ISE 2.0 and later. - Removes all submenus from the menu item. +Supported in Windows PowerShell ISE 2.0 and later. -``` +Removes all submenus from the menu item. + +```powershell # Remove all custom submenu items from the AddOns menu $psISE.CurrentPowerShellTab.AddOnsMenu.Submenus.Clear() - ``` ## See Also -- [The ISEMenuItem Object](The-ISEMenuItem-Object.md) -- [The Windows PowerShell ISE Scripting Object Model](The-Windows-PowerShell-ISE-Scripting-Object-Model.md) -- [Windows PowerShell ISE Object Model Reference](Windows-PowerShell-ISE-Object-Model-Reference.md) -- [The ISE Object Model Hierarchy](The-ISE-Object-Model-Hierarchy.md) - +- [The ISEMenuItem Object](The-ISEMenuItem-Object.md) +- [Purpose of the Windows PowerShell ISE Scripting Object Model](Purpose-of-the-Windows-PowerShell-ISE-Scripting-Object-Model.md) +- [The ISE Object Model Hierarchy](The-ISE-Object-Model-Hierarchy.md) \ No newline at end of file diff --git a/reference/docs-conceptual/core-powershell/ise/The-ISEOptions-Object.md b/reference/docs-conceptual/core-powershell/ise/The-ISEOptions-Object.md index 6bdeacbc4e68..b3a4cc67765b 100644 --- a/reference/docs-conceptual/core-powershell/ise/The-ISEOptions-Object.md +++ b/reference/docs-conceptual/core-powershell/ise/The-ISEOptions-Object.md @@ -4,161 +4,172 @@ keywords: powershell,cmdlet title: The ISEOptions Object ms.assetid: 75e2a76f-f3d1-490b-ad5d-e3829946aabb --- - # The ISEOptions Object - The **ISEOptions** object represents various settings for Windows PowerShell ISE. It is an instance of the **Microsoft.PowerShell.Host.ISE.ISEOptions** class. - The **ISEOptions** object provides the following methods and properties. +The **ISEOptions** object represents various settings for Windows PowerShell ISE. It is an instance of the **Microsoft.PowerShell.Host.ISE.ISEOptions** class. + +The **ISEOptions** object provides the following methods and properties. ## Methods ### RestoreDefaultConsoleTokenColors\(\) - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - Restores the default values of the token colors in the Console pane. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. -``` +Restores the default values of the token colors in the Console pane. + +```powershell # Changes the color of the commands in the Console pane to red and then restores it to its default value. -$psISE.Options.ConsoleTokenColors["Command"] = "red" +$psISE.Options.ConsoleTokenColors["Command"] = 'red' $psISE.Options.RestoreDefaultConsoleTokenColors() ``` ### RestoreDefaults\(\) - Supported in Windows PowerShell ISE 2.0 and later. - Restores the default values of all options settings in the Console pane. It also resets the behavior of various warning messages that provide the standard check box to prevent the message from being shown again. +Supported in Windows PowerShell ISE 2.0 and later. -``` +Restores the default values of all options settings in the Console pane. It also resets the behavior of various warning messages that provide the standard check box to prevent the message from being shown again. + +```powershell # Changes the background color in the Console pane and then restores it to its default value. -$psISE.Options.ConsolePaneBackgroundColor = "orange" +$psISE.Options.ConsolePaneBackgroundColor = 'orange' $psISE.Options.RestoreDefaults() ``` ### RestoreDefaultTokenColors\(\) - Supported in Windows PowerShell ISE 2.0 and later. - Restores the default values of the token colors in the Script pane. +Supported in Windows PowerShell ISE 2.0 and later. -``` +Restores the default values of the token colors in the Script pane. + +```powershell # Changes the color of the comments in the Script pane to red and then restores it to its default value. -$psISE.Options.TokenColors["Comment"]="red" +$psISE.Options.TokenColors["Comment"] = 'red' $psISE.Options.RestoreDefaultTokenColors() ``` ### RestoreDefaultXmlTokenColors\(\) - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - Restores the default values of the token colors for XML elements that are displayed in Windows PowerShell ISE. Also see [XmlTokenColors](#xmltokencolors). +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. -``` +Restores the default values of the token colors for XML elements that are displayed in Windows PowerShell ISE. Also see [XmlTokenColors](#xmltokencolors). + +```powershell # Changes the color of the comments in XML data to red and then restores it to its default value. -$psISE.Options.XmlTokenColors["Comment"]="red" +$psISE.Options.XmlTokenColors["Comment"] = 'red' $psISE.Options.RestoreDefaultXmlTokenColors() ``` ## Properties ### AutoSaveMinuteInterval - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - Specifies the number of minutes between automatic save operations of your files by Windows PowerShell ISE. The default value is 2 minutes. The value is an integer. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. -``` +Specifies the number of minutes between automatic save operations of your files by Windows PowerShell ISE. The default value is 2 minutes. The value is an integer. + +```powershell # Changes the number of minutes between automatic save operations to every 3 minutes. $psISE.Options.AutoSaveMinuteInterval = 3 ``` ### CommandPaneBackgroundColor - This feature is present in Windows PowerShell ISE 2.0, but was removed or renamed in later versions of the ISE. For later versions, see [ConsolePaneBackgroundColor](#consolepanebackgroundcolor). - Specifies the background color for the Command pane. It is an instance of the **System.Windows.Media.Color** class. +This feature is present in Windows PowerShell ISE 2.0, but was removed or renamed in later versions of the ISE. For later versions, see [ConsolePaneBackgroundColor](#consolepanebackgroundcolor). -``` +Specifies the background color for the Command pane. It is an instance of the **System.Windows.Media.Color** class. + +```powershell # Changes the background color of the Command pane to orange. -$psISE.Options.CommandPaneBackgroundColor = "orange" +$psISE.Options.CommandPaneBackgroundColor = 'orange' ``` ### CommandPaneUp - This feature is present in Windows PowerShell ISE 2.0, but was removed or renamed in later versions of the ISE. - Specifies whether the Command pane is located above the Output pane. +This feature is present in Windows PowerShell ISE 2.0, but was removed or renamed in later versions of the ISE. -``` +Specifies whether the Command pane is located above the Output pane. + +```powershell # Moves the Command pane to the top of the screen. $psISE.Options.CommandPaneUp = $true - ``` ### ConsolePaneBackgroundColor - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - Specifies the background color for the Console pane. It is an instance of the **System.Windows.Media.Color** class. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. -``` +Specifies the background color for the Console pane. It is an instance of the **System.Windows.Media.Color** class. + +```powershell # Changes the background color of the Console pane to red. -$psISE.Options.ConsolePaneBackgroundColor = "red" +$psISE.Options.ConsolePaneBackgroundColor = 'red' ``` ### ConsolePaneForegroundColor - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - Specifies the foreground color of the text in the Console pane. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. -``` -# Changes the foreground color of the text in the Console pane to yellow. -$psISE.Options.ConsolePaneForegroundColor = "yellow" +Specifies the foreground color of the text in the Console pane. +```powershell +# Changes the foreground color of the text in the Console pane to yellow. +$psISE.Options.ConsolePaneForegroundColor = 'yellow' ``` ### ConsolePaneTextBackgroundColor - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - Specifies the background color of the text in the Console pane. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. -``` +Specifies the background color of the text in the Console pane. + +```powershell # Changes the background color of the Console pane text to pink. -$psISE.Options.ConsolePaneTextBackgroundColor = "pink" +$psISE.Options.ConsolePaneTextBackgroundColor = 'pink' ``` ### ConsoleTokenColors - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - Specifies the colors of the IntelliSense tokens in the Windows PowerShell ISE Console pane. This property is a dictionary object that contains name/value pairs of token types and colors for the Console pane. To change the colors of the IntelliSense tokens in the Script pane, see [TokenColors](#tokencolors). To reset the colors to the default values, see [RestoreDefaultConsoleTokenColors](#restoredefaultconsoletokencolors). Token colors can be set for the following: Attribute, Command, CommandArgument, CommandParameter, Comment, GroupEnd, GroupStart, Keyword, LineContinuation, LoopLabel, Member, NewLine, Number, Operator, Position, StatementSeparator, String, Type, Unknown, Variable. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. -``` +Specifies the colors of the IntelliSense tokens in the Windows PowerShell ISE Console pane. This property is a dictionary object that contains name/value pairs of token types and colors for the Console pane. To change the colors of the IntelliSense tokens in the Script pane, see [TokenColors](#tokencolors). To reset the colors to the default values, see [RestoreDefaultConsoleTokenColors](#restoredefaultconsoletokencolors). Token colors can be set for the following: Attribute, Command, CommandArgument, CommandParameter, Comment, GroupEnd, GroupStart, Keyword, LineContinuation, LoopLabel, Member, NewLine, Number, Operator, Position, StatementSeparator, String, Type, Unknown, Variable. + +```powershell # Sets the color of commands to green. -$psISE.Options.ConsoleTokenColors["Command"] = "green" +$psISE.Options.ConsoleTokenColors["Command"] = 'green' # Sets the color of keywords to magenta. -$psISE.Options.ConsoleTokenColors["Keyword"] = "magenta" - +$psISE.Options.ConsoleTokenColors["Keyword"] = 'magenta' ``` ### DebugBackgroundColor - Supported in Windows PowerShell ISE 2.0 and later. - Specifies the background color for the debug text that appears in the Console pane. It is an instance of the **System.Windows.Media.Color** class. +Supported in Windows PowerShell ISE 2.0 and later. -``` +Specifies the background color for the debug text that appears in the Console pane. It is an instance of the **System.Windows.Media.Color** class. + +```powershell # Changes the background color for the debug text that appears in the Console pane to blue. -$psISE.Options.DebugBackgroundColor ='#0000FF' +$psISE.Options.DebugBackgroundColor = '#0000FF' ``` ### DebugForegroundColor - Supported in Windows PowerShell ISE 2.0 and later. - Specifies the foreground color for the debug text that appears in the Console pane. It is an instance of the **System.Windows.Media.Color** class. +Supported in Windows PowerShell ISE 2.0 and later. -``` +Specifies the foreground color for the debug text that appears in the Console pane. It is an instance of the **System.Windows.Media.Color** class. + +```powershell # Changes the foreground color for the debug text that appears in the Console pane to yellow. -$psISE.Options.DebugForegroundColor ="yellow" +$psISE.Options.DebugForegroundColor = 'yellow' ``` ### DefaultOptions - Supported in Windows PowerShell ISE 2.0 and later. - A collection of properties that specify the default values to be used when the Reset methods are used. +Supported in Windows PowerShell ISE 2.0 and later. -``` +A collection of properties that specify the default values to be used when the Reset methods are used. + +```powershell # Displays the name of the default options. This example is from ISE 4.0. $psISE.Options.DefaultOptions @@ -197,337 +208,352 @@ ShowIntellisenseInScriptPane : True UseEnterToSelectInConsolePaneIntellisense : True UseEnterToSelectInScriptPaneIntellisense : True IntellisenseTimeoutInSeconds : 3 - ``` ### ErrorBackgroundColor - Supported in Windows PowerShell ISE 2.0 and later. - Specifies the background color for error text that appears in the Console pane. It is an instance of the **System.Windows.Media.Color** class. +Supported in Windows PowerShell ISE 2.0 and later. -``` +Specifies the background color for error text that appears in the Console pane. It is an instance of the **System.Windows.Media.Color** class. + +```powershell # Changes the background color for the error text that appears in the Console pane to black. -$psISE.Options.ErrorBackgroundColor="black" +$psISE.Options.ErrorBackgroundColor = 'black' ``` ### ErrorForegroundColor - Supported in Windows PowerShell ISE 2.0 and later. - Specifies the foreground color for error text that appears in the Console pane. It is an instance of the **System.Windows.Media.Color** class. +Supported in Windows PowerShell ISE 2.0 and later. -``` +Specifies the foreground color for error text that appears in the Console pane. It is an instance of the **System.Windows.Media.Color** class. + +```powershell # Changes the foreground color for the error text that appears in the console pane to green. -$psISE.Options.ErrorForegroundColor ="green" +$psISE.Options.ErrorForegroundColor = 'green' ``` ### FontName - Supported in Windows PowerShell ISE 2.0 and later. - Specifies the font name currently in use in both the Script pane and the Console pane. +Supported in Windows PowerShell ISE 2.0 and later. -``` +Specifies the font name currently in use in both the Script pane and the Console pane. + +```powershell # Changes the font used in both panes. -$psISE.Options.FontName = "courier new" +$psISE.Options.FontName = 'Courier New' ``` ### FontSize - Supported in Windows PowerShell ISE 2.0 and later. - Specifies the font size as an integer. It is used in the Script pane, the Command pane, and the Output pane. The valid range of values is 8 through 32. +Supported in Windows PowerShell ISE 2.0 and later. -``` +Specifies the font size as an integer. It is used in the Script pane, the Command pane, and the Output pane. The valid range of values is 8 through 32. + +```powershell # Changes the font size in all panes. $psISE.Options.FontSize = 20 - ``` ### IntellisenseTimeoutInSeconds - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - Specifies the number of seconds that IntelliSense uses to try to resolve the currently typed text. After this number of seconds, IntelliSense times out and enables you to continue typing. The default value is 3 seconds. The value is an integer. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. -``` +Specifies the number of seconds that IntelliSense uses to try to resolve the currently typed text. After this number of seconds, IntelliSense times out and enables you to continue typing. The default value is 3 seconds. The value is an integer. + +```powershell # Changes the number of seconds for IntelliSense syntax recognition to 5. $psISE.Options.IntellisenseTimeoutInSeconds = 5 ``` ### MruCount - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - Specifies the number of recently opened files that Windows PowerShell ISE tracks and displays at the bottom of the **File Open** menu. The default value is 10. The value is an integer. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. -``` +Specifies the number of recently opened files that Windows PowerShell ISE tracks and displays at the bottom of the **File Open** menu. The default value is 10. The value is an integer. + +```powershell # Changes the number of recently used files that appear at the bottom of the File Open menu to 5. $psISE.Options.MruCount = 5 ``` ### OutputPaneBackgroundColor - This feature is present in Windows PowerShell ISE 2.0, but was removed or renamed in later versions of the ISE. For later versions, see [ConsolePaneBackgroundColor](#consolepanebackgroundcolor). - The read/write property that gets or sets the background color for the Output pane itself. It is an instance of the **System.Windows.Media.Color** class. +This feature is present in Windows PowerShell ISE 2.0, but was removed or renamed in later versions of the ISE. For later versions, see [ConsolePaneBackgroundColor](#consolepanebackgroundcolor). -``` -# Changes the background color of the Output pane to gold. -$psISE.Options.OutputPaneForegroundColor = "gold" +The read/write property that gets or sets the background color for the Output pane itself. It is an instance of the **System.Windows.Media.Color** class. +```powershell +# Changes the background color of the Output pane to gold. +$psISE.Options.OutputPaneForegroundColor = 'gold' ``` ### OutputPaneTextForegroundColor - This feature is present in Windows PowerShell ISE 2.0, but was removed or renamed in later versions of the ISE. For later versions, see [ConsolePaneForegroundColor](#consolepaneforegroundcolor). - The read/write property that changes the foreground color of the text in the Output pane in Windows PowerShell ISE 2.0. +This feature is present in Windows PowerShell ISE 2.0, but was removed or renamed in later versions of the ISE. For later versions, see [ConsolePaneForegroundColor](#consolepaneforegroundcolor). -``` -# Changes the foreground color of the text in the Output Pane to blue. -$psISE.Options.OutputPaneTextForegroundColor = "blue" +The read/write property that changes the foreground color of the text in the Output pane in Windows PowerShell ISE 2.0. +```powershell +# Changes the foreground color of the text in the Output Pane to blue. +$psISE.Options.OutputPaneTextForegroundColor = 'blue' ``` ### OutputPaneTextBackgroundColor - This feature is present in Windows PowerShell ISE 2.0, but was removed or renamed in later versions of the ISE. For later versions, see [ConsolePaneTextBackgroundColor](#consolepanetextbackgroundcolor). - The read/write property that changes the background color of the text in the Output pane. +This feature is present in Windows PowerShell ISE 2.0, but was removed or renamed in later versions of the ISE. For later versions, see [ConsolePaneTextBackgroundColor](#consolepanetextbackgroundcolor). -``` +The read/write property that changes the background color of the text in the Output pane. + +```powershell # Changes the background color of the Output pane text to pink. -$psISE.Options.OutputPaneTextBackgroundColor = "pink" +$psISE.Options.OutputPaneTextBackgroundColor = 'pink' ``` ### ScriptPaneBackgroundColor - Supported in Windows PowerShell ISE 2.0 and later. - The read/write property that gets or sets the background color for files. It is an instance of the **System.Windows.Media.Color** class. +Supported in Windows PowerShell ISE 2.0 and later. -``` +The read/write property that gets or sets the background color for files. It is an instance of the **System.Windows.Media.Color** class. +```powershell # Sets the color of the script pane background to yellow. -$psISE.Options.ScriptPaneBackgroundColor = 'yellow' - +$psISE.Options.ScriptPaneBackgroundColor = 'yellow' ``` ### ScriptPaneForegroundColor - Supported in Windows PowerShell ISE 2.0 and later. - The read/write property that gets or sets the foreground color for non-script files in the Script pane. +Supported in Windows PowerShell ISE 2.0 and later. + +The read/write property that gets or sets the foreground color for non-script files in the Script pane. To set the foreground color for script files, use the [TokenColors](#tokencolors). -``` +```powershell # Sets the foreground to color of non-script files in the script pane to green. -$psISE.Options.ScriptPaneBackgroundColor = "green" - +$psISE.Options.ScriptPaneBackgroundColor = 'green' ``` ### SelectedScriptPaneState - Supported in Windows PowerShell ISE 2.0 and later. - The read/write property that gets or sets the position of the Script pane on the display. The string can be either "Maximized", "Top", or "Right". +Supported in Windows PowerShell ISE 2.0 and later. -``` +The read/write property that gets or sets the position of the Script pane on the display. The string can be either 'Maximized', 'Top', or 'Right'. + +```powershell # Moves the Script Pane to the top. -$psISE.Options.SelectedScriptPaneState = "Top" +$psISE.Options.SelectedScriptPaneState = 'Top' # Moves the Script Pane to the right. -$psISE.Options.SelectedScriptPaneState = "Right" +$psISE.Options.SelectedScriptPaneState = 'Right' # Maximizes the Script Pane -$psISE.Options.SelectedScriptPaneState = "Maximized" - +$psISE.Options.SelectedScriptPaneState = 'Maximized' ``` ### ShowDefaultSnippets - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - Specifies whether the **CTRL+J** list of snippets includes the starter set that is included in Windows PowerShell. When set to **$false**, only user-defined snippets appear in the **CTRL+J** list. The default value is **$true**. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. -``` +Specifies whether the **CTRL+J** list of snippets includes the starter set that is included in Windows PowerShell. When set to **$false**, only user-defined snippets appear in the **CTRL+J** list. The default value is **$true**. + +```powershell # Hide the default snippets from the CTRL+J list. -$psISe.Options.ShowDefaultSnippets = $false +$psISE.Options.ShowDefaultSnippets = $false ``` ### ShowIntellisenseInConsolePane - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - Specifies whether IntelliSense offers syntax, parameter, and value suggestions in the Console pane. The default value is **$true**. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. -``` +Specifies whether IntelliSense offers syntax, parameter, and value suggestions in the Console pane. The default value is **$true**. + +```powershell # Turn off IntelliSense in the console pane. -$psISe.Options.ShowIntellisenseInConsolePane = $false +$psISE.Options.ShowIntellisenseInConsolePane = $false ``` ### ShowIntellisenseInScriptPane - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - Specifies whether IntelliSense offers syntax, parameter, and value suggestions in the Script pane. The default value is **$true**. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. -``` +Specifies whether IntelliSense offers syntax, parameter, and value suggestions in the Script pane. The default value is **$true**. + +```powershell # Turn off IntelliSense in the Script pane. -$psISe.Options.ShowIntellisenseInScriptPane = $false +$psISE.Options.ShowIntellisenseInScriptPane = $false ``` ### ShowLineNumbers - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - Specifies whether the Script pane displays line numbers in the left margin. The default value is **$true**. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. -``` +Specifies whether the Script pane displays line numbers in the left margin. The default value is **$true**. + +```powershell # Turn off line numbers in the Script pane. -$psISe.Options.ShowLineNumbers = $false +$psISE.Options.ShowLineNumbers = $false ``` ### ShowOutlining - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - Specifies whether the Script pane displays expandable and collapsible brackets next to sections of code in the left margin. When they are displayed, you can click the minus \(-\) icons next to a block of text to collapse it or click the plus \(+\) icon to expand a block of text. The default value is **$true**. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. -``` +Specifies whether the Script pane displays expandable and collapsible brackets next to sections of code in the left margin. When they are displayed, you can click the minus \(-\) icons next to a block of text to collapse it or click the plus \(+\) icon to expand a block of text. The default value is **$true**. + +```powershell # Turn off outlining in the Script pane. -$psISe.Options.ShowOutlining = $false +$psISE.Options.ShowOutlining = $false ``` ### ShowToolBar - Supported in Windows PowerShell ISE 2.0 and later. - Specifies whether the ISE toolbar appears at the top of the Windows PowerShell ISE window. The default value is **$true**. +Supported in Windows PowerShell ISE 2.0 and later. -``` +Specifies whether the ISE toolbar appears at the top of the Windows PowerShell ISE window. The default value is **$true**. + +```powershell # Show the toolbar. -$psISe.Options.ShowToolBar = $true +$psISE.Options.ShowToolBar = $true ``` ### ShowWarningBeforeSavingOnRun - Supported in Windows PowerShell ISE 2.0 and later. - Specifies whether a warning message appears when a script is saved automatically before it is run. The default value is **$true**. +Supported in Windows PowerShell ISE 2.0 and later. -``` +Specifies whether a warning message appears when a script is saved automatically before it is run. The default value is **$true**. + +```powershell # Enable the warning message when an attempt # is made to run a script without saving it first. -$psISE.Options.ShowWarningBeforeSavingOnRun=$true - +$psISE.Options.ShowWarningBeforeSavingOnRun = $true ``` ### ShowWarningForDuplicateFiles - Supported in Windows PowerShell ISE 2.0 and later. - Specifies whether a warning message appears when the same file is opened in different PowerShell tabs. If set to **$true**, to open the same file in multiple tabs displays this message: "A copy of this file is open in another Windows PowerShell tab. Changes made to this file will affect all open copies." The default value is **$true**. +Supported in Windows PowerShell ISE 2.0 and later. -``` +Specifies whether a warning message appears when the same file is opened in different PowerShell tabs. If set to **$true**, to open the same file in multiple tabs displays this message: "A copy of this file is open in another Windows PowerShell tab. Changes made to this file will affect all open copies." The default value is **$true**. + +```powershell # Enable the warning message when a file is # opened in multiple PowerShell tabs. $psISE.Options.ShowWarningForDuplicateFiles = $true - ``` ### TokenColors - Supported in Windows PowerShell ISE 2.0 and later. - Specifies the colors of the IntelliSense tokens in the Windows PowerShell ISE Script pane. This property is a dictionary object that contains name/value pairs of token types and colors for the Script pane. To change the colors of the IntelliSense tokens in the Console pane, see [ConsoleTokenColors](#consoletokencolors). To reset the colors to the default values, see [RestoreDefaultTokenColors](#restoredefaulttokencolors). Token colors can be set for the following: Attribute, Command, CommandArgument, CommandParameter, Comment, GroupEnd, GroupStart, Keyword, LineContinuation, LoopLabel, Member, NewLine, Number, Operator, Position, StatementSeparator, String, Type, Unknown, Variable. +Supported in Windows PowerShell ISE 2.0 and later. -``` +Specifies the colors of the IntelliSense tokens in the Windows PowerShell ISE Script pane. This property is a dictionary object that contains name/value pairs of token types and colors for the Script pane. To change the colors of the IntelliSense tokens in the Console pane, see [ConsoleTokenColors](#consoletokencolors). To reset the colors to the default values, see [RestoreDefaultTokenColors](#restoredefaulttokencolors). Token colors can be set for the following: Attribute, Command, CommandArgument, CommandParameter, Comment, GroupEnd, GroupStart, Keyword, LineContinuation, LoopLabel, Member, NewLine, Number, Operator, Position, StatementSeparator, String, Type, Unknown, Variable. + +```powershell # Sets the color of commands to green. $psISE.Options.TokenColors["Command"] = "green" # Sets the color of keywords to magenta. $psISE.Options.TokenColors["Keyword"] = "magenta" - ``` ### UseEnterToSelectInConsolePaneIntellisense - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - Specifies whether you can use the Enter key to select an IntelliSense provided option in the Console pane. The default value is **$true**. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. -``` -# Turn off using the ENTER key to select an IntelliSense provided option in the Console pane. -$psISE.Options.UseEnterToSelectInConsolePaneIntellisense=$false +Specifies whether you can use the Enter key to select an IntelliSense provided option in the Console pane. The default value is **$true**. +```powershell +# Turn off using the ENTER key to select an IntelliSense provided option in the Console pane. +$psISE.Options.UseEnterToSelectInConsolePaneIntellisense = $false ``` ### UseEnterToSelectInScriptPaneIntellisense - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - Specifies whether you can use the Enter key to select an IntelliSense-provided option in the Script pane. The default value is **$true**. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. -``` -# Turn on using the Enter key to select an IntelliSense provided option in the Console pane. -$psISE.Options.UseEnterToSelectInConsolePaneIntellisense=$true +Specifies whether you can use the Enter key to select an IntelliSense-provided option in the Script pane. The default value is **$true**. +```powershell +# Turn on using the Enter key to select an IntelliSense provided option in the Console pane. +$psISE.Options.UseEnterToSelectInConsolePaneIntellisense = $true ``` ### UseLocalHelp - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - Specifies whether the locally installed Help or the online TechNet Library Help appears when you press F1 with the cursor positioned in a keyword. If set to **$true**, then a pop-up window shows content from the locally installed Help. You can install the Help files by running the `Update-Help` command. If set to **$false**, then your browser opens to a page in the TechNet Library. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. -``` +Specifies whether the locally installed Help or the online TechNet Library Help appears when you press F1 with the cursor positioned in a keyword. If set to **$true**, then a pop-up window shows content from the locally installed Help. You can install the Help files by running the `Update-Help` command. If set to **$false**, then your browser opens to a page in the TechNet Library. + +```powershell # Sets the option for the online help to be displayed. -$psISE.Options.UseLocalHelp=$false +$psISE.Options.UseLocalHelp = $false # Sets the option for the local Help to be displayed. -$psISE.Options.UseLocalHelp=$true - +$psISE.Options.UseLocalHelp = $true ``` ### VerboseBackgroundColor - Supported in Windows PowerShell ISE 2.0 and later. - Specifies the background color for verbose text that appears in the Console pane. It is a **System.Windows.Media.Color** object. +Supported in Windows PowerShell ISE 2.0 and later. -``` +Specifies the background color for verbose text that appears in the Console pane. It is a **System.Windows.Media.Color** object. + +```powershell # Changes the background color for verbose text to blue. $psISE.Options.VerboseBackgroundColor ='#0000FF' ``` ### VerboseForegroundColor - Supported in Windows PowerShell ISE 2.0 and later. - Specifies the foreground color for verbose text that appears in the Console pane. It is a **System.Windows.Media.Color** object. +Supported in Windows PowerShell ISE 2.0 and later. -``` +Specifies the foreground color for verbose text that appears in the Console pane. It is a **System.Windows.Media.Color** object. + +```powershell # Changes the foreground color for verbose text to yellow. -$psISE.Options.VerboseForegroundColor ='yellow' +$psISE.Options.VerboseForegroundColor = 'yellow' ``` ### WarningBackgroundColor - Supported in Windows PowerShell ISE 2.0 and later. - Specifies the background color for warning text that appears in the Console pane. It is a **System.Windows.Media.Color** object. +Supported in Windows PowerShell ISE 2.0 and later. -``` +Specifies the background color for warning text that appears in the Console pane. It is a **System.Windows.Media.Color** object. + +```powershell # Changes the background color for warning text to blue. -$psISE.Options.WarningBackgroundColor ='#0000FF' +$psISE.Options.WarningBackgroundColor = '#0000FF' ``` ### WarningForegroundColor - Supported in Windows PowerShell ISE 2.0 and later. - Specifies the foreground color for warning text that appears in the Output pane. It is a **System.Windows.Media.Color** object. +Supported in Windows PowerShell ISE 2.0 and later. -``` +Specifies the foreground color for warning text that appears in the Output pane. It is a **System.Windows.Media.Color** object. + +```powershell # Changes the foreground color for warning text to yellow. -$psISE.Options.WarningForegroundColor ='yellow' +$psISE.Options.WarningForegroundColor = 'yellow' ``` ### XmlTokenColors - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - Specifies a dictionary object that contains name/value pairs of token types and colors for XML content that is displayed in Windows PowerShell ISE. Token colors can be set for the following: Attribute, Command, CommandArgument, CommandParameter, Comment, GroupEnd, GroupStart, Keyword, LineContinuation, LoopLabel, Member, NewLine, Number, Operator, Position, StatementSeparator, String, Type, Unknown, Variable. Also see [RestoreDefaultXmlTokenColors](#restoredefaultxmltokencolors). +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. -``` +Specifies a dictionary object that contains name/value pairs of token types and colors for XML content that is displayed in Windows PowerShell ISE. Token colors can be set for the following: Attribute, Command, CommandArgument, CommandParameter, Comment, GroupEnd, GroupStart, Keyword, LineContinuation, LoopLabel, Member, NewLine, Number, Operator, Position, StatementSeparator, String, Type, Unknown, Variable. Also see [RestoreDefaultXmlTokenColors](#restoredefaultxmltokencolors). + +```powershell # Sets the color of XML element names to green. -$psISE.Options.XmlTokenColors["ElementName"] = "green" +$psISE.Options.XmlTokenColors["ElementName"] = 'green' # Sets the color of XML comments to magenta. -$psISE.Options.XmlTokenColors["Comment"] = "magenta" - +$psISE.Options.XmlTokenColors["Comment"] = 'magenta' ``` ### Zoom - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - Specifies the relative size of text in both the Console and Script panes. The default value is 100. Smaller values cause the text in Windows PowerShell ISE to appear smaller while larger numbers cause text to appear larger. The value is an integer that ranges from 20 to 400. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. -``` +Specifies the relative size of text in both the Console and Script panes. The default value is 100. Smaller values cause the text in Windows PowerShell ISE to appear smaller while larger numbers cause text to appear larger. The value is an integer that ranges from 20 to 400. + +```powershell # Changes the text in the Windows PowerShell ISE to be double its normal size. $psISE.Options.Zoom = 200 ``` ## See Also -- [The Windows PowerShell ISE Scripting Object Model](The-Windows-PowerShell-ISE-Scripting-Object-Model.md) -- [Windows PowerShell ISE Object Model Reference](Windows-PowerShell-ISE-Object-Model-Reference.md) +- [Purpose of the Windows PowerShell ISE Scripting Object Model](Purpose-of-the-Windows-PowerShell-ISE-Scripting-Object-Model.md) +- [The ISE Object Model Hierarchy](The-ISE-Object-Model-Hierarchy.md) \ No newline at end of file diff --git a/reference/docs-conceptual/core-powershell/ise/The-ISESnippetCollection-Object.md b/reference/docs-conceptual/core-powershell/ise/The-ISESnippetCollection-Object.md index bd3585eaeb21..7b7b401c9485 100644 --- a/reference/docs-conceptual/core-powershell/ise/The-ISESnippetCollection-Object.md +++ b/reference/docs-conceptual/core-powershell/ise/The-ISESnippetCollection-Object.md @@ -4,30 +4,28 @@ keywords: powershell,cmdlet title: The ISESnippetCollection Object ms.assetid: ae974955-4282-4cbc-8c42-0fff1904ef32 --- - # The ISESnippetCollection Object - The **ISESnippetCollection** object is a collection of **ISESnippet** objects. The files collection that is associated with a **PowerShellTab** object is a member of this class. An example is the **$psISE.CurrentPowerShellTab.Files** collection. + +The **ISESnippetCollection** object is a collection of **ISESnippet** objects. The files collection that is associated with a **PowerShellTab** object is a member of this class. An example is the **$psISE.CurrentPowerShellTab.Files** collection. ## Methods ### Load\( FilePathName \) - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - Loads a .snippets.ps1xml file that contains user-defined snippets. The easiest way to create snippets is to use the New-IseSnippet cmdlet, which automatically stores them in your profile folder so that they are loaded every time that you start Windows PowerShell ISE. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - **FilePathName** - String - The path and file name to a .snippets.ps1xml file that contains snippet definitions. +Loads a .snippets.ps1xml file that contains user-defined snippets. The easiest way to create snippets is to use the New-IseSnippet cmdlet, which automatically stores them in your profile folder so that they are loaded every time that you start Windows PowerShell ISE. -``` -# Loads a custom snippet file into the current PowerShell tab. -$SnipFile = Join-Path ( Split-Path $profile) “Snippets\MySnips.snippets.ps1xml” $psISE.CurrentPowerShellTab.Snippets.Add($SnipPath) +**FilePathName** - String +The path and file name to a .snippets.ps1xml file that contains snippet definitions. +```powershell +# Loads a custom snippet file into the current PowerShell tab. +$SnipFile = Join-Path ( Split-Path $profile) 'Snippets\MySnips.snippets.ps1xml' $psISE.CurrentPowerShellTab.Snippets.Add($SnipPath) ``` ## See Also -- [The ISESnippetObject](The-ISESnippetObject.md) -- [The Windows PowerShell ISE Scripting Object Model](The-Windows-PowerShell-ISE-Scripting-Object-Model.md) -- [Windows PowerShell ISE Object Model Reference](Windows-PowerShell-ISE-Object-Model-Reference.md) -- [The ISE Object Model Hierarchy](The-ISE-Object-Model-Hierarchy.md) - +- [The ISESnippetObject](The-ISESnippetObject.md) +- [Purpose of the Windows PowerShell ISE Scripting Object Model](Purpose-of-the-Windows-PowerShell-ISE-Scripting-Object-Model.md) +- [The ISE Object Model Hierarchy](The-ISE-Object-Model-Hierarchy.md) \ No newline at end of file diff --git a/reference/docs-conceptual/core-powershell/ise/The-ISESnippetObject.md b/reference/docs-conceptual/core-powershell/ise/The-ISESnippetObject.md index bf4de9a3718e..98457bbd2e56 100644 --- a/reference/docs-conceptual/core-powershell/ise/The-ISESnippetObject.md +++ b/reference/docs-conceptual/core-powershell/ise/The-ISESnippetObject.md @@ -11,7 +11,7 @@ ms.assetid: 98bc8113-c3cd-4201-bdb9-9d9bdb7e266c ## Properties ### Author - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. + Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. The read-only property that gets the name of the author of the snippet. @@ -22,7 +22,7 @@ $psISE.CurrentPowerShellTab.Snippets.Item(0).Author ``` ### CodeFragment - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. + Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. The read-only property that gets the code fragment to be inserted into the editor. @@ -33,7 +33,7 @@ $psISE.CurrentPowerShellTab.Snippets.Item(0).CodeFragment ``` ### Shortcut - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. + Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. The read-only property that gets the Windows keyboard shortcut for the menu item. @@ -45,9 +45,6 @@ $psISE.CurrentPowerShellTab.AddOnsMenu.Submenus[0].Shortcut ``` ## See Also -- [The ISESnippetCollection Object](The-ISESnippetCollection-Object.md) -- [The Windows PowerShell ISE Scripting Object Model](The-Windows-PowerShell-ISE-Scripting-Object-Model.md) -- [Windows PowerShell ISE Object Model Reference](Windows-PowerShell-ISE-Object-Model-Reference.md) +- [The ISESnippetCollection Object](The-ISESnippetCollection-Object.md) +- [Purpose of the Windows PowerShell ISE Scripting Object Model](purpose-of-the-windows-powershell-ise-scripting-object-model.md) - [The ISE Object Model Hierarchy](The-ISE-Object-Model-Hierarchy.md) - - diff --git a/reference/docs-conceptual/core-powershell/ise/The-ObjectModelRoot-Object.md b/reference/docs-conceptual/core-powershell/ise/The-ObjectModelRoot-Object.md index 67a07d7444b4..ff58c348ae09 100644 --- a/reference/docs-conceptual/core-powershell/ise/The-ObjectModelRoot-Object.md +++ b/reference/docs-conceptual/core-powershell/ise/The-ObjectModelRoot-Object.md @@ -3,11 +3,10 @@ ms.date: 2017-08-25 keywords: powershell,cmdlet title: The ObjectModelRoot Object --- - # The ObjectModelRoot Object The **$psISE** object, which is the principal root object in -Windows PowerShell® Integrated Scripting Environment (ISE) +Windows PowerShell® Integrated Scripting Environment (ISE) is an instance of the Microsoft.PowerShell.Host.ISE.ObjectModelRoot class. This topic describes the properties of the **ObjectModelRoot** object. @@ -15,7 +14,7 @@ This topic describes the properties of the **ObjectModelRoot** object. ### CurrentFile -> Supported in Windows PowerShell ISE 2.0 and later. +> Supported in Windows PowerShell ISE 2.0 and later. The read-only property that gets the file, which is associated with this host object that currently has the focus. @@ -29,30 +28,29 @@ The read-only property that gets the PowerShell tab that has the focus. > Supported in Windows PowerShell ISE 2.0 and later. -The read-only property that gets the currently visible -Windows PowerShell ISE add-on tool that is located in +The read-only property that gets the currently visible +Windows PowerShell ISE add-on tool that is located in the horizontal tool pane at the bottom of the editor. ### CurrentVisibleVerticalTool -> Supported in Windows PowerShell ISE 2.0 and later. +> Supported in Windows PowerShell ISE 2.0 and later. The read-only property that gets the currently visible Windows PowerShell ISE add-on tool that is located in the vertical tool pane on the right side of the editor. ### Options -> Supported in Windows PowerShell ISE 2.0 and later. +> Supported in Windows PowerShell ISE 2.0 and later. The read-only property that gets the various options that can change settings in Windows PowerShell ISE. ### PowerShellTabs -> Supported in Windows PowerShell ISE 2.0 and later. +> Supported in Windows PowerShell ISE 2.0 and later. The read-only property that gets the collection of the PowerShell tabs, which are open in Windows PowerShell ISE. By default, this object contains one PowerShell tab. However, you can add more PowerShell tabs to this object by using scripts or by using the menus in Windows PowerShell ISE. ## See Also -- [The Windows PowerShell ISE Scripting Object Model](The-Windows-PowerShell-ISE-Scripting-Object-Model.md) -- [Windows PowerShell ISE Object Model Reference](Windows-PowerShell-ISE-Object-Model-Reference.md) -- [The ISE Object Model Hierarchy](The-ISE-Object-Model-Hierarchy.md) +- [Purpose of the Windows PowerShell ISE Scripting Object Model](Purpose-of-the-Windows-PowerShell-ISE-Scripting-Object-Model.md) +- [The ISE Object Model Hierarchy](The-ISE-Object-Model-Hierarchy.md) \ No newline at end of file diff --git a/reference/docs-conceptual/core-powershell/ise/The-PowerShellTab-Object.md b/reference/docs-conceptual/core-powershell/ise/The-PowerShellTab-Object.md index f4b6d386b491..3ba19c911dff 100644 --- a/reference/docs-conceptual/core-powershell/ise/The-PowerShellTab-Object.md +++ b/reference/docs-conceptual/core-powershell/ise/The-PowerShellTab-Object.md @@ -4,218 +4,226 @@ keywords: powershell,cmdlet title: The PowerShellTab Object ms.assetid: a9b58556-951b-4f48-b3ae-b351b7564360 --- - # The PowerShellTab Object - The **PowerShellTab** object represents a Windows PowerShell runtime environment. + +The **PowerShellTab** object represents a Windows PowerShell runtime environment. ## Methods ### Invoke\( Script \) - Supported in Windows PowerShell ISE 2.0 and later. - Runs the given script in the PowerShell tab. +Supported in Windows PowerShell ISE 2.0 and later. + +Runs the given script in the PowerShell tab. > [!NOTE] > This method only works on other PowerShell tabs, not the PowerShell tab from which it is run. It does not return any object or value. If the code modifies any variable, then those changes persist on the tab against which the command was invoked. - **Script** - System.Management.Automation.ScriptBlock or String - The script block to run. +**Script** - System.Management.Automation.ScriptBlock or String +The script block to run. -``` +```powershell # Manually create a second PowerShell tab before running this script. # Return to the first PowerShell tab and type the following command -$psise.PowerShellTabs[1].Invoke({dir}) +$psISE.PowerShellTabs[1].Invoke({dir}) ``` ### InvokeSynchronous\( Script, \[useNewScope\], millisecondsTimeout \) - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - Runs the given script in the PowerShell tab. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. + +Runs the given script in the PowerShell tab. > [!NOTE] > This method only works on other PowerShell tabs, not the PowerShell tab from which it is run. The script block is run and any value that is returned from the script is returned to the run environment from which you invoked the command. If the command takes longer to run than the **millesecondsTimeout** value specifies, then the command fails with an exception: "The operation has timed out." - **Script** - System.Management.Automation.ScriptBlock or String - The script block to run. +**Script** - System.Management.Automation.ScriptBlock or String +The script block to run. - **\[useNewScope\]** - Optional Boolean that defaults to **$true** - If set to **$true**, then a new scope is created within which to run the command. It does not modify the runtime environment of the PowerShell tab that is specified by the command. +**\[useNewScope\]** - Optional Boolean that defaults to **$true** +If set to **$true**, then a new scope is created within which to run the command. It does not modify the runtime environment of the PowerShell tab that is specified by the command. - **\[millisecondsTimeout\]** - Optional integer that defaults to **500**. - If the command does not finish within the specified time, then the command generates a **TimeoutException** with the message "The operation has timed out." +**\[millisecondsTimeout\]** - Optional integer that defaults to **500**. +If the command does not finish within the specified time, then the command generates a **TimeoutException** with the message "The operation has timed out." -``` -# create a new PowerShell tab and then switch back to the first -$PSise.PowerShellTabs.Add() -$psISE.PowerShellTabs.SetSelectedPowerShellTab($psISE.PowerShellTabs[0]) +```powershell +# Create a new PowerShell tab and then switch back to the first +$psISE.PowerShellTabs.Add() +$psISE.PowerShellTabs.SetSelectedPowerShellTab($psISE.PowerShellTabs[0]) # Invoke a simple command on the other tab, in its own scope -$psISE.PowerShellTabs[1].InvokeSynchronous('$x=1',$false) -# You can switch to the other tab and type 'œ$x' to see that the value is saved there. +$psISE.PowerShellTabs[1].InvokeSynchronous('$x=1', $false) +# You can switch to the other tab and type '$x' to see that the value is saved there. -# This example sets a value in the other tab (in a different scope) +# This example sets a value in the other tab (in a different scope) # and returns it through the pipeline to this tab to store in $a -$a=$psISE.PowerShellTabs[1].InvokeSynchronous('$z=3;$z') +$a = $psISE.PowerShellTabs[1].InvokeSynchronous('$z=3;$z') $a # This example runs a command that takes longer than the allowed timeout value # and measures how long it runs so that you can see the impact -measure-command {$psISE.PowerShellTabs[1].InvokeSynchronous("sleep 10",$false,5000)} - +Measure-Command {$psISE.PowerShellTabs[1].InvokeSynchronous('sleep 10', $false, 5000)} ``` ## Properties ### AddOnsMenu - Supported in Windows PowerShell ISE 2.0 and later. - The read-only property that gets the Add-ons menu for the PowerShell tab. +Supported in Windows PowerShell ISE 2.0 and later. -``` +The read-only property that gets the Add-ons menu for the PowerShell tab. + +```powershell # Clear the Add-ons menu if one exists. $psISE.CurrentPowerShellTab.AddOnsMenu.SubMenus.Clear() # Create an AddOns menu with an accessor. # Note the use of "_" as opposed to the "&" for mapping to the fast key letter for the menu item. -$menuAdded = $psISE.CurrentPowerShellTab.AddOnsMenu.SubMenus.Add("_Process",{get-process},"Alt+P") -# Add a nested menu. -$parentAdded = $psISE.CurrentPowerShellTab.AddOnsMenu.SubMenus.Add("Parent",$null,$null) -$parentAdded.SubMenus.Add("_Dir",{dir},"Alt+D") +$menuAdded = $psISE.CurrentPowerShellTab.AddOnsMenu.SubMenus.Add('_Process', {Get-Process}, 'Alt+P') +# Add a nested menu. +$parentAdded = $psISE.CurrentPowerShellTab.AddOnsMenu.SubMenus.Add('Parent', $null, $null) +$parentAdded.SubMenus.Add('_Dir', {dir}, 'Alt+D') # Show the Add-ons menu on the current PowerShell tab. $psISE.CurrentPowerShellTab.AddOnsMenu ``` ### CanInvoke - Supported in Windows PowerShell ISE 2.0 and later. - The read-only Boolean property that returns a **$true** value if a script can be invoked with the [Invoke( Script )](#invoke-script-) method. +Supported in Windows PowerShell ISE 2.0 and later. -``` +The read-only Boolean property that returns a **$true** value if a script can be invoked with the [Invoke( Script )](#invoke-script-) method. + +```powershell # CanInvoke will be false if the PowerShell # tab is running a script that takes a while, and you # check its properties from another PowerShell tab. It is -# always false if checked on the current PowerShell tab. +# always false if checked on the current PowerShell tab. # Manually create a second PowerShell tab before running this script. # Return to the first tab and type -$secondTab = $psise.PowerShellTabs[1] -$secondTab.CanInvoke +$secondTab = $psISE.PowerShellTabs[1] +$secondTab.CanInvoke $secondTab.Invoke({sleep 20}) $secondTab.CanInvoke - ``` ### Consolepane - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. In Windows PowerShell ISE 2.0 this was named **CommandPane**. - The read-only property that gets the Console pane [editor](../ise/The-ISEEditor-Object.md) object. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. In Windows PowerShell ISE 2.0 this was named **CommandPane**. -``` +The read-only property that gets the Console pane [editor](../ise/The-ISEEditor-Object.md) object. + +```powershell # Gets the Console Pane editor. $psISE.CurrentPowerShellTab.ConsolePane - ``` ### DisplayName - Supported in Windows PowerShell ISE 2.0 and later. - The read-write property that gets or sets the text that is displayed on the PowerShell tab. By default, tabs are named "PowerShell #", where the # represents a number. +Supported in Windows PowerShell ISE 2.0 and later. -``` -$newTab = $psise.PowerShellTabs.Add() -# Change the DisplayName of the new PowerShell tab. -$newTab.DisplayName="Brand New Tab" +The read-write property that gets or sets the text that is displayed on the PowerShell tab. By default, tabs are named "PowerShell #", where the # represents a number. + +```powershell +$newTab = $psISE.PowerShellTabs.Add() +# Change the DisplayName of the new PowerShell tab. +$newTab.DisplayName = 'Brand New Tab' ``` ### ExpandedScript - Supported in Windows PowerShell ISE 2.0 and later. - The read-write Boolean property that determines whether the Script pane is expanded or hidden. +Supported in Windows PowerShell ISE 2.0 and later. -``` -# Toggle the expanded script property to see its effect. -$PSise.CurrentPowerShellTab.ExpandedScript=!$PSise.CurrentPowerShellTab.ExpandedScript +The read-write Boolean property that determines whether the Script pane is expanded or hidden. +```powershell +# Toggle the expanded script property to see its effect. +$psISE.CurrentPowerShellTab.ExpandedScript = !$psISE.CurrentPowerShellTab.ExpandedScript ``` ### Files - Supported in Windows PowerShell ISE 2.0 and later. - The read-only property that gets the [collection of script files](../ise/The-ISEFileCollection-Object.md) that are open in the PowerShell tab. +Supported in Windows PowerShell ISE 2.0 and later. -``` +The read-only property that gets the [collection of script files](../ise/The-ISEFileCollection-Object.md) that are open in the PowerShell tab. + +```powershell $newFile = $psISE.CurrentPowerShellTab.Files.Add() -$newFile.Editor.Text = "a`r`nb" +$newFile.Editor.Text = "a`r`nb" # Gets the line count $newFile.Editor.LineCount ``` ### Output - This feature is present in Windows PowerShell ISE 2.0, but was removed or renamed in later versions of the ISE. In later versions of Windows PowerShell ISE, you can use the **ConsolePane** object for the same purposes. - The read-only property that gets the Output pane of the current [editor](../ise/The-ISEEditor-Object.md). +This feature is present in Windows PowerShell ISE 2.0, but was removed or renamed in later versions of the ISE. In later versions of Windows PowerShell ISE, you can use the **ConsolePane** object for the same purposes. -``` +The read-only property that gets the Output pane of the current [editor](../ise/The-ISEEditor-Object.md). + +```powershell # Clears the text in the Output pane. -$psise.CurrentPowerShellTab.output.clear() +$psISE.CurrentPowerShellTab.output.clear() ``` ### Prompt - Supported in Windows PowerShell ISE 2.0 and later. - The read-only property that gets the current prompt text. Note: the **Prompt** function can be overridden by the user'™s profile. If the result is other than a simple string, then this property returns nothing. +Supported in Windows PowerShell ISE 2.0 and later. -``` +The read-only property that gets the current prompt text. Note: the **Prompt** function can be overridden by the user'™s profile. If the result is other than a simple string, then this property returns nothing. + +```powershell # Gets the current prompt text. $psISE.CurrentPowerShellTab.Prompt ``` ### ShowCommands - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - The read-write property that indicates if the Commands pane is currently displayed. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. -``` +The read-write property that indicates if the Commands pane is currently displayed. + +```powershell # Gets the current status of the Commands pane and stores it in the $a variable $a = $psISE.CurrentPowerShellTab.ShowCommands -# if $a is $false, then turn the Commands pane on by changing the value to $True -if (!$a) {$psISE.CurrentPowerShellTab.ShowCommands=$True} +# if $a is $false, then turn the Commands pane on by changing the value to $true +if (!$a) {$psISE.CurrentPowerShellTab.ShowCommands = $true} ``` ### StatusText - Supported in Windows PowerShell ISE 2.0 and later. - The read-only property that gets the **PowerShellTab** status text. +Supported in Windows PowerShell ISE 2.0 and later. -``` +The read-only property that gets the **PowerShellTab** status text. + +```powershell # Gets the current status text, $psISE.CurrentPowerShellTab.StatusText ``` ### HorizontalAddOnToolsPaneOpened - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - The read-only property that indicates whether the horizontal Add-Ons tool pane is currently open. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. -``` -# Gets the current state of the horizontal Add-ons tool pane. +The read-only property that indicates whether the horizontal Add-Ons tool pane is currently open. + +```powershell +# Gets the current state of the horizontal Add-ons tool pane. $psISE.CurrentPowerShellTab.HorizontalAddOnToolsPaneOpened ``` ### VerticalAddOnToolsPaneOpened - Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. - The read-only property that indicates whether the vertical Add-Ons tool pane is currently open. +Supported in Windows PowerShell ISE 3.0 and later, and not present in earlier versions. -``` +The read-only property that indicates whether the vertical Add-Ons tool pane is currently open. + +```powershell # Turns on the Commands pane -$psISE.CurrentPowerShellTab.ShowCommands=$True -# Gets the current state of the vertical Add-ons tool pane. +$psISE.CurrentPowerShellTab.ShowCommands = $true +# Gets the current state of the vertical Add-ons tool pane. $psISE.CurrentPowerShellTab.HorizontalAddOnToolsPaneOpened ``` ## See Also -- [The PowerShellTabCollection Object](The-PowerShellTabCollection-Object.md) -- [The Windows PowerShell ISE Scripting Object Model](../ise/The-Windows-PowerShell-ISE-Scripting-Object-Model.md) -- [Windows PowerShell ISE Object Model Reference](../ise/Windows-PowerShell-ISE-Object-Model-Reference.md) -- [The ISE Object Model Hierarchy](../ise/The-ISE-Object-Model-Hierarchy.md) - +- [The PowerShellTabCollection Object](The-PowerShellTabCollection-Object.md) +- [Purpose of the Windows PowerShell ISE Scripting Object Model](Purpose-of-the-Windows-PowerShell-ISE-Scripting-Object-Model.md) +- [The ISE Object Model Hierarchy](The-ISE-Object-Model-Hierarchy.md) \ No newline at end of file diff --git a/reference/docs-conceptual/core-powershell/ise/The-PowerShellTabCollection-Object.md b/reference/docs-conceptual/core-powershell/ise/The-PowerShellTabCollection-Object.md index 3a7fadd415b2..cbdc7b0b4edd 100644 --- a/reference/docs-conceptual/core-powershell/ise/The-PowerShellTabCollection-Object.md +++ b/reference/docs-conceptual/core-powershell/ise/The-PowerShellTabCollection-Object.md @@ -4,62 +4,62 @@ keywords: powershell,cmdlet title: The PowerShellTabCollection Object ms.assetid: 81f4bf4a-83bf-415e-8378-1703792fbb58 --- - # The PowerShellTabCollection Object - The **PowerShellTab** collection object is a collection of **PowerShellTab** objects. Each **PowerShellTab** object functions as a separate runtime environment. It is an instance of Microsoft.PowerShell.Host.ISE.PowerShellTabs class. An example is the **$psISE.PowerShellTabs** object. + +The **PowerShellTab** collection object is a collection of **PowerShellTab** objects. Each **PowerShellTab** object functions as a separate runtime environment. It is an instance of Microsoft.PowerShell.Host.ISE.PowerShellTabs class. An example is the **$psISE.PowerShellTabs** object. ## Methods ### Add\(\) - Supported in Windows PowerShell ISE 2.0 and later. - Adds a new PowerShell tab to the collection. It returns the newly added tab. +Supported in Windows PowerShell ISE 2.0 and later. -``` -$NewTab=$psISE.PowerShellTabs.Add() -$newTab.DisplayName="Brand New Tab" +Adds a new PowerShell tab to the collection. It returns the newly added tab. + +```powershell +$newTab = $psISE.PowerShellTabs.Add() +$newTab.DisplayName = 'Brand New Tab' ``` ### Remove\(Microsoft.PowerShell.Host.ISE.PowerShellTab psTab\) - Supported in Windows PowerShell ISE 2.0 and later. - Removes the tab that is specified by the **psTab** parameter. +Supported in Windows PowerShell ISE 2.0 and later. - **psTab** - The PowerShell tab to remove. +Removes the tab that is specified by the **psTab** parameter. -``` +**psTab** +The PowerShell tab to remove. +```powershell $newTab = $psISE.PowerShellTabs.Add() -Change the DisplayName of the new PowerShell tab. -$newTab.DisplayName="This tab will go away in 5 seconds" -sleep 5 +Change the DisplayName of the new PowerShell tab. +$newTab.DisplayName = 'This tab will go away in 5 seconds' +sleep 5 $psISE.PowerShellTabs.Remove($newTab) ``` ### SetSelectedPowerShellTab\(Microsoft.PowerShell.Host.ISE.PowerShellTab psTab\) - Supported in Windows PowerShell ISE 2.0 and later. - Selects the PowerShell tab that is specified by the **psTab** parameter to make it the currently active PowerShell tab. +Supported in Windows PowerShell ISE 2.0 and later. - **psTab** - The PowerShell tab to select. +Selects the PowerShell tab that is specified by the **psTab** parameter to make it the currently active PowerShell tab. -``` +**psTab** +The PowerShell tab to select. + +```powershell # Save the current tab in a variable and rename it -$OldTab = $psISE.CurrentPowerShellTab -$psISE.CurrentPowerShellTab.DisplayName="Old Tab" +$oldTab = $psISE.CurrentPowerShellTab +$psISE.CurrentPowerShellTab.DisplayName = 'Old Tab' # Create a new tab and give it a new display name $newTab = $psISE.PowerShellTabs.Add() -$newTab.DisplayName="Brand New Tab" +$newTab.DisplayName = 'Brand New Tab' # Switch back to the original tab -$psISE.PowerShellTabs.SelectedPowerShellTab=$oldtab +$psISE.PowerShellTabs.SelectedPowerShellTab = $oldTab ``` ## See Also -- [The PowerShellTab Object](The-PowerShellTab-Object.md) -- [The Windows PowerShell ISE Scripting Object Model](../ise/The-Windows-PowerShell-ISE-Scripting-Object-Model.md) -- [Windows PowerShell ISE Object Model Reference](../ise/Windows-PowerShell-ISE-Object-Model-Reference.md) -- [The ISE Object Model Hierarchy](../ise/The-ISE-Object-Model-Hierarchy.md) - +- [The PowerShellTab Object](The-PowerShellTab-Object.md) +- [Purpose of the Windows PowerShell ISE Scripting Object Model](Purpose-of-the-Windows-PowerShell-ISE-Scripting-Object-Model.md) +- [The ISE Object Model Hierarchy](The-ISE-Object-Model-Hierarchy.md) \ No newline at end of file diff --git a/reference/docs-conceptual/getting-started/Getting-Ready-to-Use-Windows-PowerShell.md b/reference/docs-conceptual/getting-started/Getting-Ready-to-Use-Windows-PowerShell.md index eea303da14d5..f243fcf9a7da 100644 --- a/reference/docs-conceptual/getting-started/Getting-Ready-to-Use-Windows-PowerShell.md +++ b/reference/docs-conceptual/getting-started/Getting-Ready-to-Use-Windows-PowerShell.md @@ -8,7 +8,7 @@ ms.assetid: 6dc7052d-cc5a-4220-950f-98f963a2b587 # Getting Ready to Use Windows PowerShell When Windows PowerShell is installed and started, consider the following setup options. You can perform these tasks at any time. -- **Install help files.** The cmdlets that are included in Windows PowerShell 3.0 do not come with help files. However, you can use the [Update-Help](/powershell/module/microsoft.powershell.core/update-help) cmdlet to download and install the newest help files on your computer. When the files are installed, you can use the [Get-Help](/powershell/module/microsoft.powershell.core/get-help) cmdlet to display them right at the command line. For more information, see [about_Updatable_Help](/powershell/module/microsoft.powershell.core/about/about_execution_policies). +- **Install help files.** The cmdlets that are included in Windows PowerShell 3.0 do not come with help files. However, you can use the [Update-Help](/powershell/module/microsoft.powershell.core/update-help) cmdlet to download and install the newest help files on your computer. When the files are installed, you can use the [Get-Help](/powershell/module/microsoft.powershell.core/get-help) cmdlet to display them right at the command line. For more information, see [about_Updatable_Help](/powershell/module/microsoft.powershell.core/about/about_updatable_help). If you decide not to install the help files, you can still read the help topics online. To find the online version of any cmdlet help topic, type: `Get-Help -Online`. To browse the Windows PowerShell help topics see the [PowerShell documentation](/powershell/scripting). diff --git a/reference/docs-conceptual/getting-started/cookbooks/Other-Useful-Scripting-Objects.md b/reference/docs-conceptual/getting-started/cookbooks/Other-Useful-Scripting-Objects.md index f25f63ac3aed..e7b194358ed5 100644 --- a/reference/docs-conceptual/getting-started/cookbooks/Other-Useful-Scripting-Objects.md +++ b/reference/docs-conceptual/getting-started/cookbooks/Other-Useful-Scripting-Objects.md @@ -4,32 +4,32 @@ keywords: powershell,cmdlet title: Other Useful Scripting Objects ms.assetid: 4d781196-720b-4ccc-90d2-c570e5e719f5 --- - # Other Useful Scripting Objects - The following objects provide additional scripting functionality in Windows PowerShell ISE. They are not part of the **$psISE** hierarchy. + +The following objects provide additional scripting functionality in Windows PowerShell ISE. They are not part of the **$psISE** hierarchy. ## Useful Scripting objects ### $psUnsupportedConsoleApplications - There are some limitations on how Windows PowerShell ISE interacts with console applications. A command or an automation script that requires user intervention might not work the way it works from the Windows PowerShell console. You might want to block these commands or scripts from running in the Windows PowerShell ISE Command pane. The **$psUnsupportedConsoleApplications** object keeps a list of such commands. If you try to run the commands in this list, you get a message that they are not supported. The following script adds an entry to the list. -``` +There are some limitations on how Windows PowerShell ISE interacts with console applications. A command or an automation script that requires user intervention might not work the way it works from the Windows PowerShell console. You might want to block these commands or scripts from running in the Windows PowerShell ISE Command pane. The **$psUnsupportedConsoleApplications** object keeps a list of such commands. If you try to run the commands in this list, you get a message that they are not supported. The following script adds an entry to the list. + +```powershell # List the unsupported commands -psUnsupportedConsoleApplications +$psUnsupportedConsoleApplications # Add a command to this list -psUnsupportedConsoleApplications.Add(“Mycommand”) -#Show the augmented list of commands -psUnsupportedConsoleApplications - +$psUnsupportedConsoleApplications.Add('Mycommand') +# Show the augmented list of commands +$psUnsupportedConsoleApplications ``` ### $psLocalHelp - This is a dictionary object that maintains a context-sensitive mapping between Help topics and their associated links in the local compiled HTML Help file. It is used to locate the local Help for a particular topic. You can add or delete topics from this list. The following code example shows some example key-value pairs that are contained in **$psLocalHelp**. -``` +This is a dictionary object that maintains a context-sensitive mapping between Help topics and their associated links in the local compiled HTML Help file. It is used to locate the local Help for a particular topic. You can add or delete topics from this list. The following code example shows some example key-value pairs that are contained in **$psLocalHelp**. + +```powershell # See the local help map $psLocalHelp | Format-List - ``` ### Sample Output @@ -39,18 +39,18 @@ $psLocalHelp | Format-List |Key : Add-Computer|Value : WindowsPowerShellHelp.chm::/html/093f660c-b8d5-43cf-aa0c-54e5e54e76f9.htm| |Key : Add-Content|Value : WindowsPowerShellHelp.chm::/html/0c836a1b-f389-4e9a-9325-0f415686d194.htm| - The following script adds an entry to the list. +The following script adds an entry to the list. -``` -$psLocalHelp.Add("get-myNoun","c:\MyFolder\MyHelpChm.chm::/html/0198854a-1298-57ae-aa0c-87b5e5a84712.htm") +```powershell +$psLocalHelp.Add("get-myNoun", "c:\MyFolder\MyHelpChm.chm::/html/0198854a-1298-57ae-aa0c-87b5e5a84712.htm") ``` ### $psOnlineHelp - This is a dictionary object that maintains a context-sensitive mapping between topic titles of Help topics and their associated external URLs. It is used to locate the Help for a particular topic on the web. You can add or delete topics from this list. -``` -$psOnlineHelp | Format-List +This is a dictionary object that maintains a context-sensitive mapping between topic titles of Help topics and their associated external URLs. It is used to locate the Help for a particular topic on the web. You can add or delete topics from this list. +```powershell +$psOnlineHelp | Format-List ``` ### Sample Output @@ -62,11 +62,10 @@ $psOnlineHelp | Format-List The following script adds an entry to the list. -``` -$psOnlineHelp.Add("get-myNoun","http://www.mydomain.com/MyNoun.html") +```powershell +$psOnlineHelp.Add("get-myNoun", "http://www.mydomain.com/MyNoun.html") ``` ## See Also -- [The Windows PowerShell ISE Scripting Object Model](../../core-powershell/ise/The-Windows-PowerShell-ISE-Scripting-Object-Model.md) - +- [Purpose of the Windows PowerShell ISE Scripting Object Model](../../core-powershell/ise/Purpose-of-the-Windows-PowerShell-ISE-Scripting-Object-Model.md) \ No newline at end of file diff --git a/reference/docs-conceptual/getting-started/fundamental/Exploring-the-Windows-PowerShell-ISE.md b/reference/docs-conceptual/getting-started/fundamental/Exploring-the-Windows-PowerShell-ISE.md index ec303e02f65e..29cd98a0187a 100644 --- a/reference/docs-conceptual/getting-started/fundamental/Exploring-the-Windows-PowerShell-ISE.md +++ b/reference/docs-conceptual/getting-started/fundamental/Exploring-the-Windows-PowerShell-ISE.md @@ -4,23 +4,26 @@ keywords: powershell,cmdlet title: Exploring the Windows PowerShell ISE ms.assetid: e0d2c6e8-5126-40e7-a1e1-d1cff29fe94a --- - # Exploring the Windows PowerShell ISE + You can use the Windows PowerShell® Integrated Scripting Environment (ISE) to create, run, and debug commands and scripts. The Windows PowerShell ISE consists of the menu bar, Windows PowerShell tabs, the toolbar, script tabs, a Script Pane, a Console Pane, a status bar, a text-size slider and context-sensitive Help. > [!NOTE] > Beginning with Windows PowerShell ISE 3.0 the Command and Output Panes were combined into a single Console Pane. ## Menu Bar -The menu bar contains the **File**, **Edit**, **View**, **Tools**, **Debug**, **Add-ons**, and **Help** menus. The buttons on the menus allow you to perform tasks related to writing and running scripts and running commands in the Windows PowerShell ISE. Additionally, an [add-on tool](../../core-powershell/ise/The-ISEAddOnTool-Object.md) may be placed on the menu bar by running scripts that use the [Windows PowerShell ISE Scripting Object Model](../../core-powershell/ise/The-Windows-PowerShell-ISE-Scripting-Object-Model.md). + +The menu bar contains the **File**, **Edit**, **View**, **Tools**, **Debug**, **Add-ons**, and **Help** menus. The buttons on the menus allow you to perform tasks related to writing and running scripts and running commands in the Windows PowerShell ISE. Additionally, an [add-on tool](../../core-powershell/ise/The-ISEAddOnTool-Object.md) may be placed on the menu bar by running scripts that use the [The ISE Object Model Hierarchy](../../core-powershell/ise/The-ISE-Object-Model-Hierarchy.md). > [!NOTE] > In Windows PowerShell ISE 2.0, The **Tools** and **Add-ons** menus were not present. ## Windows PowerShell Tabs + A Windows PowerShell tab is the environment in which a Windows PowerShell script runs. You can open new Windows PowerShell tabs in the Windows PowerShell ISE to create separate environments on your local computer or on remote computers. You may have a maximum of eight PowerShell tabs simultaneously open. ## Toolbar + The following buttons are located on the toolbar. |Button|Function| @@ -35,7 +38,7 @@ The following buttons are located on the toolbar. |**Undo**|Reverses the action that was just performed.| |**Redo**|Performs the action that was just undone.| |**Run Script**|Runs a script.| -|**Run Selction**|Runs a selected portion of a script.| +|**Run Selection**|Runs a selected portion of a script.| |**Stop Execution**|Stops a script that is running.| |**New Remote PowerShell Tab**|Creates a new PowerShell Tab that establishes a session on a remote computer. A dialog box appears and prompts you to enter details required to establish the remote connection.| |**Start PowerShell.exe**|Opens a PowerShell Console.| @@ -44,28 +47,35 @@ The following buttons are located on the toolbar. |**Show Script Pane Maximized**|Maximizes the Script Pane.| ## Script Tab + Displays the name of the script you are editing. You can click a script tab to select the script you want to edit. When you point to the script tab, the fully qualified path to the script file appears in a tooltip. ## Script Pane + Allows you to create and run scripts. You can open, edit and run existing scripts in the Script Pane. ## Output Pane + Displays the results of the commands and scripts you have run. You can also copy and clear the contents in the Output Pane. ## Command Pane + Allows you to write commands. You can run a one line command or a multiline command in the Command Pane. Press SHIFT+ENTER to enter each line of a multiline command, and press ENTER after the last line to execute the multiline command. The prompt displayed on top of the Command Pane shows the path to the current working directory. ## Status Bar + Allows you to see whether the commands and scripts that you run are complete. The status bar is at the very bottom of the display. Selected portions of error messages are displayed on the status bar. ## Text-Size Slider + Increases or decreases the size of the text on the screen. ## Help + Help for Windows PowerShell ISE is available on the Web in the TechNet Library. You can open the Help by clicking **Windows PowerShell ISE Help** on the **Help** menu or by pressing the F1 key anywhere except when the cursor is on a cmdlet name in either the Script Pane or the Console Pane. From the **Help** menu you can also run the Update-Help cmdlet, and display the Command Window which assists you in constructing commands by showing you all of the parameters for a cmdlet and enabling you to fill in the parameters in an easy-to-use form. ## See Also -- [Using the Windows PowerShell ISE](../../core-powershell/ise/Using-the-Windows-PowerShell-ISE.md) +- [Introducing the Windows PowerShell ISE](../../core-powershell/ise/Introducing-the-Windows-PowerShell-ISE.md) \ No newline at end of file diff --git a/reference/docs-conceptual/setup/Accessibility-in-Windows-PowerShell-ISE.md b/reference/docs-conceptual/setup/Accessibility-in-Windows-PowerShell-ISE.md index f4472e0d1349..481bd504b93a 100644 --- a/reference/docs-conceptual/setup/Accessibility-in-Windows-PowerShell-ISE.md +++ b/reference/docs-conceptual/setup/Accessibility-in-Windows-PowerShell-ISE.md @@ -4,8 +4,8 @@ keywords: powershell,cmdlet title: Accessibility in Windows PowerShell ISE ms.assetid: a078f9d1-dd6b-4323-b16d-0622cd993aa8 --- - # Accessibility in Windows PowerShell ISE + This topic describes the accessibility features of Windows PowerShell Integrated Scripting Environment (ISE) that you might find helpful. * [How to change the size and location of the Console and Script Panes](#how-to-change-the-size-and-location-of-the-console-and-script-panes) @@ -27,6 +27,7 @@ Windows PowerShell ISE supports high contrast mode. For the visually impaired, b - Text Size Change ## How to change the size and location of the Console and Script Panes + You can use the following steps to change the size and location of the Console Pane and the Script Pane. When you open the Windows PowerShell ISE again, the size and location changes you made will be retained. ### To resize the Script Pane and Console Pane @@ -36,6 +37,7 @@ You can use the following steps to change the size and location of the Console P 2. When the mouse pointer changes to a two-headed arrow, drag the border to change the size of the pane. ### To move the Script Pane and Console Pane + Do one of the following: - To move the Script Pane above the Console Pane, press **CTRL+1** or, on the toolbar, click the **Show Script Pane Top** icon, or in the **View** menu, click **Show Script Pane Top**. @@ -49,6 +51,7 @@ Do one of the following: - To display the Script Pane when the Console Pane is maximized, on the far right edge of the row of tabs, click the **Show Script Pane** icon, or in the **View** menu, click to select the **Show Script Pane** menu option. ## Keyboard shortcuts for editing text + You can use the following keyboard shortcuts when you edit text. |Action|Keyboard Shortcuts|Use in| @@ -66,6 +69,7 @@ You can use the following keyboard shortcuts when you edit text. |**Undo**|CTRL+Z|Script Pane, Console Pane| ## Keyboard shortcuts for running scripts + You can use the following keyboard shortcuts when you run scripts in the Script Pane. |Action|Keyboard Shortcut| @@ -79,6 +83,7 @@ You can use the following keyboard shortcuts when you run scripts in the Script |**Tab** (to previous script)|CTRL+SHIFT+TAB **Note:** Tab to previous script works when you have only one PowerShell tab open, or if you have more than one PowerShell tab open, and the focus is in the Script Pane.| ## Keyboard shortcuts for customizing the view + You can use the following keyboard shortcuts to customize the view in Windows PowerShell ISE. They are accessible from all the panes in the application. |Action|Keyboard Shortcut| @@ -95,6 +100,7 @@ You can use the following keyboard shortcuts to customize the view in Windows Po |**Zoom Out**|CTRL+MINUS SIGN| ## Keyboard shortcuts for debugging scripts + You can use the following keyboard shortcuts when you debug scripts. |Action|Keyboard Shortcut|Use in| @@ -126,6 +132,7 @@ You can use the following keyboard shortcuts when you debug scripts. |**Display Console Debugging Commands**|H or ?|Console Pane, when debugging a script| ## Keyboard shortcuts for Windows PowerShell tabs + You can use the following keyboard shortcuts when you use Windows PowerShell tabs. |Action|Keyboard Shortcut| @@ -136,6 +143,7 @@ You can use the following keyboard shortcuts when you use Windows PowerShell tab |**Next Windows PowerShell tab**|CTRL+TAB. This shortcut works only when no files are open on any PowerShell tab.| ## Keyboard shortcuts for starting and exiting + You can use the following keyboard shortcuts to start the Windows PowerShell console (PowerShell.exe) or to exit Windows PowerShell ISE. |Action|Keyboard Shortcut| @@ -144,5 +152,5 @@ You can use the following keyboard shortcuts to start the Windows PowerShell con |**Start PowerShell.exe** (Windows PowerShell console)|CTRL+SHIFT+P| ## See Also -- [Using the Windows PowerShell ISE](../core-powershell/ise/Using-the-Windows-PowerShell-ISE.md) +- [Introducing the Windows PowerShell ISE](../core-powershell/ise/Introducing-the-Windows-PowerShell-ISE.md) \ No newline at end of file diff --git a/reference/docs-conceptual/setup/Installing-PowerShell-Core-on-macOS-and-Linux.md b/reference/docs-conceptual/setup/Installing-PowerShell-Core-on-macOS-and-Linux.md index f591964c6df2..e96a186c56da 100644 --- a/reference/docs-conceptual/setup/Installing-PowerShell-Core-on-macOS-and-Linux.md +++ b/reference/docs-conceptual/setup/Installing-PowerShell-Core-on-macOS-and-Linux.md @@ -387,10 +387,21 @@ sudo yum remove powershell ## OpenSUSE 42.2 -> **Note:** When installing PowerShell Core, OpenSUSE may report that nothing provides `libcurl`. -`libcurl` should already be installed on supported versions of OpenSUSE. -Run `zypper search libcurl` to confirm. -The error will present 2 'solutions'. Choose 'Solution 2' to continue installing PowerShell Core. +> **Note:** When installing PowerShell Core, `zypper` may report the following error: +> +> ```text +> Problem: nothing provides libcurl needed by powershell-6.0.1-1.rhel.7.x86_64 +> Solution 1: do not install powershell-6.0.1-1.rhel.7.x86_64 +> Solution 2: break powershell-6.0.1-1.rhel.7.x86_64 by ignoring some of its dependencies +> ``` +> +> In this case, verify that a compatible `libcurl` library is present by checking that the following command shows the `libcurl4` package as installed: +> +> ```sh +> zypper search --file-list --match-exact '/usr/lib64/libcurl.so.4' +> ``` +> +> Then choose the `break powershell-6.0.1-1.rhel.7.x86_64 by ignoring some of its dependencies` solution when installing the `powershell` package. ### Installation via Package Repository (preferred) - OpenSUSE 42.2 diff --git a/reference/docs-conceptual/whats-new/What-s-New-in-the-PowerShell-50-ISE.md b/reference/docs-conceptual/whats-new/What-s-New-in-the-PowerShell-50-ISE.md index 787f84e32762..018a95a6cf8f 100644 --- a/reference/docs-conceptual/whats-new/What-s-New-in-the-PowerShell-50-ISE.md +++ b/reference/docs-conceptual/whats-new/What-s-New-in-the-PowerShell-50-ISE.md @@ -218,7 +218,7 @@ Show-Command is new Windows PowerShell ISE 3.0. ## See also For more information about using Windows PowerShell ISE in Windows PowerShell, see the following links. -- [Using the Windows PowerShell Integrated Scripting Environment](../core-powershell/ise/Using-the-Windows-PowerShell-ISE.md) +- [Exploring the Windows PowerShell Integrated Scripting Environment](../getting-started/fundamental/exploring-the-windows-powershell-ise.md) - [ISE on the TechNet Wiki](http://social.technet.microsoft.com/wiki/search/searchresults.aspx?q=ISE) - [Script Center](http://technet.microsoft.com/scriptcenter/default) diff --git a/wmf/TOC.md b/wmf/TOC.md deleted file mode 100644 index 82501f4ce8ea..000000000000 --- a/wmf/TOC.md +++ /dev/null @@ -1,97 +0,0 @@ -# [Windows Management Framework (WMF) Overview](README.md) - -# [WMF 5.1](5.1/release-notes.md) -## [New Scenarios and Features](5.1/scenarios-features.md) -### [Improvements in Desired State Configuration (DSC)](5.1/DSC-improvements.md) -### [Improvements in the PowerShell Console](5.1/console-improvements.md) -### [Improvements in the PowerShell Engine](5.1/engine-improvements.md) -### [Improvements in Package Management](5.1/package-management-improvements.md) -### [Improvements in JEA](5.1/jea-improvements.md) -### [Catalog cmdlets](5.1/catalog-cmdlets.md) -### [Bugs Fixed in WMF 5.1](5.1/bugfixes.md) -## [Install and Configure](5.1/install-configure.md) -## [Known Issues](5.1/known-issues.md) -## [Compatibility](5.1/Compatibility.md) -## [Product Compatibility](5.1/productincompat.md) - -# [WMF 5.0](5.0/releasenotes.md) -## [Installation Details](5.0/requirements.md) -## [Known Issues and Limitations](5.0/limitation_overview.md) -### [Desired State Configuration (DSC) Known Issues](5.0/limitation_dsc.md) -## [Product Compatibility Status](5.0/productincompat.md) -## [Scenarios Enabled by WMF 5.0]() -### [Just Enough Administration (JEA)](5.0/jea_overview.md) -#### [Creating and Connecting to a JEA Endpoint](5.0/jea_endpoint.md) -#### [Reporting on JEA](5.0/jea_report.md) -### [Creating Custom Types using PowerShell Classes](5.0/class_overview.md) -#### [Define Custom Types](5.0/class_newtype.md) -#### [Declare Base Class](5.0/class_base.md) -#### [Declare Implemented Interface](5.0/class_interface.md) -#### [Call Base Class Constructor](5.0/class_baseconstructor.md) -#### [Call Base Class Method](5.0/class_basemethod.md) -### [Improvements in PowerShell Script Debugging](5.0/debug_overview.md) -### [Improvements in Desired State Configuration (DSC)](5.0/dsc_improvements.md) -#### [Configurations]() -##### [Specifying Cross Node Dependencies](5.0/dsc_waitfor.md) -##### [Encrypted MOFs](5.0/dsc_encryptedmof.md) -##### [Help Support for DSC Configuration](5.0/dsc_confighelp.md) -##### [Authoring Improvements using PowerShell ISE](5.0/dsc_authoring.md) -##### [Allowance for Identical Duplicate Resources in a Configuration](5.0/dsc_identicalduplicate.md) -##### [Import-DscResource Keyword Supports -ModuleVersion Parameter](5.0/dsc_importdscresource.md) -##### [WOW64 Support for Configuration Keyword](5.0/dsc_wow64.md) -#### [Resources]() -##### [Class-based DSC Resources](5.0/dsc_classbasedresource.md) -##### [DSC Resource Script Debugging](5.0/dsc_resourcedebugging.md) -##### [Automatic RunAs Support for DSC Resources](5.0/dsc_runas.md) -##### [Side-By-Side Versioning Support for DSC Resources](5.0/dsc_sxsresource.md) -##### [New In-box Resources](5.0/dsc_newresources.md) -#### [Local Configuration Manager]() -##### [Configure Node with Multiple Configuration Fragments](5.0/dsc_partialconfig.md) -###### [Support for Mixed RefreshModes](5.0/dsc_partialconfig_mixedmode.md) -##### [Configure DSC Engine with New Attribute](5.0/dsc_metaconfiguration.md) -##### [Detailed Information about LCM State](5.0/dsc_lcmstate.md) -##### [Frequencies for RefreshMode and ConfigurationMode need not be Multiple of Each Other](5.0/dsc_freqnomultiple.md) -##### [Additional Value for RefreshMode Property](5.0/dsc_refreshmode.md) -#### [Cmdlets]() -##### [Details about Configuration Status](5.0/dsc_getconfigurationstatus.md) -##### [Test-DscConfiguration Cmdlet Supports Reference Configurations](5.0/dsc_testconfiguration.md) -##### [Direct Access to DSC Resource Methods](5.0/dsc_directaccess.md) -##### [Deliver Configuration Document without Applying](5.0/dsc_publishconfig.md) -##### [Remove DSC Documents](5.0/dsc_removeconfigdoc.md) -##### [Unified and Consistent State and Status Representation](5.0/dsc_statestatus.md) -##### [Set-DscLocalConfigurationManager Cmdlet Supports -Force Parameter](5.0/dsc_setdsclcm.md) -#### [Pull Mode]() -##### [On-demand PULL of DSC Configurations](5.0/dsc_updateconfig.md) -##### [Separation of Node and Configuration IDs](5.0/dsc_nodeid.md) -##### [Separation of Configuration, Resource, and Report Repositories](5.0/dsc_repository.md) -##### [Report Configuration Status to Central Location](5.0/dsc_reporting.md) -### [Audit PowerShell Usage using Transcript and Logging](5.0/audit_overview.md) -#### [Enhanced Transcription Options](5.0/audit_transcript.md) -#### [Script Tracing and Logging](5.0/audit_script.md) -#### [Cryptographic Message Syntax (CMS) Cmdlets](5.0/audit_cms.md) -### [Software Discovery, Install, and Inventory with PackageManagement](5.0/oneget_overview.md) -#### [PackageManagement Cmdlets](5.0/oneget_cmdlets.md) -### [PowerShell Module Discovery, Install, and Inventory with PowerShellGet](5.0/psget_module_overview.md) -#### [Register a PowerShell Repository](5.0/psget_psrepository.md) -#### [Side-by-Side Version Support on PowerShell 5.0 or Newer](5.0/psget_modulesxsinstall.md) -#### [Installation of Module Dependencies](5.0/psget_moduledependency.md) -#### [PowerShellGet Cmdlets for Module Management](5.0/psget_modulecmdlets.md) -### [PowerShell Script Discovery, Install, and Management with PowerShellGet](5.0/psget_script_overview.md) -#### [PowerShellGet Cmdlets for Script Management](5.0/psget_scriptcmdlets.md) -### [New and Updated Cmdlets based on Community Feedback](5.0/feedback_cmdlets.md) -#### [Symbolic Links using Item Cmdlets](5.0/feedback_symbolic.md) -#### [Archive Cmdlets](5.0/feedback_archive.md) -#### [Clipboard Cmdlets](5.0/feedback_clipboard.md) -#### [Convert-String](5.0/feedback_convertstring.md) -#### [Extract and Parse Structured Objects out of String](5.0/feedback_convertfromString.md) -#### [Format-Hex](5.0/feedback_formathex.md) -#### [NoNewLine Parameter](5.0/feedback_nonewline.md) -#### [New-TemporaryFile](5.0/feedback_tempfile.md) -#### [New-Guid](5.0/feedback_newguid.md) -#### [Get-ChildItem has -Depth Parameter](5.0/feedback_getchilditem.md) -#### [Updates to FileInfo object](5.0/feedback_fileinfo.md) -#### [Modules Support for Declaring Version Ranges (1.*, etc)](5.0/feedback_moduleversionranges.md) -### [Information Stream](5.0/informationstream_overview.md) -### [Generate PowerShell Cmdlets based on OData Endpoint](5.0/odata_overview.md) -### [Network Switch Management with PowerShell](5.0/networkswitch_overview.md) -### [Software Inventory Logging (SIL)](5.0/sil_overview.md) diff --git a/wmf/TOC.yml b/wmf/TOC.yml new file mode 100644 index 000000000000..1f2bdbad2282 --- /dev/null +++ b/wmf/TOC.yml @@ -0,0 +1,209 @@ +- name: Windows Management Framework (WMF) Overview + href: README.md +- name: WMF 5.1 + href: 5.1/release-notes.md + items: + - name: New Scenarios and Features + href: 5.1/scenarios-features.md + items: + - name: Improvements in Desired State Configuration (DSC) + href: 5.1/DSC-improvements.md + - name: Improvements in the PowerShell Console + href: 5.1/console-improvements.md + - name: Improvements in the PowerShell Engine + href: 5.1/engine-improvements.md + - name: Improvements in Package Management + href: 5.1/package-management-improvements.md + - name: Improvements in JEA + href: 5.1/jea-improvements.md + - name: Catalog cmdlets + href: 5.1/catalog-cmdlets.md + - name: Bugs Fixed in WMF 5.1 + href: 5.1/bugfixes.md + - name: Install and Configure + href: 5.1/install-configure.md + - name: Known Issues + href: 5.1/known-issues.md + - name: Compatibility + href: 5.1/Compatibility.md + - name: Product Compatibility + href: 5.1/productincompat.md +- name: WMF 5.0 + href: 5.0/releasenotes.md + items: + - name: Installation Details + href: 5.0/requirements.md + - name: Known Issues and Limitations + href: 5.0/limitation_overview.md + items: + - name: Desired State Configuration (DSC) Known Issues + href: 5.0/limitation_dsc.md + - name: Product Compatibility Status + href: 5.0/productincompat.md + - name: Scenarios Enabled by WMF 5.0 + href: '' + items: + - name: Just Enough Administration (JEA) + href: 5.0/jea_overview.md + items: + - name: Creating and Connecting to a JEA Endpoint + href: 5.0/jea_endpoint.md + - name: Reporting on JEA + href: 5.0/jea_report.md + - name: Creating Custom Types using PowerShell Classes + href: 5.0/class_overview.md + items: + - name: Define Custom Types + href: 5.0/class_newtype.md + - name: Declare Base Class + href: 5.0/class_base.md + - name: Declare Implemented Interface + href: 5.0/class_interface.md + - name: Call Base Class Constructor + href: 5.0/class_baseconstructor.md + - name: Call Base Class Method + href: 5.0/class_basemethod.md + - name: Improvements in PowerShell Script Debugging + href: 5.0/debug_overview.md + - name: Improvements in Desired State Configuration (DSC) + href: 5.0/dsc_improvements.md + items: + - name: Configurations + href: '' + items: + - name: Specifying Cross Node Dependencies + href: 5.0/dsc_waitfor.md + - name: Encrypted MOFs + href: 5.0/dsc_encryptedmof.md + - name: Help Support for DSC Configuration + href: 5.0/dsc_confighelp.md + - name: Authoring Improvements using PowerShell ISE + href: 5.0/dsc_authoring.md + - name: Allowance for Identical Duplicate Resources in a Configuration + href: 5.0/dsc_identicalduplicate.md + - name: Import-DscResource Keyword Supports -ModuleVersion Parameter + href: 5.0/dsc_importdscresource.md + - name: WOW64 Support for Configuration Keyword + href: 5.0/dsc_wow64.md + - name: Resources + href: '' + items: + - name: Class-based DSC Resources + href: 5.0/dsc_classbasedresource.md + - name: DSC Resource Script Debugging + href: 5.0/dsc_resourcedebugging.md + - name: Automatic RunAs Support for DSC Resources + href: 5.0/dsc_runas.md + - name: Side-By-Side Versioning Support for DSC Resources + href: 5.0/dsc_sxsresource.md + - name: New In-box Resources + href: 5.0/dsc_newresources.md + - name: Local Configuration Manager + href: '' + items: + - name: Configure Node with Multiple Configuration Fragments + href: 5.0/dsc_partialconfig.md + items: + - name: Support for Mixed RefreshModes + href: 5.0/dsc_partialconfig_mixedmode.md + - name: Configure DSC Engine with New Attribute + href: 5.0/dsc_metaconfiguration.md + - name: Detailed Information about LCM State + href: 5.0/dsc_lcmstate.md + - name: Frequencies for RefreshMode and ConfigurationMode need not be Multiple of Each Other + href: 5.0/dsc_freqnomultiple.md + - name: Additional Value for RefreshMode Property + href: 5.0/dsc_refreshmode.md + - name: Cmdlets + href: '' + items: + - name: Details about Configuration Status + href: 5.0/dsc_getconfigurationstatus.md + - name: Test-DscConfiguration Cmdlet Supports Reference Configurations + href: 5.0/dsc_testconfiguration.md + - name: Direct Access to DSC Resource Methods + href: 5.0/dsc_directaccess.md + - name: Deliver Configuration Document without Applying + href: 5.0/dsc_publishconfig.md + - name: Remove DSC Documents + href: 5.0/dsc_removeconfigdoc.md + - name: Unified and Consistent State and Status Representation + href: 5.0/dsc_statestatus.md + - name: Set-DscLocalConfigurationManager Cmdlet Supports -Force Parameter + href: 5.0/dsc_setdsclcm.md + - name: Pull Mode + href: '' + items: + - name: On-demand PULL of DSC Configurations + href: 5.0/dsc_updateconfig.md + - name: Separation of Node and Configuration IDs + href: 5.0/dsc_nodeid.md + - name: Separation of Configuration, Resource, and Report Repositories + href: 5.0/dsc_repository.md + - name: Report Configuration Status to Central Location + href: 5.0/dsc_reporting.md + - name: Audit PowerShell Usage using Transcript and Logging + href: 5.0/audit_overview.md + items: + - name: Enhanced Transcription Options + href: 5.0/audit_transcript.md + - name: Script Tracing and Logging + href: 5.0/audit_script.md + - name: Cryptographic Message Syntax (CMS) Cmdlets + href: 5.0/audit_cms.md + - name: Software Discovery, Install, and Inventory with PackageManagement + href: 5.0/oneget_overview.md + items: + - name: PackageManagement Cmdlets + href: 5.0/oneget_cmdlets.md + - name: PowerShell Module Discovery, Install, and Inventory with PowerShellGet + href: 5.0/psget_module_overview.md + items: + - name: Register a PowerShell Repository + href: 5.0/psget_psrepository.md + - name: Side-by-Side Version Support on PowerShell 5.0 or Newer + href: 5.0/psget_modulesxsinstall.md + - name: Installation of Module Dependencies + href: 5.0/psget_moduledependency.md + - name: PowerShellGet Cmdlets for Module Management + href: 5.0/psget_modulecmdlets.md + - name: PowerShell Script Discovery, Install, and Management with PowerShellGet + href: 5.0/psget_script_overview.md + items: + - name: PowerShellGet Cmdlets for Script Management + href: 5.0/psget_scriptcmdlets.md + - name: New and Updated Cmdlets based on Community Feedback + href: 5.0/feedback_cmdlets.md + items: + - name: Symbolic Links using Item Cmdlets + href: 5.0/feedback_symbolic.md + - name: Archive Cmdlets + href: 5.0/feedback_archive.md + - name: Clipboard Cmdlets + href: 5.0/feedback_clipboard.md + - name: Convert-String + href: 5.0/feedback_convertstring.md + - name: Extract and Parse Structured Objects out of String + href: 5.0/feedback_convertfromString.md + - name: Format-Hex + href: 5.0/feedback_formathex.md + - name: NoNewLine Parameter + href: 5.0/feedback_nonewline.md + - name: New-TemporaryFile + href: 5.0/feedback_tempfile.md + - name: New-Guid + href: 5.0/feedback_newguid.md + - name: Get-ChildItem has -Depth Parameter + href: 5.0/feedback_getchilditem.md + - name: Updates to FileInfo object + href: 5.0/feedback_fileinfo.md + - name: Modules Support for Declaring Version Ranges (1.*, etc) + href: 5.0/feedback_moduleversionranges.md + - name: Information Stream + href: 5.0/informationstream_overview.md + - name: Generate PowerShell Cmdlets based on OData Endpoint + href: 5.0/odata_overview.md + - name: Network Switch Management with PowerShell + href: 5.0/networkswitch_overview.md + - name: Software Inventory Logging (SIL) + href: 5.0/sil_overview.md diff --git a/wmf/docfx.json b/wmf/docfx.json index baf309eb2474..9b954f0507d8 100644 --- a/wmf/docfx.json +++ b/wmf/docfx.json @@ -10,7 +10,7 @@ } ], "globalMetadata": { - "breadcrumb_path": "/powershell/wmf/bread/toc.json", + "breadcrumb_path": "/powershell/wmf/bread/toc.yml", "uhfHeaderId": "MSDocsHeader-Powershell", "ROBOTS": "INDEX, FOLLOW", "ms.prod": "powershell",