Link to home
Start Free TrialLog in
Avatar of Lofty Worm
Lofty WormFlag for United States of America

asked on

Why is my Powershell command not working?

I want to search all the files, and replace a text with another piece of text;



PS C:\temp> dir *.rdp |foreach -process {(Get-Content $_.file) -replace ".edu", '.edu /admin' |set-content $_.file}
 
Get-Content : Cannot bind argument to parameter 'Path' because it is null.
At line:1 char:42

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Aard Vark
Aard Vark
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Lofty Worm

ASKER

AWESOME!
Thank YOU :)