Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


What type of tasks are you currently using PowerShell for?

 
Logged in as: Guest
arrSession:exec spGetSession 2,5,42271
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> Windows PowerShell >> What type of tasks are you currently using PowerShell for?
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 What type of tasks are you currently using PowerShell for? - 1/20/2007 5:37:23 PM   
  dm_4ever


Posts: 1944
Score: 30
Joined: 6/29/2006
From: Orange County, California
Status: offline
I am just wondering what type of tasks any of you may be using or have used PowerShell for?  You do not need to post any working examples; just describe the type of tasks you may be using it for.  For those that may advise me to pick up a book, I have put in an order for "Microsoft Windows PowerShell: TFM" by Don Jones & Jeffrey Hicks (SapienScripter) and the other is "Windows Powershell in Action" by Bruce Payette.


_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm
 
 
Post #: 1
 
 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

(in reply to dm_4ever)
 
 
Post #: 2
 
 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

(in reply to SAPIENScripter)
 
 
Post #: 3
 
 RE: What type of tasks are you currently using PowerShe... - 1/25/2007 6:21:13 AM   
  dm_4ever


Posts: 1944
Score: 30
Joined: 6/29/2006
From: Orange County, California
Status: offline
Thanks ziminski, this is in line to what I was wondering.  Any others?

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to ziminski)
 
 
Post #: 4
 
 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

(in reply to ziminski)
 
 
Post #: 5
 
 RE: What type of tasks are you currently using PowerShe... - 7/13/2007 1:35:05 AM   
  ebgreen


Posts: 4411
Score: 29
Joined: 7/12/2005
Status: offline
Is the Strings property new in Vista. I am not familiar with that property in XP.

_____________________________

"... 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

(in reply to wolfmandragon)
 
 
Post #: 6
 
 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.

(in reply to ebgreen)
 
 
Post #: 7
 
 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

(in reply to wolfmandragon)
 
 
Post #: 8
 
 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.

(in reply to ebgreen)
 
 
Post #: 9
 
 RE: What type of tasks are you currently using PowerShe... - 7/13/2007 7:36:27 AM   
  ebgreen


Posts: 4411
Score: 29
Joined: 7/12/2005
Status: offline
What specifically is not there that you can get from logparser?

_____________________________

"... 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

(in reply to wolfmandragon)
 
 
Post #: 10
 
 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.

(in reply to ebgreen)
 
 
Post #: 11
 
 RE: What type of tasks are you currently using PowerShe... - 7/16/2007 1:30:37 AM   
  ebgreen


Posts: 4411
Score: 29
Joined: 7/12/2005
Status: offline
I think the .Message property of the Event object in PS will give you the same info as the Strings from logparser.

_____________________________

"... 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

(in reply to dm_4ever)
 
 
Post #: 12
 
 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.

(in reply to ebgreen)
 
 
Post #: 13
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> Windows PowerShell >> What type of tasks are you currently using PowerShell for? Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts