Hello有人可以帮我隐藏Get-WMIobject查询的输出。试过out-null但我以后无法使用的参数
$CurrentPageFileC = (Get-WmiObject -computername $server -Namespace root\CIMV2 -Query "select * from Win32_PageFileSetting where name='c:\\pagefile.sys'") | out-null
$CurrentPageFileC.InitialSize = 4096
$CurrentPageFileC.MaximumSize = 4096
$CurrentPageFileC.put()
答案 0 :(得分:0)
对不起,我错了,在错误的地方插入了out-null .. :)
$CurrentPageFileC = (Get-WmiObject -computername $server -Namespace root\CIMV2 -Query "select * from Win32_PageFileSetting where name='c:\\pagefile.sys'")
$CurrentPageFileC.InitialSize = 4096
$CurrentPageFileC.MaximumSize = 4096
$CurrentPageFileC.put() |out-null