Lync Migration to Office 365 Lync

Contact Backup Script :                  Export-CsUserData -PoolFQDN “lync01.qb.com” -UserFilter “kumar@qb.com”  -FileName “C:\Users\Downloads\Test.zip”

Contact update script :                  Update-CsUserData -Filename “C:\Usersr\Downloads\test.zip”  -UserFilter kumar@itcssg.com

Move Lync Users:     Move-CsUser -Identity kumar@itcssg.com -Target sipfed.online.lync.com -Credential $cred -HostedMigrationOverrideUrl “https://admin2a.online.lync.com/HostedMigration/hostedmigrationservice.svc” -ProxyPool “lync01.qb.com”

Export-CsUserData -PoolFQDN “lync01.qb.com”  -FileName “C:\Users\Downloads\Lync_Group_contact.zip”

How to Get the Windows Patch Report in Excel though Power Shell Script

$Session = New-Object -ComObject “Microsoft.Update.Session”

$Searcher = $Session.CreateUpdateSearcher()

$historyCount = $Searcher.GetTotalHistoryCount()

$Searcher.QueryHistory(0, $historyCount) | Select-Object Date,

@{name=”Operation”; expression={switch($_.operation){

1 {“Installation”}; 2 {“Uninstallation”}; 3 {“Other”}}}},

@{name=”Status”; expression={switch($_.resultcode){

1 {“In Progress”}; 2 {“Succeeded”}; 3 {“Succeeded With Errors”};

4 {“Failed”}; 5 {“Aborted”}

}}}, Title | Export-Csv -NoType “$Env:userprofile\Desktop\WindowsUpdates.csv”

How to Get the Windows Patch Report in Excel though Power Shell Script

$Session = New-Object -ComObject “Microsoft.Update.Session”

$Searcher = $Session.CreateUpdateSearcher()

$historyCount = $Searcher.GetTotalHistoryCount()

$Searcher.QueryHistory(0, $historyCount) | Select-Object Date,

@{name=”Operation”; expression={switch($_.operation){

1 {“Installation”}; 2 {“Uninstallation”}; 3 {“Other”}}}},

@{name=”Status”; expression={switch($_.resultcode){

1 {“In Progress”}; 2 {“Succeeded”}; 3 {“Succeeded With Errors”};

4 {“Failed”}; 5 {“Aborted”}

}}}, Title | Export-Csv -NoType “$Env:userprofile\Desktop\WindowsUpdates.csv”

Get a List of Installed Application from computers (PowerShell)

Step1: Run the script in the Windows PowerShell Console, type the one command: Import-Module <Script Path> at the prompt.

For example, type Import-Module C:\Script\ GetInstalledApplicationInfo.psm1

This is shown in the following figure

Step 2: You can type thecommand Get-Help New-OSCInstalledApplication -Full to display the entire help file for this function, such as the syntax, parameters, or examples.

Example

Example 1: Type Get-OSCInstalledApplication  -ComputerName “Server20120830”command in the Windows PowerShell Console.

This command will list installed application on ‘Server20120830’. 

Example 2: Type Get-OSCInstalledApplication -ComputerFilePath C:\Script\ComputerList.csv command in the Windows PowerShell Console.
Note: the CSV File format must follow the format below:

This command specifies the path to an item that contains several computers. Then ‘Get-OSCInstalledApplication’ cmdlet will list installed application from those computers.

Example 3: Type Get-OSCInstalledApplication -ComputerFilePath C:\Script\ComputerList.csv | Export-Csv C:\InstalledAppsList.csv command in the Windows PowerShell Console.

When the script finishes running, you can open the InstalledAppsList CSV file, the content of file as below:

Add/Change/Remove Primary SMTP and Alias smtp in Active Directory

Removing Primary SMTP in Active Directory

Set-ADUser accounting -Remove @{ProxyAddresses=”SMTP:accounting@cloudrain.in”}

Removing Alias smtp in Active Directory

Set-ADUser accounting -Remove @{ProxyAddresses=”smtp:accounting@cloudrain.in”}


Change Primary SMTP in Active Directory


Set-ADUser accounting -Add @{ProxyAddresses=”SMTP:accounting@cloudrain.in”}



Change or Add Alias smtp in Active Directory

Set-ADUser accounting -Add @{ProxyAddresses=”smtp:accounting@cloudrain.in”}