External, PowerShell

PowerShell Function: Testing the Default Gateway with Test-Gateway — SID-500.COM

Sometimes it could happen that your computer lost connection to other hosts or the internet. What is the first you should do? For example, you could try to reach other hosts or your default gateway. Sure, you could use the bottom up method by climbing up the ladder of the OSI Model and check your […]

via PowerShell Function: Testing the Default Gateway with Test-Gateway — SID-500.COM

Advertisements
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

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.