随笔分类 -  PowerShell

摘要:1 下载安装Emacs windows版本 2 下载el文件和配置Emacs加载PowerShell 3 体验用Emacs来执行和编辑PowerShell脚本 阅读全文
posted @ 2013-09-04 22:14 风影极光 阅读(2720) 评论(0) 推荐(2) 编辑
摘要:我在访问ps1文件的时候,一定要注意访问路径中是否包含空格。包含空格要用单引号''来处理。PowerShell -command Set-ExecutionPolicy "Bypass"set filepath= '%CD%\AppDeployment.ps1'PowerShell -command "& %filepath%"Pause错误的写法:PS C:\> C:\Documents and Settings\Mingle\My Documents\PS\test.ps1The term 'C: 阅读全文
posted @ 2013-04-17 12:55 风影极光 阅读(3133) 评论(0) 推荐(0) 编辑
摘要:View Code 1 Add-PSSnapin Microsoft.SharePoint.PowerShell -EA SilentlyContinue 2 $serviceApplicationPool="Secure Store Service Pool" #name of the application pool under which the application should run 3 $secureStoreDatabaseName="GMAxSecureStoreServiceDB" #the sharepoint database 阅读全文
posted @ 2012-03-05 14:27 风影极光 阅读(262) 评论(0) 推荐(0) 编辑
摘要:<Users><Name>$user</Name><Gender>Male</Gender></Users>View Code # D:\Services\ 指定要递归遍历查找的目录 # *.config 找查找的文件名 $fileList = Get-ChildItem 'F:\temp\test\' -recurse *.xml | %{$_.FullName}$baishi = {$user}Foreach($file in $fileList){ # $tmpXML = [xml](Get-Cont 阅读全文
posted @ 2012-02-14 00:22 风影极光 阅读(1646) 评论(0) 推荐(0) 编辑
摘要:持续更新! 阅读全文
posted @ 2012-01-05 00:14 风影极光 阅读(211) 评论(0) 推荐(0) 编辑
摘要:Get-Help Set-Variable -Param Scope-scope <string>Specifies the scope from which aliases should be exported. This can be a named scope: "global", "local", or "script", or it can be a number relative to the current scope (0 through the number of scopes where 0 is th 阅读全文
posted @ 2012-01-04 16:26 风影极光 阅读(626) 评论(0) 推荐(0) 编辑
摘要:搭建环境:Win7和Win2008中自带有PowerShell 2.0,在命令中输入powershell即可。http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=20430使用Windows PowerShell ISE编写代码,用户体验跟写c#代码很像。在运行命令中输入powershell_ise,即可。第三方开发工具:PowerGUI.3.1.0.2058.msi,提供智能感知功能。常用快捷键:保存ps文件后可以按F9启动调试F10跳跃调试F11单步调试get-command *uninstall 阅读全文
posted @ 2011-08-29 14:43 风影极光 阅读(709) 评论(0) 推荐(0) 编辑