我怎样才能撤消这个命令

我怎样才能撤消这个命令

我最近在网站上看到一篇帖子,上面说按照解决方案操作,就可以修复你在 Windows 中的投射,但我照做了之后什么也没发生,现在我有个疑问,这是否是一种黑客行为?我该如何撤消它?

Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope LocalMachine -Force;
./sc config bthserv start= manual;./sc config DevQueryBroker start= manual;./sc config Audiosrv start= manual;
./sc config AudioEndpointBuilder start= manual;./sc config DeviceAssociationService start= manual;
./sc config DsmSvc start= manual;./sc config hidserv start= manual;./sc config BcastDVRUserService start= manual;
./sc config BluetoothUserService start= manual;./sc config CaptureService start= manual;
./sc config CDPUserSvc start= auto;./sc config DevicePickerUserSvc start= manual;
./sc config DevicesFlowUserSvc start= manual;./sc config MessagingService start= manual;
./sc config OneSyncSvc start= delayed-auto;./sc config PimIndexMaintenanceSvc start= manual;
./sc config PrintWorkflowUserSvc start= manual;./sc config UnistoreSvc start= manual;
./sc config UserDataSvc start= manual;./sc config WpnUserService start= manual;
./net start EventLog;./net start UsoSvc;./net start wuauserv;./net start AppXSvc;./net start BITS;./net start BFE;./net start MpsSvc;
./net start AppReadiness;./net start DcpSvc;./net start DevQueryBroker;./net start lfsvc;./net start NgcSvc;./net start NcbService;
./net start ScDeviceEnum;./net start SystemEventsBroker;./net start TimeBrokerSvc;./net start UserDataSvc;./net start UnistoreSvc;./net start ProfSvc;
Get-NetAdapterBinding | Enable-NetAdapterBinding -componentid "ms_rspndr";Get-NetAdapterBinding | Enable-NetAdapterBinding -componentid "ms_lltdio";
DISM /Online /Remove-Capability /CapabilityName:App.WirelessDisplay.Connect~~~~0.0.1.0;
DISM /Online /Add-Capability /CapabilityName:App.WirelessDisplay.Connect~~~~0.0.1.0;

我从这个网站给出了它: https://techcommunity.microsoft.com/t5/report-an-issue/windows-11-win-k-cast-no-longer-shows-all-bluetooth-devices/mp/2923989/highlight/true#M4275

答案1

该脚本做了很多不必要的事情,但特别是抑制了 PowerShell 脚本上的执行策略保护,并且将许多系统服务的启动条件更改为“手动”(因此它们不会随启动启动)。

这虽然不是极其有害的,但如此大范围的改变其实并没有什么帮助。

如果您已启用系统还原,我建议您回滚到执行此操作之前。更改太多,无法逐一撤消。

有关系统还原的更多信息,请参阅
如何创建还原点并回滚到上一个还原点

相关内容