答案 0 :(得分:0)
我解决了这个问题。您需要使用intellimirrorSCP对象类:
$directoryEntry = New-Object 'System.DirectoryServices.DirectoryEntry'
$directoryEntry.Path = $LdapPath
$searcher = New-Object 'System.DirectoryServices.DirectorySearcher'($directoryEntry)
$searcher.SearchScope = [System.DirectoryServices.SearchScope]::SubTree
$searcher.PageSize = [System.Int32]::MaxValue
$searcher.Filter = "(&(objectClass=intellimirrorSCP)(name='ServerNameHere-Remote-Installation-Services'))"
$result = $searcher.FindOne()
$directoryEntry = $result.GetDirectoryEntry()
$directoryEntry.Properties.netbootAnswerRequests[0] = $false
$directoryEntry.CommitChanges()