< Back

Add-CoaWriteToLog

Mon Jan 13, 2020 3:53 am

NAME Add-CoaWriteToLog



SYNOPSIS

Logs the events of New and Set verbs to a file.





SYNTAX

Add-CoaWriteToLog [[-writeTo] <String>] [[-logCode] <String>] [[-FilePath] <String>] [-FileName] <String>

[<CommonParameters>]





DESCRIPTION

Changes happen with new or set verbs. This module logs those changes to a file.





PARAMETERS

-writeTo <String>

Logs the event.



Required? false

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-logCode <String>

Logs the COA custom status code: Success, Error



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-FilePath <String>

The location of the text log file. Include the last backslash when writing.



Required? false

Position? 3

Default value C:\\Logs\\

Accept pipeline input? false

Accept wildcard characters? false



-FileName <String>

The descriptive name of the log file. Do not include the file extenstion. It will be a .log.



Required? true

Position? 4

Default value noNameLog

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\># Write data to the log file



Add-CoaWriteToLog -writeTo "Logged an example line." -logCode "Success" -FilePath

"\\\\Its01\\deptfiles\\Its\\EmailTeam\\Logs\\" -FileName "exampleLog"











RELATED LINKS