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

Popular posts from this blog

Motherboard replacement

Remote Desktop App - Error 0x207 or 0x607

AD Replication Failure Between Server 2008 R2 and Server 2003 - LDAP bind failed with error 8341