【193】◀▶ PowerShell 官方资料索引

Microsoft.PowerShell.Core 模块


Windows PowerShell 核心提供程序

提供程序 描述

Alias 提供程序

提供对 Windows PowerShell 别名及其值的访问权限。

Environment 提供程序

提供对 Windows 环境变量的访问权限。

FileSystem 提供程序

提供对文件和目录的访问权限。

Function 提供程序

提供对 Windows PowerShell 中所定义函数的访问权限。

Registry 提供程序

提供对系统注册表项和值的访问权限。

Variable 提供程序

提供对 Windows PowerShell 变量及其值的访问权限。

Windows PowerShell 核心“关于”主题

主题 描述

about_Aliases

介绍 Windows PowerShell 中的 cmdlet 和命令的备用名称。

about_Arithmetic_Operators

介绍在 Windows PowerShell 中执行算术的运算符。

about_Arrays

介绍数组;用于存储数据元素的压缩数据结构。

about_Assignment_Operators

介绍将值分配给变量的运算符。

about_Automatic_Variables

介绍自动变量,此变量存储有关 Windows PowerShell 的状态信息。

about_Break

介绍如何使用 Break 语句,此语句可立即退出 ForeachForWhileDoSwitch 语句。

使用 Break 语句退出 For 语句:

for($i=1; $i -le 10; $i++) 
{ 
    Write-Host $i 
    break 
}

about_Checkpoint-Workflow

介绍 Checkpoint-Workflow 活动,用于在工作流中创建检查点。

about_Command_Precedence

介绍 Windows PowerShell 如何确定要运行哪个命令。

about_Command_Syntax

介绍 Windows PowerShell 中的命令格式。

about_Comment_Based_Help

介绍如何为函数和脚本编写基于注释的帮助主题。

about_CommonParameters

介绍可与任何 cmdlet 一起使用的参数。

about_Comparison_Operators

介绍比较 Windows PowerShell 中的值的运算符。

about_Continue

介绍 Continue 语句,此语句可立即返回到程序循环的顶部。

显示 1 和 10 之间除 5 以外的所有数字:

while ($ctr -lt 10) 
{ 
    $ctr +=1 
    if ($ctr -eq 5) {continue} 
    Write-Host $ctr 
}

about_Core_Commands

列出旨在与 Windows PowerShell 提供程序一起使用的 cmdlet。

about_Data_Sections

介绍脚本的 Data 部分,旨在将数据与代码逻辑隔离。

about_DesiredStateConfiguration

介绍 Windows PowerShell 所需状态配置功能,用于帮助确保在多个远程托管节点上具有一致的配置。

about_Debuggers

介绍 Windows PowerShell 脚本调试程序,一组用于调试脚本和函数的 cmdlet。

about_Do

介绍 Do 语句,用于遵循 While 或 Until 条件运行一次或多次脚本块。

Do-While 语句的语法:

do 
{
  <statement list>
}
while (<condition>)

Do-Until 语句的语法:

do 
{
  <statement list>
}
until (<condition>)

about_Environment_Variables

说明如何访问 Windows PowerShell 中的 Windows 环境变量。

about_Escape_Characters

