Hi everyone,
i looked through many tips how to convert from System.Object to Int32/Double to perform calculation. But it always ends up with:
[DBG]: PS C:\Users\psuser>>
Method invocation failed because [System.Object[]] doesn't contain a method named 'op_Multiply'.
At C:\scripts\Yo.ps1:12 char:5
+ $QWarning = $QProhibitSend*0,9
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (op_Multiply:String) [], RuntimeException
+ FullyQualifiedErrorId : MethodNotFound
Script:
$QuotaGroups = Get-ADGroup -SearchBase $QuotaOU -filter {GroupCategory -eq "Distribution"} -Properties * | select-object Name,Description
ForEach ($QuotaGroup in $Quotagroups)
{
[int]$QProhibitSend = $QuotaGroup.Description
$QWarning = $QProhibitSend*0,9
}
Can anyone advise?
Regards Stephan
OneDrive / Sharepoint Blog