using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Management.Automation;
using System.Management.Automation.Runspaces;
using System.Text;
using System.Threading.Tasks;
namespace PSBook.Chapter2
{
[Cmdlet(VerbsCommunications.Write, "Hello")]
class SayHello : Cmdlet
{
protected override void ProcessRecord()
{
WriteObject("Hello,world");
}
}
/// <summary>
/// 定义module的基本信息,必须实现PSSnapIn
/// 指定在安装程序集时是否应调用 Visual Studio 自定义操作安装程序或 Installutil.exe
/// </summary>
///
[RunInstaller(true)]
public class PSBookChapter2MySnapIn:CustomPSSnapIn
{
private