'Powershell' Tag

  • PowerShell script to check hardware for remote computers

    January 9, 2011

    I wrote another simple PowerShell script which uses wmi queries to get information about remote computers’ memory, network, system and processor datas. Interface is very simple. It prompts you to type remote computer name.Please be aware about credential and firewall issues. Then you are choosing system, memory, processor or disk sections. As I mentioned before, more »

  • How to create PowerShell custom tables

    January 8, 2011

    You can display standard PowerShell output information or create custom tables. I mean, if you execute get-wmiobject command for Win32_PysicalMemory class; That’s the default design of output.But with select-object or format-table parameters you can filter for specific columns. Format-table filters for only speed and manufacturer columns. But what if you want to create your own more »

  • PowerShell Script to Check User SIDs

    January 7, 2011

    That’s a very simple script.I wrote this script for myself because in my Active Directory migration projects, SID is a important matter especially for cross forest migrations. With this GUI just select your domain on drop down menu and type username. Download

  • PowerShell Script to check updates for all domain controller computers

    January 7, 2011

    With the following script that I just wrote, you can select a domain computer and check for the specific update package . It creates a csv file on c: folder which includes all domain computers.So you must run this script with evaluated permissions. Also you must have required permission to connect other domain computers. Download more »

  • Export Domain Computers with Powershell

    January 7, 2011

    If you want to export all domain computers to a csv file , it’s very humble with powershell. Let’s see step by step. $strFilter = "(&(objectCategory=Computer))" First of all, you will attach computer filter for $strFilter variable.   $objDomain = New-Object System.DirectoryServices.DirectoryEntry   $objSearcher = New-Object System.DirectoryServices.DirectorySearcher Connect to Active Directory Searcher. $objSearcher.SearchRoot = $objDomain more »

  • How to create array with PowerShell

    January 6, 2011

    It’s so easy with powershell to create dynamic or static arrays. For example; $MyArray = 5, 6, 7 Just separate the items with commas.Another simple example; $MyArray = “first”, “second”, “third” If you want to add another item to the array just use; $MyArray = $MyArray + “fourth” To assign a range to the array; more »

  • Create Test Users On Exchange 2010

    December 30, 2010

    Want to create a group of test users in your lab? Use this command: 1..100 | ForEach { Net User "User$_" MyPassword=01 /ADD /Domain; Enable-Mailbox "User$_" } Now let’s comment about how to remove these 100 users with powershell ?

  • Remove Mailbox for Disabled User Objects

    December 15, 2010

    Following script will look for disabled users with mailboxes and will remove mailbox attributes on these objects. Get-Mailbox | where { $_.ExchangeUserAccountControl -eq "Accountdisabled" -and $_.recipienttypedetails -eq "usermailbox"  } | select name | Export-Csv c:\disableduserswithmailboxes.csv Import-CSV C:\disableduserswithmailboxes.csv | ForEach-Object { remove-mailbox -identity $_."Name" -Confirm:$false }

  • Powershell Script to Remove Mail Addresses

    December 15, 2010

    If you have migrated to Exchange 2007 or Exchange 2010 from legacy versions, and changed shared smtp namespaces, then unused mail address attributes will remain on migrated user objects. Following script will read users.txt and look for specific text in mail addresses , and then will remove finally. Get-Content C:\users.txt |Get-Mailbox | foreach{        for more »

  • A powershell script that sends email about sent and received message counts on Exchange 2010

    December 15, 2010

    One of my customer ask me that is there any way to obtain sent and received message counts on Exchange 2010 for specific timelines.With following script, you can get all transport servers on your organization, read sent and received message counts for last 24 hour period , save this to the local disk, and email more »

  • Powershell üzerinden mail gönderimi için Receive Connector oluşturulması

    April 1, 2010

    Organizasyonun ihtiyaçları doğrultusunda bazen bir script yardımı ile belirli conditionlarda Exchange üzerinden mail gönderilmesi isteniyor.Daha önceden olduğu gibi bunun için relay izinlenirimizi oluşturup mail atımını gerçekleştirebiliyoruz.Bu mail atımını gerçekleştirebilecek çok hoş powershell scriptlerini internet üzerinden bulabiliyorsunuz.Bende yakın zamanda kullandığım için birkaçını paylaşacağım. Yalnız powershell scripti ile mail gönderimi gerçekleştirmek için bir HUB Transport sunucuda nasıl more »

  • Exchange 2010 Rollup Version Control

    March 13, 2010

    Geçtğimiz günlerde Exchange Server 2010 için Rollup1 paketi yayınlandı.İçerisinde birçok güncelleme bulunuyor. Bu paketi sisteminize geçtikten sonra versiyon kontrolü yapmak isteyebilirsiniz.Bunun için BIN klasörü altındaki exsetup.exe dosyasının versiyonunu kontrol etmelisiniz.Aşağıdaki komutlar işinizi görücektir. GCM exsetup |%{$_.Fileversioninfo} Aynı zamanda aşağıdaki sayfalardan version number bilgilerini alabilirsiniz. Link1 Link2

  • File cannot be loaded because the execution of scripts is disabled on this system error in PowerShell

    July 19, 2008

    Powershell’i kurdunuz yada exchange 2007 için exchange management shell üzerinde varolan bir .ps1 dosyasını çalıştırdığımızda; File cannot be loaded because the execution of scripts is disabled on this system error in PowerShell hatası alabiliriz.Bunun sebebi aslında defaultta gelen güvenlik ayarları.Varolan güvenlik ayarları scriptin çalıştırılmasına izin vermiyor demektir.Yani teknik olarak Execution Policy durumu.Temelde varolan execution policyler more »

  • Exchange 2007 komut ile kurulum

    July 10, 2008

    Aşamaları takip etmeniz zor.Verdiği hataları yada eksik önyüklemeleri seçmeniz uğraştırıyor.Ama yinede bilmenizde fayda var.Sunucu üzerine exchange 2007 kurulumunu komut satırından yada powershell içerisinden gerçekleştirebilirsiniz.Aşina olduğumuz komut satırından gerçekleştirmek için Exchange 2007 dvd dizinine inerek; Setup.Com “/r:M,HT,C” “/on:Messaging” komutunu koşturun. Aynı işlemi powershell üzerinde gerçekleştirmek içinde; ./Setup.Com “/r:M,HT,C” “/on:Messaging” komutu işinizi görücektir. Fakat gerçekten verdiği hataları more »

  • Exchange Server 2007 üzerinde NDR disable\enable

    July 9, 2008

    Exchange 2007 üzerinde NDR(non-delivery reports) özelliğide oldukça geliştrilmiş.3haneden oluşan 5.1.1 benzeri kodların her biri bir anlam ifade ediyor ve sorunu çözmemize olanak sağlıyor. Örneğin ilk sayı olan 5 genel olarak hata tipini belirtiyor.Buradaki 5 hatanın kalıcı olduğunu ve mesajın artık karşı tarafa ulaşma şansının olmadığını belirtiyor.Bu değer 4 olsaydı karşıya ulaşma ihitimali hala olabilirdi. İkinci more »

  • Exchange 2007 Content Agent Log Message Tracker

    June 4, 2008

    Exchange 2007 Content Agent Log Message Tracker aracı sayesinde Content Filtering Agent üzerinden akan tüm mesajları görüntüleyebilirsiniz. Kodu yazan Glen Scales’e göre;

  • Powershell ile mail gönderimi

    May 4, 2008

    Bildiğimiz gibi artık powershell ile sunucularımızı ve işlerimizi yönetebiliyoruz.Powershell’in bir diğer marifetide Net.Mail.SmtpClient objesini kullanarak mail gönderebilmesi.Aşağıdaki kodları kullanarak isterseniz bir.ps1 oluşturabilir ve bunu schedule ile istediğiniz zamanlarda çalıştırabilirsiniz.Powershell’de mail gönderimi için $emailFrom = “user@yourdomain.com” $emailTo = “user@yourdomain.com” $subject = “your subject” $body = “your body” $smtpServer = “your smtp server” $smtp = new-object Net.Mail.SmtpClient($smtpServer) more »

 
Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org