"c:\test.csv"考虑到将信息存储到另一个数组中,我添加了以$inactiveusers开头的行(总共4行)。但是,导出的CSV没有给出正确的结果,而是返回samAccountName的长度,而不是列出用户的samAccountName & lastlogon。此外,从那时起,我无法在另一个脚本中导出相同的变量,甚至脚本也很简单,如下所示:$inactiveusers | Ex
我的剧本有个问题:$remotefilehash = $remotefiles -replace '^[a-f0-9]{32}( )', '$0= ' | ConvertFrom-StringData这将创建一个哈希表。然后,我将这些散列与本地哈希集中的哈希进行比较。
# Create a hash set from the local hashes.$diffmd5 = $remotefilehash.