什么是Microsoft Powershell? 如何自动执行任务?

PowerShell is a task automation and configuration management provided by Microsoft for Windows Operating systems. Powershell provides interactive shell for issuing commands. Powershell platform also provides scripting language.

PowerShell是Microsoft为Windows操作系统提供的任务自动化和配置管理。 Powershell提供了用于发布命令的交互式外壳。 Powershell平台还提供脚本语言。

Powershell have access to the underlying operating system components like COM , WMI WS-Management etc. Powershell is developed in .Net framework.

Powershell可以访问诸如COMWMI WS-Management等底层操作系统组件。Powershell是在.Net框架中开发的。

版本号 (Versions)

Powershell started developing in 2003 but it takes some time to release first version.

Powershell于2003年开始开发,但是发布第一版需要一些时间。

PowerShell 1.0 (PowerShell 1.0)

First version released in 2006 and supported operating systems are

2006年发布的第一个版本和受支持的操作系统是

  • Windows XP SP2,

    Windows XP SP2,
  • Windows Server 2003 SP1,

    Windows Server 2003 SP1,
  • Windows Vista

    Windows Vista

Powershell 2.0 (Powershell 2.0)

Powershell 2.0 is integrated with Windows 7 and Windows Server 2008 R2 . The following new features are added to the v2

Powershell 2.0与Windows 7和Windows Server 2008 R2集成在一起。 v2中添加了以下新功能

  • Powershell Remoting will enabled scripts and cmdlets to run remote systems

    Powershell Remoting将使脚本和cmdlet能够运行远程系统

  • Background Jobs allow run scripts asynchronously

    Background Jobs允许异步运行脚本

  • Transactions will added and can be used for write operations like registry

    Transactions将被添加,并可用于注册表之类的写操作

  • Modules are used to organize scripts and script files in a name space manner.

    Modules用于以命名空间的方式组织脚本和脚本文件。

  • Script Debugging is used to trouble shot scripts while running

    Script Debugging用于在运行时对拍摄的脚本进行故障排除

  • Eventing is an other useful feature used to listening, forwarding management and system events

    Eventing是另一个有用的功能,用于侦听,转发管理和系统事件

  • Integrate Scripting Environment is a tool used to write, run and debug Powershell scripts.

    Integrate Scripting Environment是用于编写,运行和调试Powershell脚本的工具。

  • Network File transfer can transfer files to remote systems.

    Network File transfer可以将文件传输到远程系统。

Powershell 3.0 (Powershell 3.0)

Powershell version 3 is integrated to the Windows 8 and Windows Server 2012 and following features are added

Powershell版本3已集成到Windows 8和Windows Server 2012中,并添加了以下功能

  • Scheduled Jobs is very useful feature added in this version

    Scheduled Jobs是此版本中添加的非常有用的功能

  • Code Completion is used to auto complete or suggest commands

    Code Completion用于自动完成或建议命令

Powershell 4.0(Powershell 4.0)

Version 4.0 comes with Windows 8.1 and Windows Server 2012 R2

Windows 8.1和Windows Server 2012 R2随附版本4.0

  • Desired State Configuration allow to specify end configuration of a service

    Desired State Configuration允许指定服务的最终配置

  • Where and ForEach keywords for loops

    WhereForEach循环关键字

LEARN MORE  How To Create phpinfo Pages?
了解更多如何创建phpinfo页面?

Powershell 5.0 (Powershell 5.0)

Version 5 have following features

版本5具有以下功能

  • Class Definition will enable more complex data structure creation

    Class Definition将使创建更复杂的数据结构成为可能

  • Enumeration is used to foreach in array like structures

    Enumeration用于在类似数组的结构中进行传授

Cmdlet(Cmdlet)

Cmdlet or commandlets are specialized commands to implements specific functions. Cmdlet uses Verb-Noun pattern for naming. For example Get-ChildItem express cmdlet function with verb Get and noun ChildItem .

Cmdlet或Commandlet是用于实现特定功能的专用命令。 Cmdlet使用动词名词模式进行命名。 例如, Get-ChildItem使用动词Get和名词ChildItem表达cmdlet函数。

Cmdlet
Cmdlet
Cmdlet

集成Shell环境ISE (Integrate Shell Environment ISE)

ISE is simple tool provided by Powershell to develop, run, debug Powershell scripts. It provides existing cmdlets help and auto completion to easy Powershell development job.

ISE是Powershell提供的用于开发,运行,调试Powershell脚本的简单工具。 它提供现有的cmdlet帮助和自动完成功能,以简化Powershell开发工作。

Powershell ISE
Powershell ISE
Powershell ISE

翻译自: https://www.poftut.com/microsoft-powershell-can-automate-tasks/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值