本文目录
继续阅读分类目录归档:PowerShell
Windows PowerShell – 在 PowerShell 中编写 Windows 服务
Windows 服务通常就是编译的程序用 C、 c + +、 C# 或其他 Microsoft 基于.NET Framework 的语言,编写并调试此类服务可能会相当困难。在几个月前,通过允许编写服务作为简单的 shell 脚本,其他操作系统启发我开始想知道是否有可能会更简单的方法以及在 Windows 中,创建它们。
这篇文章介绍了此项工作成果的最终结果 ︰ 新颖简便的方法来创建 Windows 服务,通过在 Windows PowerShell 脚本语言中编写它们。没有更多的编译,就可以在任何系统上,而不仅仅是开发人员自己完成一个快速的编辑测试周期。
我提供一个称为 PSService.ps1,以便您可以创建并以分钟为单位,与只是记事本等文本编辑器中测试新的 Windows 服务的通用服务脚本模板。此技术可以保存任何人如想尝试使用 Windows 服务的很大的时间和开发工作量,或甚至提供针对 Windows 的实际服务时不考虑性能的关键因素。可以从下载 PSService.ps1 bit.ly/1Y0XRQB。 继续阅读
Simple HTTP api for Executing PowerShell Scripts
[Based on the feedback, I’ve renamed this to HTTP]
There may be scenarios where you don’t need the full interactive experience of PowerShell remoting over PSRP (PowerShell Remoting Protocol), or have the need to execute some PowerShell scripts from a non-Windows system. You could directly code against WS-Man as I’ve blogged about a long time ago, however, it’s quite complicated requiring knowledge of SOAP and WS-Man. In cases where you want to simply invoke a PowerShell script remotely, a REST api is a good choice since all modern programming languages make it simple to perform a HTTP GET operation. 继续阅读
PowerShell GUI ScripBlock Monitor Script
PowerShell GUI ScripBlock Monitor Script
I made a GUI script for monitoring PowerShell scriptblocks:
It will take and Interval in Seconds and it will show the result in a GUI datagrid, refreshed at the set interval
(by re-running the scriptBlock )
Standard if you start the Acript you get a process list refreshed every 30 seconds :
PowerShell签名和执行策略
Windows PowerShell 入门指南
Windows PowerShell™ 入门指南
Microsoft Corporation
发布日期:2006 年 9 月
摘要
Windows PowerShell™ 是专为系统管理员设计的新 Windows 命令行外壳程序。该外壳程序包括交互式提示和脚本环境,两者既可以独立使用也可以组合使用。
本文档旨在为新用户介绍 Windows PowerShell,以及使他们了解其基本功能。有关更详细的信息,请参阅“Windows PowerShell 入门”。 继续阅读