Link to home
Start Free TrialLog in
Avatar of jackjohnson44
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?
Avatar of LindyS
LindyS
Flag of United States of America image

There are no commands in powershell or the Quest snapin that match that.
Could it be a function added to your profile?
Type into your Powershell console the following:

Notepad $profile

and see if it's built in like LindyS is saying.

DH
Avatar of Brent Challis
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.CurrentUserAllHosts
$PROFILE.CurrentUserCurrentHost
$PROFILE.AllUsersAllHosts
$PROFILE.AllUsersCurrentHost

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
Avatar of Brent Challis
Brent Challis
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