介绍 Windows PowerShell 中的转义字符 (`) 并说明其效果。

about_Eventlogs

介绍事件查看器中 Windows PowerShell 事件日志。

about_Execution_Policies

介绍 Windows PowerShell 执行策略并说明如何管理它们。

about_For

介绍 Windows PowerShell 中的 For 循环。

For 语句的语法:

for (<init>; <condition>; <repeat>) 
{
    <statement list>
}

about_ForEach

介绍 ForEach 语句,此语句作用于集合中的每个项。

ForEach 语句的语法:

foreach ($<item> in $<collection>)
{
    <statement list>
}

about_Format.ps1xml

介绍 Format.ps1xml 文件,此文件定义控制台中的对象的默认显示。

about_Functions

说明如何在 Windows PowerShell 中创建和使用函数。

about_Functions_Advanced

介绍高级函数,即可充当 cmdlet 的函数。

about_Functions_Advanced_Methods

说明如何使用对高级函数中的 cmdlet 可用的方法和属性。

about_Functions_Advanced_Parameters

显示如何声明高级函数的参数。

about_Functions_CmdletBindingAttribute

介绍 CmdletBinding 属性,用于定义工作方式与 cmdlet 相同的函数。

about_Functions_OutputTypeAttribute

介绍报告函数返回的对象类型的属性。

about_Group_Policy_Settings

介绍 Windows PowerShell 的组策略设置。

about_Hash_Tables

介绍如何创建、使用和排序 Windows PowerShell 中的哈希表。

about_History

说明如何从命令历史记录中获取和运行命令。

about_If

介绍 If 语句,用于为某个操作建立条件。

If 语句的语法:

if (<test1>) 
{
    <statement list 1>
} 
[elseif (<test2>) 
{
    <statement list 2>
}] 
[else 
{
    <statement list 3>
}]

about_InlineScript

介绍 InlineScript 工作流活动。

about_Jobs

介绍 Windows PowerShell 后台作业。

about_Job_Details

提供有关后台作业的详细信息。

about_Join

介绍 Join 运算符,用于将多个字符串合并到单个字符串中。

about_Language_Keywords

介绍 Windows PowerShell 脚本语言中的关键字。

about_Line_Editing

介绍 Windows PowerShell 控制台的编辑功能。

about_Locations

说明如何使用 Windows PowerShell 中的工作位置。

about_Logical_Operators

介绍连接 Windows PowerShell 中的语句的运算符。

about_Methods

说明如何使用方法对 Windows PowerShell 中的对象执行操作。

about_Modules

说明如何安装、导入和使用 Windows PowerShell 模块。

about_Objects

说明如何使用 Windows PowerShell 中的对象。

about_Object_Creation

说明如何在 Windows PowerShell 中创建对象。

about_Operators

介绍 Windows PowerShell 中的运算符的概述主题。包含有关每个运算符类型的主题。

about_Operator_Precedence

以优先顺序列出 Windows PowerShell 运算符。

about_Parameters

说明如何使用 Windows PowerShell 中的 cmdlet 参数。

about_Parameters_Default_Values

说明如何为 cmdlet 和高级函数的参数设置自定义默认值。

about_Parsing

说明 Windows PowerShell 如何解析命令。

about_Path_Syntax

介绍 Windows PowerShell 中的完整和相对路径名称格式。

about_Pipelines

说明如何在 Windows PowerShell 中将命令合并到管道中。

about_PowerShell.exe

显示有关 PowerShell.exe 命令行工具的帮助。

about_PowerShell_Ise.exe

显示有关 PowerShell_ISE.exe 命令行工具的帮助。

about_Preference_Variables

介绍自定义 Windows PowerShell 的首选项变量。

about_Profiles

说明如何创建和使用 Windows PowerShell 配置文件。

about_Prompts

说明如何创建和使用 Windows PowerShell 配置文件。

about_Properties

说明如何使用 Windows PowerShell 中的对象属性。

about_Providers

介绍 Windows PowerShell 提供程序并说明如何使用它们公开的数据。

about_PSSessions

介绍 Windows PowerShell 会话 (PSSession) 并说明如何使用它们运行远程命令。

about_PSSession_Details

提供有关 Windows PowerShell 会话的详细信息。

about_PSSnapins

介绍 Windows PowerShell 管理单元并说明如何使用它们扩展 Windows PowerShell。

about_Quoting_Rules

说明在 Windows PowerShell 中使用单引号和双引号的规则,包括 here-string。

about_Redirection

说明如何将输出重定向到变量和文本文件。包括重定向运算符。

about_Ref

说明如何创建和使用引用变量类型。

about_Regular_Expressions

说明如何使在 Windows PowerShell 中使用正则表达式。

about_Remote

如何在 Windows PowerShell 中运行远程命令。

about_Remote_Disconnected_Sessions

说明如何与 PSSession 断开连接并进行重新连接。

about_Remote_FAQ

有关在 Windows PowerShell 中运行远程命令的问题和解答。

about_Remote_Jobs

说明如何在远程计算机上运行后台作业。

about_Remote_Output

解释和格式化远程命令的输出。

about_Remote_Requirements

在 Windows PowerShell 中运行远程命令的系统要求和配置要求。

about_Remote_Troubleshooting

Windows PowerShell 中的远程操作疑难解答。

about_Remote_Variables

说明如何在远程命令中使用本地和远程变量。

about_Requires

介绍 Requires 语句,用于防止脚本在没有所需的管理单元和版本的情况下运行。

about_Reserved_Words

列出保留到 Windows PowerShell 的字词。

about_Return

退出当前作用域,它可以是函数、脚本或脚本块。

about_Run_With_PowerShell

说明如何使用“使用 PowerShell 运行”功能运行某个脚本,方法是在文件资源管理器中右键单击其条目。

about_Scheduled_Jobs

介绍计划作业并说明如何在 Windows PowerShell 和任务计划程序中使用和管理计划作业。

about_Scheduled_Jobs_Basics

说明如何创建和管理计划作业。

about_Scheduled_Jobs_Advanced

说明高级计划作业主题,包括构成计划作业的基础的文件结构。

about_Scheduled_Jobs_Troubleshooting

说明如何解决计划作业中的问题。

about_Scopes

说明如何在 Windows PowerShell 中设置和更改函数和变量的作用域。

about_Script_Blocks

说明如何使用脚本块将表达式、语句和命令合并到单个代码块中。

about_Script_Internationalization

介绍使脚本轻松使用为 Windows 所选的语言显示用户消息的功能。

about_Scripts

说明如何在 Windows PowerShell 中编写和运行脚本。

about_Session_Configurations

介绍会话配置,用于确定可远程连接到计算机的用户以及他们可以运行的命令。

about_Session_Configuration_Files

介绍会话配置文件,用于定义使用会话配置的会话的环境。

about_Signing

介绍 Windows PowerShell 执行策略、说明如何管理它们,并说明如何对脚本进行签名以使它们符合执行策略。

about_Special_Characters

介绍 Windows PowerShell 中的特殊字符。

about_Splatting

介绍如何在 Windows PowerShell 中使用展开将参数传递给命令。

about_Split

介绍 Split 运算符,用于将字符串拆分为子字符串。

about_Switch

说明如何使用交换语句替换多个 If 语句。

Switch 语句具有以下格式:

Switch (<test-value>) 
{ 
    <condition> {<action>} 
    <condition> {<action>} 
}

about_Throw

介绍 Throw 关键字,用于生成终止错误。

about_Transactions

说明如何在 Windows PowerShell 中管理事务处理操作。

about_Trap

介绍 Trap 关键字,用于处理终止错误。

about_Try_Catch_Finally

脚本中的错误处理使用 Try、Catch 和 Finally 脚本块完成。

about_Type_Operators

介绍使用 .NET 类型的运算符。

about_Types.ps1xml

介绍 Types.ps1xml 文件,此文件使你扩展在 Windows PowerShell 中使用的对象的 .NET 类型。

about_Updatable_Help

介绍 Windows PowerShell 中的可更新帮助系统。

about_Variables

说明 Windows PowerShell 中的变量类型的概述主题。

about_While

介绍 Windows PowerShell 中的 While 循环。

While 语句语法:

while (<condition>)
{
    <statement list>
}

about_Wildcards

说明如何在 Windows PowerShell 中使用通配符 (*)。

about_Windows_PowerShell_4.0

介绍 Windows PowerShell 4.0 的新增功能和更改。

about_Windows_PowerShell_ISE

介绍 Windows PowerShell® 集成脚本环境 (ISE)。

about_Workflows

提供对 Windows PowerShell 工作流功能的简短介绍。

about_WorkflowCommonParameters

介绍对所有 Windows PowerShell 工作流命令有效的参数。

about_WMI

介绍 Windows Management Instrumentation (WMI),它是 Microsoft 的基于 Web 的企业管理 (WBEM) 行业标准的实现。

about_WMI_Cmdlets

提供有关 Windows Management Instrumentation (WMI) 和 Windows PowerShell 的背景信息。

about_WQL

介绍 WMI 查询语言 (WQL),可用于获取 Windows PowerShell 中的 WMI 对象。

about_WS-Management_Cmdlets

介绍 Microsoft.WsMan.Management 模块中的 cmdlet。说明如何使用它们一起管理 WS-Management 功能,包括 WSMan 提供程序驱动器。

原文地址:https://www.cnblogs.com/alex-bn-lee/p/5069294.html