So I have a cmdlet named update-name that I have no access to change.
I have created a function named update-name (the same name as the cmdlet). How do I call the cmdlet from the function with the same name?
I've tried a few things and none of them seem to work.
function update-name {
param([string] something)
#call cmdlet update-name here
}
There is a way to do it when it is just functions:
$unBackup = 'DefaultUpdateName'
if(!(Test-Path Function:\$unBackup)) {
Rename-Item Function:\Update-Name $unBackup
}
function update-name {
& $unName
}
Unfortunately that doesn't work if it is a CmdLet.