📅  最后修改于: 2022-03-11 14:59:23.694000             🧑  作者: Mango
$Path = (([Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $Server)).OpenSubKey("SYSTEM\CurrentControlSet\Control\Print\Printers")).GetValue("DefaultSpoolDirectory")
$Path = (Get-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Print\Printers").DefaultSpoolDirectory