quinta-feira, 26 de setembro de 2019

Powershell - Script standard

Header Template

<#
.SYNOPSIS
    This script gets check ...

.DESCRIPTION
    This script get a list ...
 
.PARAMETER
    Not Applicable

.INPUTS
    Setup the follow variables:

.OUTPUTS
    Script will show the status of each server.

    $ServerInfoList variable has all the info of the servers.

.NOTES
    Version:        6.0
    Author:         Alex Mattar
    Creation Date:  September 20, 2019
    Purpose/Change: Initial script development

.EXAMPLE
    Not Available
#>

Region

#region Variables
#endregion Variables

Script Folder

$scriptPath = split-path -parent $MyInvocation.MyCommand.Definition

Current Dir

$CurrentDir = $(get-location).Path

Server Name

$Servername = $env:COMPUTERNAME

Today date

$Today = Get-Date -Format "yyyyMMdd"

Get a specific date

$FromDateLog = Get-Date -Year 2019 -Month 8 -Day 1 -Hour 0 -Minute 0 -Second 0

Nenhum comentário:

Postar um comentário