【发布时间】:2015-02-24 13:41:08
【问题描述】:
我想为名为@987654321@ 的变量分配一个空值,但它给了我错误。这是我的代码:
import-module activedirectory
$domain = "domain.example.com"
$dec = null
Get-ADComputer -Filter {Description -eq $dec}
【问题讨论】:
-
值为
$null。null如您所见,是一个错误。 -
那是因为它应该是
$null。我不敢相信最基本的搜索不会把它扔给你 -
我也试过@arco444,但没有成功。
-
如果使用
$null会出现什么错误? -
@arco444 我的搜索把我带到了这里。
标签: powershell scripting null