我正尝试使用存储在UNCpath上的定义更新Windows Defender(在Win 10上)。
我正在设置像这样的mpam-fe.exe文件的path
Set-MpPreference -SignatureDefinitionUpdateFileSharesSources \\path\to\mpam.exe
然后我运行Get-MpPreference来validationpath是否已设置(是)。 一旦我确认path是正确的SignatureDefinitionUpdateFileSharesSources我运行
Update-MpSignature -UpdateSource FileShares
我马上得到错误
Update-MpSignature : Virus and spyware definitions update was completed with errors. At line:1 char:1 + Update-MpSignature -UpdateSource FileShares + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (MSFT_MpSignature:ROOT\Microsoft\...SFT_MpSignature) [Update-MpSignature], CimException + FullyQualifiedErrorId : HRESULT 0x80070002,Update-MpSignature
这个故障几乎立即发生。 只是为了validation特定的powershell实例可以访问文件共享问题 – 我只是执行了mpam-fe.exe文件,它的工作。
我从来没有这样做过,但是你的问题让我好奇,我开始做一些testing。 我能够重现你的问题。 很明显,没有多less人这样做,因为互联网上没有关于如何做到这一点的连贯信息。 所以,你没有任何意外。
所以,这是我使用Process Monitor时发现的。 我能够成功地让Defender从文件源更新。
mpam-fe.exe , mpam-d.exe和nis_full.exe 。 我试图使用只是mpam-fe.exe ,它失败了。 Update-MPSignature命令时,它希望在源path中的x64或x86文件夹下find更新。 所以,您需要在源path下创build额外的文件夹,并将更新文件放在那里。 domain computers , Everyone人和Anonymous 。 没有工作。 每次访问被拒绝都会失败。 当我将这些文件放在没有安全限制的NAS上时,我只能使用它。 这里有一个脚本,可以帮助下载更新包: https : //www.powershellgallery.com/packages/SignatureDownloadCustomTask/1.4/DisplayScript
以下是我用来使其工作的其他参考: https : //technet.microsoft.com/en-us/itpro/powershell/windows/defender/update-mpsignature?f=255&MSPPError=-2147217396
https://technet.microsoft.com/en-us/itpro/powershell/windows/defender/set-mppreference
如何授予对LocalSystem帐户的networking访问权限?
Appleoddity的答案给你所需要的一切。 一些警告,但;
所以基本上,当你使用Appleoddity的指南来解决这个问题时,一定不要单靠PowerShell和Update-MpSignature来testing你正在做什么。 YMMV,但我的情况,我永远无法成功地运行Update-MpSignature。 我得出了一个结论:我已经设置了错误,但经过更多的testing后,我发现防御者本身没有更新,只有PowerShell有问题。
权限被拒绝消息是由对LogFile的拒绝访问引起的
C:\Windows\Temp\MpSigStub.log
在运行之前删除这个LogFile
Update-MpSignature -UpdateSource FileShares -Verbose