随心笔谈
随心记录网事-锻炼心境-记录过往事迹
PowerShell中的加法运算详解(powershell while true)干货满满
大家已经PowerShell中的运算符有了一定感性的认识。我们首先来学习“+”运算符。PowerShell定义了“+”运算符处理数值类型、字符串类型、数组类型和哈...
PowerShell中的函数重载示例(powershell 函数调用)真没想到
在PowerShell中,我们可以使用Function关键字来定义一个函数,比如: Function Get-Data { Param ( ...
PowerShell中改变F1帮助文档命令获取方式为在线文档的方法(powershell script)居然可以这样
适用于PowerShell或者更高版本 从PowerShell 30开始,Powershell本身并没有捆绑帮助文档。用户得使用命令 Update-Help来更新PowerShell的...
PowerShell中实现混淆密码示例(powershell 解密)学到了
$cred=Get-Credential -Message 'Enter Domain\Username and Password' $pwd=$cred.Password $user=$cred.UserNa...
Powershell中定义常量的方法(windows powershell基本语法及常用命令)满满干货
支持所有版本。 通常变量是可变的,你可以修改他们,除非你使用的是一个常量。 可是这里没有这样的变...
Powershell中可以使用的.Net实用静态方法(powershell -enc)学到了吗
PS> [Math] | Get-Member -MemberType *Method -Static TypeName: System.Math Name ...
PowerShell中使用正则和ValidateSet验证参数合法性(正则表达式提取字段)干货满满
适用于PowerShell 2.0或着更高版本 当你使用PowerShell 创建了一个函数时,要确保你告诉PowerShell 你的参数期望什么样的值。比如你想用户...
PowerShell中使用PrintManagement管理打印机示例(powershell编程)新鲜出炉
PS> Get-Command -Module PrintManagement CommandType Name &n...
PowerShell中使用Get-Date获取日期时间并格式化输出的例子(powershell 密码加密)这样也行?
在PowerShell中有一个Get-Date的cmdlet,使用它可以直接返回当前的日期和时间。使用-Format参数可以返回当前的年、月、日、时、分、秒等。 ...
PowerShell中使用curl(Invoke-WebRequest)的方法教程(powershell new-item)学会了吗
前言 PowerShell能干什么呢?PowerShell首先是个Shell,定义好了一堆命令与操作系统,特别是与文件系统交互,能够启动应用程序,甚至操纵...