2015-07-10 16 views
0

您好有人可以幫我隱藏獲取-WmiObject可以查詢..輸出嘗試了空,但參數我不能夠使用後在使用外空的GET-WmiObject可以

$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

對不起,我錯了,插在了空在一個錯誤的地方.. :) – rpr

+0

爲何沒有隱瞞?或者你收到一個錯誤?這應該就足夠了:'$ CurrentPageFileC = Get-WmiObject -computername $ server -Namespace root \ CIMV2 -Query「select * from Win32_PageFileSetting where name ='c:\\ pagefile.sys'」' – Vesper

回答

0

對不起,我錯了,插在了空在一個錯誤的地方.. :)

$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 
相關問題