Can you Filter Get-Command to a single .ps1 file

Hello,

I would like to get all the functions in a single .ps1 file and was wondering if that is possible.

For example if I do the following, get-command -type function it will return ALL functions but I only want to return the ones is a specified .ps1 file

So something like get-command C:\WindowsPowerShell\my.ps1 -type function

I am pretty new to PowerShell so any help would be greatly appreciated.

Thanks,

September 11th, 2015 6:36pm

No. It only works on modules.

Free Windows Admin Tool Kit Click here and download it now
September 11th, 2015 7:15pm

I figured as much, thanks for confirming.
September 11th, 2015 8:04pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics