

Select the option "Custom requirement" under select requirement and click on "OK".ĥ. Go to requirements and select the option "Always do host integrity checking" and click on "Add" under Host Integrity requirements.Ĥ. Create a new host integrity policy and add a policy name (Description).ģ. As a bonus specifically regarding removing SEP, here is a snippet from a production script used to remove Symantec Endpoint using MSIexec and the guid.2. As for building commands with arguments, I recommend splatting. You can read any of the never ending articles explaining why. I'd like to recommend you stop using the Win32_Product wmi class.

The other answers already answer your question of running powershell over CMD. + FullyQualifiedErrorId : InvokeMethodOnNull + CategoryInfo : InvalidOperation: (:), RuntimeException You cannot call a method on a null-valued expression. + FullyQualifiedErrorId : GetWMIManagementException, + CategoryInfo : InvalidArgument: (:), Management + (Get-WmiObject -Class Win32_Product -Filter Name='Symantec Endpoint P. Output: Get-WmiObject : Invalid query "select * from Win32_Product where Name=Symantec How I run it (cmd): powershell.exe -Command (Get-WmiObject -Class Win32_Product -Filter Name='Symantec Endpoint Protection' -ComputerName localhost. Powershell Command: (Get-WmiObject -Class Win32_Product -Filter "Name='Symantec Endpoint Protection'" -ComputerName localhost. but when i try to run if from cmd i get errors it worked when i run it directly from powershell. I'm trying to run this powershell command over cmd.
