Powershell引号和转义字符单引号:任何情况下都只表示引号内自身的字符。输出:$a="World"<enter>‘Hello,$a’结果:Hello,$a双引号:允许进行变量代换和字符转义。输出:$a="World"<enter>"Hello,$a"结果:Hello,World输出单引号,双引号‘I‘’m$a’结果:I’m$a$a=..
分类:
系统相关 时间:
2015-04-27 23:55:00
阅读次数:
171
1 dir *.* -Recurse | Unblock-File
分类:
系统相关 时间:
2015-04-26 06:55:28
阅读次数:
143
1.PowerShell数组声明数组$strUsers=@("user1","user2","user3”)查看数组$strUsersPSC:\Users\Administrator>$strUsers[0]user1赋值$strUsers[1]="marui"重新查看数组元素PSC:\Users\Administrator>$strUsersuser1maruiuser3合并两个数组2.PowerShell哈希表哈希表,也就..
分类:
编程语言 时间:
2015-04-26 01:29:52
阅读次数:
204
PowerShell中的格式1.PowerShell中的对象和win平台下的面向对象概念一致,即指我们收集信息或者执行操作的行为。包括属性(信息,我们可以收集)和方法(我们可以执行)。有一个生动的例子——“灯泡”。对象是显而易见的,它是一个灯泡。一个灯泡的属性可能包括了其颜色,功率..
分类:
系统相关 时间:
2015-04-26 01:28:27
阅读次数:
285
首先,以管理员身份打开PowerShell。输入:get-process -includeusername | format-table -autosize显示如下:Handles WS(K) VM(M) CPU(s) Id UserName ...
分类:
系统相关 时间:
2015-04-24 18:20:49
阅读次数:
259
1.Powershell脚本运行的几种权限介绍Restricted——默认的设置,不允许任何script运行AllSigned——只能运行经过数字证书签名的scriptRemoteSigned——运行本地的script不需要数字签名,但是运行从网络上下载的script就必须要有数字签名Unrestricted——允许所有的script运行,..
分类:
系统相关 时间:
2015-04-24 16:58:56
阅读次数:
206
1.PowerShell控制台打开PowerShell,可以完成DOS,cmd等操作;显示如下界面:2.cmdlet命令它使用“动词-名词”命名的形式作为一个cmdlet命令查看当前powershell中的所有cmdlet命令:get-command列出所有Get-*开头的命令:get-command-VerbGet简单举例其他基本常用命令:get-help..
分类:
系统相关 时间:
2015-04-24 16:47:43
阅读次数:
194
#检查版本:# PowerShell script to display SharePoint products from the registry.Param( # decide on whether all the sub-components belonging to the product....
分类:
其他好文 时间:
2015-04-24 12:19:03
阅读次数:
144
问题描述:在WiX中需要判断某个站点是否存在,WiX没有这个能力,该怎么做呢?解决方案:解决方法就是写一个Custom Action来检测,实现的途径也有很多,现在想到了这么几个1)PowerShell 需要考虑操作系统的兼容性,只有Vista以上的操作系统才支持2)WMI3).net 提供的库以及...
分类:
其他好文 时间:
2015-04-24 12:06:53
阅读次数:
116
1.WhatisWindowsPowerShellWindowsPowerShellisanewWindowscommand-lineshelldesignedespeciallyforsystemadministrators.TheWindowsPowerShellincludesaninteractivepromptandascriptingenvironmentthatcanbeusedindependentlyorincombination.Unlikemostshells,whichacceptan..