27 May,2021 by Tom Collins
Question: I need to interrogate the module for a Powershell cmdlet but I can't find the actual physical location of the file on the host server. I can execute the cmd through the Powershell command line OK , but can't find the powershell cmd file. Is there a Powershell method of locating the Powershell module files?
Answer: There is a Powershell method to obtain the physical location of the modules . Check out the Get-Command cmdlet. There are different usages for this command , and one of the uses is to obtain information about another Powershell cmdlet
For example - if you'd like to find out extra information about the Invoke-SqlVulnerabilityAssessmentScan cmdlet , you would use :
Get-Command Invoke-SqlVulnerabilityAssessmentScan | fl *
This command would give you various categories of information - Helpfile, Version, modeule location,Options, Parameters ......
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |