随笔分类 -  Powershell in windows maintenance

摘要:此种情况,去掉前面的[String] 在里面操作的时候就会认为是string,并可以自动操作了,否则限定为String类型时,就无法将输入的a,b当作String了, 或者需要添加'a,b'单引号来变为string 阅读全文
posted @ 2016-04-12 17:09 calochCN 阅读(333) 评论(0) 推荐(0)
摘要:1. 参数赋值set a=bigfee2. 引用某变量的值使用 %变量名% 的形式就可以使用了,如我们要返回变量a的值只要输入echo %a%3. 在界面输入参数:set /p var=请输入用户名: //使用set进行设置变量,并使用/p参数让命令暂停运行,提供用户在cmd窗口输入变量的机会4. ... 阅读全文
posted @ 2016-01-07 15:33 calochCN 阅读(171) 评论(0) 推荐(0)
摘要:Windows PowerShell Exit CodesPSMDTAG:FAQ: How can my script control the PowerShell exit code?Answers:A normal termination will set the exitcode to 0An... 阅读全文
posted @ 2016-01-06 13:41 calochCN 阅读(799) 评论(0) 推荐(0)
摘要:The Windows PowerShell remoting features are supported by the WS-Management protocol and the Windows Remote Management (WinRM) service that implements... 阅读全文
posted @ 2016-01-06 12:16 calochCN 阅读(272) 评论(0) 推荐(0)
摘要:Powershell Remoting建立在windows WinRM服务之上,可以一对一或一对多远程控制,也可以建立HTTP 或 HTTPS的“listeners”,使用WS-MAM协议接收远程传递的命令。Windows 远程管理(WinRM)是 WS-Management 协议的 Microso... 阅读全文
posted @ 2016-01-06 12:02 calochCN 阅读(919) 评论(0) 推荐(0)
摘要://1.加载dll,调用winform窗体,使用指定构造函数param{$filePath=""}[void][reflection.assembly]::LoadFile($filePath)$a=New-Object namespace.classctor(args)$a.DoSth()分析,变... 阅读全文
posted @ 2015-10-17 02:44 calochCN 阅读(500) 评论(0) 推荐(0)