PoshCode Archive  Artifact [bf5a796850]

Artifact bf5a7968506a2e027b0dcb8fd84e8b085413698d84bb82adddbcbdc516d032d4:

  • File VerifyCategoryRule.ps1 — part of check-in [c370d94e07] at 2018-06-10 13:07:32 on branch trunk — From Windows PowerShell Cookbook (O’Reilly) by Lee Holmes (user: Lee Holmes size: 607)

# encoding: ascii
# api: powershell
# title: VerifyCategoryRule.ps1
# description: From Windows PowerShell Cookbook (O’Reilly) by Lee Holmes
# version: 0.1
# author: Lee Holmes
# license: CC0
# x-poshcode-id: 2227
# x-archived: 2016-03-18T21:32:16
# x-published: 2011-09-09T21:42:00
#
#
## From Windows PowerShell Cookbook (O'Reilly)
## by Lee Holmes (http://www.leeholmes.com/guide)

Set-StrictMode -Version Latest

if($message.Body -match "book")
{
    [Console]::WriteLine("This is a message about the book.")
}
else
{
    [Console]::WriteLine("This is an unknown message.")
}