Book now with code EOY2025
HeroPsycho wrote: » Don't have time to write it all out, but PoSh could do that. Basic logic of script would be something like: #list of computers you want to do this to... $computers = get-content computers.txt foreach ($computer in $computers){ get the contents of the current file logic to search for string and replace it variable for the new file to equal that altered version write the content over the old file on the file share } Something like that. Might be able to write it tonight.
wd40 wrote: » I remember we did it manually when we upgraded from 5 to 6.5 Scripting Guy is your friendhttp://www.microsoft.com/technet/scr...5/hey0208.mspx
Pash wrote: » id love to do it in powershell guys, but i cant, because none of my clients can run powershell (not allowed on the update lists yet). meaning i couldnt run this scripts "locally from the client" tbh this would be a perfect opportunity for it as well
Kaminsky wrote: » This is a great example of where unix simply powers over the MS OS. Simple push this through an awk filter.. practically a one liner.
HeroPsycho wrote: » I don't see anything in *nix comparable to PowerShell 2.0, which is due out with Win7/Server 2008 R2.
tiersten wrote: » It'd be a combination of tools but its had very good scripting for years now. SSH etc... + Perl/whatever.
Kaminsky wrote: » No harm in multi skilling.... take the tools where you can get them.
HeroPsycho wrote: » Don't get me wrong. Before PowerShell, Windows was abysmal compared to *nix in this department. PowerShell changed everything.
1. file named notes.ini has a line in it directory path of c:\temp\folder. 2. This line needs to be changed to directory path c:\program file\folder The line needs to remain where it is in the .ini file
# Script autoedit.txt var str content ; cat "notes.ini" > $content sal -c "^directory path of c:\temp\folder.^" "directory path c:\program file\folder" $content > null echo $content > autoedit.txt
script autoedit.txt
script "http://www.yoursite.com/scripts/autoedit.txt"
wd40 wrote: » Can you give us the final script, just in case if we need it in the future
Use code EOY2025 to receive $250 off your 2025 certification boot camp!