search
top

How To Find A String in a File With PowerShell

Introduction So you have a need to have PowerShell to look for a string in a file and create and entry if it doesn’t find it and do nothing if it does.  For my example I am installing an application and I need to add three lines of content, but if it exists I do not want duplicate entries created. The Code There are probably other ways to achieve the goal, but my idea was to use Get-Content and read... read more

top
Life of a Geek Admin
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.