Posted On August 15, 2019

PowerShell: Quick 1-Liner to Locate Path to Executable

kimconnect 0 comments
blog.KimConnect.com >> Windows >> PowerShell: Quick 1-Liner to Locate Path to Executable
PS C:\Users\tester> (get-command robocopy.exe) | select Definition

Definition
----------
C:\Program Files (x86)\Windows Resource Kits\Tools\robocopy.exe
C:\Windows\system32\Robocopy.exe

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

PowerShell: Kill a Windows Service Forcefully

# killService.ps1 $serviceName='vmms' function killService($serviceName='Spooler',$restart=$false){ $processId=Get-WmiObject -Class Win32_Service -Filter "Name LIKE '$serviceName'"|Select-Object -ExpandProperty ProcessId if($processId.count…

SUBINACL and TAKEOWN

Change owner:subinacl /file C:\demofile.doc /setowner=SS64Dom\AliceTsubinacl /subdirectories "C:\Documents and Settings\USER\Desktop\FOLDER\*.*" /setowner=DOMAIN\USER

Setting Windows Security Auditing via Command Line

Please be advised that the follow auditpol cmdlet would be overridden by Group Policies in…