![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | [uint64] - [uint64] not defined This blows: 352# $v = [uint64]54 353# $v | gtn UInt64 354# $y = [uint64]454545454545 355# $y - $v The operation '[System.UInt64] - [System.UInt64]' is not defined. At line:1 char:5 + $y - <<<< $v I was trying to do some math on Win32_LogicalDisk (freespace and size). -- Keith |
My System Specs![]() |
| | #2 (permalink) |
| | Re: [uint64] - [uint64] not defined In message <#Yujd9RjHHA.2272@TK2MSFTNGP02.phx.gbl>, "Keith Hill [MVP]" <r_keith_hill@no.spam.thank.u.hotmail.com> writes >This blows: > >352# $v = [uint64]54 >353# $v | gtn >UInt64 >354# $y = [uint64]454545454545 >355# $y - $v >The operation '[System.UInt64] - [System.UInt64]' is not defined. >At line:1 char:5 >+ $y - <<<< $v > >I was trying to do some math on Win32_LogicalDisk (freespace and size). $y + $v returns: Cannot convert value "454545454545" to type "System.Int32". Error: "Value was either too large or too small for an Int32." At line:1 char: Bug?? -- Thomas Lee doctordns@gmail.com MVP - Admin Frameworks and Security |
My System Specs![]() |
| | #3 (permalink) |
| | Re: [uint64] - [uint64] not defined "Thomas Lee" <tfl@psp.co.uk> wrote in message news:gbcgMgPX3aOGFAn1@mail.psp.co.uk... > In message <#Yujd9RjHHA.2272@TK2MSFTNGP02.phx.gbl>, "Keith Hill [MVP]" > Cannot convert value "454545454545" to type "System.Int32". Error: "Value > was either too large or too small for an Int32." > At line:1 char: > > > Bug?? Or limitation. Either way I think it should be fixed. Someone already submitted this issue: https://connect.microsoft.com/feedba...4700&SiteID=99 so I voted on it. -- Keith |
My System Specs![]() |
| | #4 (permalink) |
| | RE: [uint64] - [uint64] not defined You can cast the (System.UInt64) WMI property into (System.Int64): [long]$a = (gwmi win32_logicaldisk -filter "Name='c:'").size -- Kiron |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Test if a variables is defined or not | .NET General | |||
| Check if user defined in SD | VB Script | |||
| nothing highly defined in HD | Graphic cards | |||
| How can I tell if a function is already defined? | PowerShell | |||
| UInt64 division | PowerShell | |||