PoshCode Archive  Artifact [db0151ff93]

Artifact db0151ff939f4ce5dd1fc48830206bc342ac665443b18f2c388076c5f36e98d5:

  • File VerifyCategoryRule.ps1 — part of check-in [27f914d640] at 2018-06-10 13:14:34 on branch trunk — From Windows PowerShell Cookbook (O’Reilly) by Lee Holmes (user: SddrCErrR size: 606)

# encoding: ascii
# api: powershell
# title: VerifyCategoryRule.ps1
# description: From Windows PowerShell Cookbook (O’Reilly) by Lee Holmes
# version: 0.1
# author: SddrCErrR
# license: CC0
# x-poshcode-id: 2698
# x-archived: 2016-03-19T00:34:53
# x-published: 2012-05-27T11:48: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.")
}