АК
Size: a a a
АК
UE
$a = 1..10000
$a[100] = @{ewgw="lololo"}
MO
PS > $x = 'x'
PS > $times = '100000000000000'
PS > $times = [long] $times
PS > $x*$times
InvalidArgument: Cannot convert value "100000000000000" to type "System.Int32".
Error: "Value was either too large or too small for an Int32."
PS > $times.GetType().name
Int64
4
4
4
4
UE
4
MO
PS > $x = 'x'
PS > $times = '100000000000000'
PS > $times = [long] $times
PS > $x*$times
InvalidArgument: Cannot convert value "100000000000000" to type "System.Int32".
Error: "Value was either too large or too small for an Int32."
PS > $times.GetType().name
Int64
UE
HH
PS > $x = 'x'
PS > $times = '100000000000000'
PS > $times = [long] $times
# var $times now Int64.
PS > $x*$times #want to repeat $x (string) $times.
#Actual error: Question: What the hell powershell tries to type cast to Int32 datatype #type? It should be int64 right? Because $times datatype long (int64)
InvalidArgument: Cannot convert value "100000000000000" to type "System.Int32".
Error: "Value was either too large or too small for an Int32."
PS > $times.GetType().name
Int64
4
4
MO
PS > $x = 'x'
PS > $times = '100000000000000'
PS > $times = [long] $times
# var $times now Int64.
PS > $x*$times #want to repeat $x (string) $times.
#Actual error: Question: What the hell powershell tries to type cast to Int32 datatype #type? It should be int64 right? Because $times datatype long (int64)
InvalidArgument: Cannot convert value "100000000000000" to type "System.Int32".
Error: "Value was either too large or too small for an Int32."
PS > $times.GetType().name
Int64
4