Way to list all external
we have several powershell scripts large, , linked external scripts.
there way list of external .ps1 scripts reaches out to, can clean excess scripts lingering without breaking core script.
in other words, have bunch of scripts in directory. have man script, need see scripts in directory reaches out (which ones essential run), without deleting may use.
is there way run command against see files or other .ps1 files may invoke when running. rid of extra/unneeded files not accessed script.
this display lines contain string '.ps1' in mainscript.ps1
get-content mainscript.ps1 | select-string -pattern '.ps1' -simplematch
inspired heineken.
Windows Server > Windows PowerShell
Comments
Post a Comment