Login | |
|
 |
RE: What type of tasks are you currently using PowerShe... - 1/22/2007 12:57:33 AM
|
|
 |
|
| |
SAPIENScripter
Posts: 261
Score: 2
Joined: 11/1/2006
From: SAPIEN Technologies
Status: offline
|
I might approach this question from another angle. What tasks are you automating now? Of those tasks, which do you think could be better or aren't as effective as you'd like them to be? Certainly, just about anything WMI related you can do in PowerShell plus you get the benefit of a number of formatting and output options that were too cumbersome in VBScript. Post what you're doing now and I'll add my 2 cents about what PowerShell has to offer or if you should keep what you have. As has been discussed elsewhere, PowerShell is not a 1 size fits all tool. PS I hope you like the book. I have a chapter all about different management tasks you can do with PowerShell. Really just enough to pique your curiosity but with practical code.
_____________________________
Jeffery Hicks Windows PowerShell MVP SAPIEN Technologies - Scripting, Simplified. www.SAPIEN.com
|
|
| |
|
|
|
 |
RE: What type of tasks are you currently using PowerShe... - 1/24/2007 4:41:22 AM
|
|
 |
|
| |
ziminski
Posts: 79
Score: 2
Joined: 1/8/2006
Status: offline
|
I have a tendacy to write a script for anything that I have to do more than once. Some are scheduled tasks and some run on command. With that said I have converted some my scripts to PS. I guess if I had to categorize them it would be like so: Check server status Check services status Check process status report conditions of ... AD , disk space, cpu, mem ..... Move files & backup data Db queries for reports Checking Unix servers for availablity and services! User maintance create, add grp, chg grp, delete ..... Event log check for failed logins (written in PS works nicely!) Hardware inventory Obviously the above depends on type of servers,services,& process ( I monitor a few systems). I usually end up e-mailing results or ftping them some where. PS does have some nice and helpfull out-put and can easily utilize excel. I believe in being a proactive admin, rather than reacting and having to but out fires. Being an effective admin requires using a multitude of tools and what ever works best for the job, use it! Right now I am only using PS from my main workstation, so that I can learn it. In the future releases of Windows & servers it will be an advantage knowing it ( might even be necessary). Any way that's my two cents worth, Rick
|
|
| |
|
|
|
 |
RE: What type of tasks are you currently using PowerShe... - 7/13/2007 1:19:25 AM
|
|
 |
|
| |
wolfmandragon
Posts: 13
Score: 0
Joined: 7/13/2007
Status: offline
|
quote:
ORIGINAL: ziminski I have a tendacy to write a script for anything that I have to do more than once. Some are scheduled tasks and some run on command. ..... Event log check for failed logins (written in PS works nicely!) .... Rick I have been building a script to parse and strip Vista EventLogs. I am wanting to pull the timestamp, eventID, and string from the event log. I can do this with LogParser with this query. logparser "SELECTTimeGenerated, EventID, Strings INTO tempReport2.xml FROM security WHERE EventID=4624" -ResolveSIDs:ON The query that I am working with in Powershell does not pull the string. Any help on what I can do to pull the string data out? $SysEvent = get-EventLog -logname security $SysError = $SysEvent | where {$_.EventID –eq “4624”} $SysError | Format-Table EventID, TimeWritten, Strings –auto Thanks Mark
|
|
| |
|
|
|
 |
RE: What type of tasks are you currently using PowerShe... - 7/13/2007 5:28:36 AM
|
|
 |
|
| |
wolfmandragon
Posts: 13
Score: 0
Joined: 7/13/2007
Status: offline
|
I did some more research and it looks like the strings query in logparser is input type EVT. After enlisting the help of some coworkers, we have come to the conclusion that strings are logparser way of saying pull out the descriptors of the event log. Now that we are on the same page, what I am looking to pull from the event logs with Powershell is the descriptors such as user, IP source, process name etc. Your question has changed the way I am approaching my project. Thank you.
_____________________________
The Eyes of the Wolf is the Raven; The Ravens Teeth, the Wolf.
|
|
| |
|
|
|
 |
RE: What type of tasks are you currently using PowerShe... - 7/13/2007 5:33:42 AM
|
|
 |
|
| |
ebgreen
Posts: 4411
Score: 29
Joined: 7/12/2005
Status: offline
|
If I understand what you are trying to do, try running this command: Get-EventLog -log security | Select-Object -first 1 | Get-Member | where {$_.MemberType -eq "Property"} Then you will be able to see what properties are available.
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: What type of tasks are you currently using PowerShe... - 7/13/2007 7:12:36 AM
|
|
 |
|
| |
wolfmandragon
Posts: 13
Score: 0
Joined: 7/13/2007
Status: offline
|
I had found most of those properties, there were a couple that I was unaware of .None of those properties extract all the info I need. Looks like that I will be stuck running logparser out of Powershell. I will keep the query script on hand as that I am sure that it will come in useful.
_____________________________
The Eyes of the Wolf is the Raven; The Ravens Teeth, the Wolf.
|
|
| |
|
|
|
 |
RE: What type of tasks are you currently using PowerShe... - 7/16/2007 12:49:13 AM
|
|
 |
|
| |
wolfmandragon
Posts: 13
Score: 0
Joined: 7/13/2007
Status: offline
|
Domain/workstation/user logonID/Logon Type Source IP
_____________________________
The Eyes of the Wolf is the Raven; The Ravens Teeth, the Wolf.
|
|
| |
|
|
|
 |
RE: What type of tasks are you currently using PowerShe... - 7/16/2007 2:15:21 AM
|
|
 |
|
| |
wolfmandragon
Posts: 13
Score: 0
Joined: 7/13/2007
Status: offline
|
The Vista EventIDs are different than XP. I was getting "the description for event 'x' is not found". At this point I was ignoring the rest of the message. I turned text wrapping on and there she sat. Thank you very much. Mark
_____________________________
The Eyes of the Wolf is the Raven; The Ravens Teeth, the Wolf.
|
|
| |
|
|
|
|
|