< Back

Invoke-Arithmetic

Mon Jan 13, 2020 7:39 pm

NAME Invoke-Arithmetic



SYNOPSIS

Does simple arithmetic





SYNTAX

Invoke-Arithmetic [-Arithmetic] <ScriptBlock> [<CommonParameters>]





DESCRIPTION

Does simple arithmetic





PARAMETERS

-Arithmetic <ScriptBlock>

Simple arithmetic, like:

1+1

2*20

10/2

20-1



Required? true

Position? 1

Default value

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:\\>Invoke-Arithmetic { 1 + 1}













-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Invoke-Arithmetic { 10 %2 }















RELATED LINKS