📅  最后修改于: 2022-03-11 14:58:01.701000             🧑  作者: 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