$LogFile = "C:\TEMP\deploy.log"
$Code = 'TEST'
$LastLines = Get-Content -path $LogFile | select -Last 30 | select-string $Code
Select-String : Cannot bind argument to parameter 'Path' because it is an empty string.
At line:1 char:36
+ $StringExist = Select-String -path $LastLines -pattern $SearchCode
+ ~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Select-String], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.Sele
ctStringCommand
Thank you
Best regards
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.