jackjohnson44
asked on
powershell find location of commandlet
I have a commandlet called Log-Registrar and I am not sure where this is located on the server machine I am using. If I type log-r then press tab it will auto complete. How can I find the file that contains this command?
Type into your Powershell console the following:
Notepad $profile
and see if it's built in like LindyS is saying.
DH
Notepad $profile
and see if it's built in like LindyS is saying.
DH
If you run the following code you will get a list of all the profiles that are currently active as there are 4 possibilities.
$PROFILE.CurrentUserAllHos ts
$PROFILE.CurrentUserCurren tHost
$PROFILE.AllUsersAllHosts
$PROFILE.AllUsersCurrentHo st
The cmdlet you are looking for should be in one of the files listed.
Bear in mind, though, if there is an Import-Module cmdlet in any profile file, the cmdlet could be in the files in the module.
$PROFILE.CurrentUserAllHos
$PROFILE.CurrentUserCurren
$PROFILE.AllUsersAllHosts
$PROFILE.AllUsersCurrentHo
The cmdlet you are looking for should be in one of the files listed.
Bear in mind, though, if there is an Import-Module cmdlet in any profile file, the cmdlet could be in the files in the module.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Could it be a function added to your profile?