All about Cloud & Powershell

Powershell ile Windows Event Viewer icine kendi loglarinizi yazdirin

Windows icinde yeni bir uygulama ya da script icin log yonetiminizi kendiniz yapabilirsiniz.

Bunun icin oncelikle Windows’un yeni bir log kaynagina igtiyaci bulunuyor ki bu kaynak sizin uygulamaniza ait olacak. Bunun icin asagidaki sekilde Windows Event deposuna yeni bir log girisi yapacagiz. Bu, sanki yeni bir defter acmak gibi dusunulebilir. Once defterimizi hazir edecegiz. Daha sonra ilgili olaylar bu ilgili deftere yazilacak.

$parametreler
= @{

LogName =
‘Yeni Uygulama’

Source =
‘Kaynak1’,‘Kaynak2’

}

New-EventLog
@parametreler

 

 

 

Simdi de deneysel bir log uretelim. Bunun icin de asagidaki kod birimini kullaniyoruz.

$parametreler
= @{

LogName =
‘Yeni Uygulama’

Source =
‘Kaynak1’

EntryType =
‘Information’

EventId =
9999

Message =
‘Test bilgi mesaji’

}

Write-EventLog
@parametreler

 

Bununla birlikte, 9999 eventID’sine sahip bir bilgi mesaji uretmis olduk.

Simdi bakalim Event Viewer’de ne olup bitmis?

 

Son derece basit degil mi?

Yazıyı Paylaş! These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Technorati
  • Twitter
BakiOnur ()

Microsoft Most Valuable Professional (MVP 2009,2010,2011,2012,2013,2014,2015,2016 Current) Towershell.com Founder clouderz.com Founder Microsoft Certified Trainer (10 years in a row, current) Onur has been working in IT arena with more than 15 years of experience specifically in Windows Server, Exchange Server and Powershell and for the past 5 years in Cloud Technologies including Office 365, Azure and so on. He's authored Windows Server books and written more than 400 technical articles published on several communities. Some of his hundreds of Powershell tools and scripts has been published on Microsoft Script Center. Onur is also a 10-year MCT who has delivered more than 10.000 hours of training in Microsoft technologies. He has been to over 70 universities and presented several Microsoft technologies with highlighted topics. He graduated from Okan University Graduate School in Computer Engineering. He lives in London and is currently running his own business at Clouderz Ltd.

Sosyal Medya

Visit Us On TwitterVisit Us On FacebookVisit Us On Linkedin
@BakiOnur 'u Takip Et

MVP Profili

Kategoriler

Arşiv

Soru ve Önerileriniz

Soru ve önerilerinizi buraya yazabilirsiniz

* Girilmesi zorunlu alanlar

Download