yanqiufang 发表于 2018-9-2 11:10:48

PowerShell-数组的多种录入方法

请输入阵列中数据长度: 4  
输入第一个计算机名: asdf
  
@{0="asdf";
  
"输入要增加的计算机名: ert
  
@{0="asdf";1="ert";
  
"输入要增加的计算机名: 2345
  
@{0="asdf";1="ert";2="2345";
  
"输入要增加的计算机名: gadf
  
@{0="asdf";1="ert";2="2345";3="gadf";
  
$arr=@{0="asdf";1="ert";2="2345";3="gadf";}
  

  
PS D:\> $arr=@{0="asdf";1="ert";2="2345";3="gadf";}
  

  
PS D:\> $arr
  

  
Name                           Value
  
----                           -----
  
3                              gadf
  
2                              2345
  
1                              ert
  
0                              asdf


页: [1]
查看完整版本: PowerShell-数组的多种录入方法