Using the command below, I am able to get the value of a group policy setting:
secedit.exe /export /cfg C:\test\secedit.txt && type C:\test\secedit.txt | findstr "SeEnableDelegationPrivilege"
I need to be able to use the same command on PowerShell and I am having issues converting the && statement to work on PowerShell. I tried using this format () -and (), however, that has not worked, does anyone know a way of getting the && statement to work on PS?
&&and||, the pipeline-chaining operators - see this answer. In earlier versions, notably in Windows PowerShell, you can emulatea && bwitha; if ($?) { b }anda || bwitha; if (-not $?) { b }- see this answer