External, PowerShell

PowerShell: Building Objects with Custom Properties with Select-Object — SID-500.COM

What if you are not satisfied with the default output of PowerShell? Well, there are many ways to come closer to the desired result. In this blog article I am going to create Custom Objects with PowerShell.

via PowerShell: Building Objects with Custom Properties with Select-Object — SID-500.COM

Advertisements
PowerShell

Looping PowerShell Commands

While doing Exchange or Office 365 migration the best way to monitor migration progress is using powershell commands, but in order to do that you might have to keep entering the same commands repeatedly.

To get hands free below script can be used with appropriate time to repeat the command itself in loop.. e.g.

PS C:\WINDOWS\system32> while ($true)
>> {
>> Get-MigrationUser | where {($_.BatchID -eq "migration-users-batch1") -and ($_.Status -eq "Synced")} | measure-object
>> sleep -seconds (60*5)
>> }

..just change the third line with your powershell command and time (60 sec * 5 Minutes) required to repeat the command.. to end press CNTR + C.