Functions by default have no write protection so they can easily be overwritten and redefined. You should do this if you'd like to make a function "read-only":
function ImportantFunction {
"You cannot overwrite me!"
}
(dir function:ImportantFunction).Options = 'ReadOnly'
ReTweet this Tip!
Posted
Dec 22 2009, 08:00 AM
by
ps1