Sunday, March 29, 2009

Just touching Powershell

As you see it is late at night and I am trying to use powershell not only to apply instructions from a guide on how to migrate Exchange 2007 users or how to create connectors using a powershell, but I am trying to have it as a tool for being used as a day to day...
I write this blog article as I feel confident somehow in using powershell as I did some small commands just to refresh my  network card; it is too simple
1st I queried a wmi class for network cards
Get-WmiObject Win32_NetworkAdapterConfiguration
it results a long list of instances and properties


We can modify the system behavior in displaying the class instances to be in tabular format by piping the data to format-table command like this

PS C:\> Get-WmiObject Win32_NetworkAdapterConfiguration |format-table


you can define the command as variable then you can call any methods like renew DHCP lease


I will describe all what we have done later in a series of powershell