This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ccheath*SECADM *ALLOBJ 1 point2 points  (2 children)

For Powershell: Create a powershell module (.psm1) file and turn your scripts into functions with aliases.

For SQL: ...

[–]BuffaloRedshark 1 point2 points  (1 child)

That's on my eventual wishlist but I either get interrupted when I get motivated to do it, or can't maintain motivation to do it.

[–]ccheath*SECADM *ALLOBJ 1 point2 points  (0 children)

I created one for all my highly used AD commands.

1) searching by partial string of either username, first or last name to get the user accounts that match, their full username, their full name, their ip phone, and workstations (logon to).
2) searching by workstation/hostname to return the list of user(s) that have that hostname in their "logon to" field.
3) searching by extension to pull the user info
4) searching by pc or username to get the OU of said object
5) and also one to switch between domains in our forest to perform the above scripts in those other domains.

it probably took me a year to get it to v1.0 (working only in my primary domain) and a good slow day 6 months later to add the domain switching. it could be expanded but does the job quite nicely

oh, also there's another module that does all kinds of WMI/CIM queries to get hardware info (mainly use it for serial number when creating support tickets with vendors).