PowerShell is pretty cool so far, even if the remote capability requires some heavy scripting/.NET experience for now. I just found out today that I can actually write functions, put them into my profile file (%My Documents%\WindowsPowerShell\Microsoft.PowerShell_Profile.ps1), and have them load on start-up. This means my little function to start and stop remote services can be a simple one-line job and always preloaded, kinda like my own little command shell. Type $profile to make sure you have the right location. Mine is weird since I start mine with network admin privs as opposed to my normal workstation account.
Copyright (C) 2006 Microsoft Corporation. All rights reserved.
PS C:\Documents and Settings\mdickey> remoteservices
usage: RemoteServices [servername] [Stop|Start|Check|List|GetName] [service name]
2 thoughts on “use powershell as a real powered up shell”
Check out the Initializing Code section in this article:
You can put all of your functions into tiny files (called funtion1.ps1, function2.ps1, etc) and PowerShell will read them all in each time you start a session!
what did you use to learn powershell / what resources do you have now?
i read the original o’reilly monad book, and some of the new rough cuts on windows powershell look like they are going to be great.
i can’t get out of bash though usually. i think metasploit 3 is my new standard shell for windows. it would be nice to learn all of .NET through powershell (instead of having to learn ASP, C#, J#, or VB).
and i almost miss vbscript… NOT
Comments are closed.