[dba-Tech] Powershel script help

John Bartow jbartow at winhaven.net
Fri Apr 25 13:24:52 CDT 2014


I tried setting $remaining to an integer: 
$remaining = $xml.RegistrationConfig.DaysRemaining  -as [int]

But that didn't work. 

Paul's suggestion of setting the variable value to another variable defined
as integer worked out though: 
$remainingint = $remaining -as [int]

So either my syntax in the first attempt is incorrect or setting the
variable when pulling data from the xml field's data just doesn't work. I
sometimes, well most of the time, think in VB terms and PS isn't the same
animal.

John B



More information about the dba-Tech mailing list