Diary of an IT Guy #AnakBinus

Build Bridges, not Walls. Collaboration Forever!

Posts Tagged ‘powershell

Stuck Migration IMAP Dari Gmail ke Office 365: Remove Migration Batch

leave a comment »

Mau migrasi email via IMAP G-Suite ke Office 365 dengan menggunakan cara ini tapi ternyata gagal gara-gara setting gmail belum set less secure app.Akhirnya harus ke powersheel untuk hapus Migration batch-nya.
Ini adalah caranya. Ref: https://gcits.com/knowledge-base/troubleshooting-office-365-imap-migrations-from-google-apps/

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6 PS C:\WINDOWS\system32> $UserCredential = Get-Credential cmdlet Get-Credential at command pipeline position 1 Supply values for the following parameters:
Credential
PS C:\WINDOWS\system32> $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
PS C:\WINDOWS\system32> Import-PSSession $Session -DisableNameChecking

ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 1.0 tmp_egpesa4g.1z1 {Add-AvailabilityAddressSpace, Add-DistributionGroupMember...
PS C:\WINDOWS\system32> Get-MigrationBatch

Identity Status Type TotalCount
-------- ------ ---- ----------
ListPasswdMigrasiSnD_batch1 SyncedWithErrors IMAP 9
ListPasswdMigrasiSnD_rev3 Stopped IMAP 8

PS C:\WINDOWS\system32> Remove-MigrationBatch -Identity ListPasswdMigrasiSnD_rev3

Confirm
Are you sure you want to perform this action?
Remove the migration batch "ListPasswdMigrasiSnD_rev3"?
[Y] Yes [A] Yes to All [N] No [L] No to All [?] Help (default is "Y"): y
PS C:\WINDOWS\system32> Remove-MigrationBatch -Identity ListPasswdMigrasiSnD_batch1

Confirm
Are you sure you want to perform this action?
Remove the migration batch "ListPasswdMigrasiSnD_batch1"?
[Y] Yes [A] Yes to All [N] No [L] No to All [?] Help (default is "Y"): y
PS C:\WINDOWS\system32> Get-MigrationBatch

Identity Status Type TotalCount
-------- ------ ---- ----------
ListPasswdMigrasiSnD_batch1 Removing IMAP 1

PS C:\WINDOWS\system32>Remove-PSSession $Session

Written by isal

14 Desember 2019 at 23:33

Ditulis dalam cloud, Office 365

Tagged with , ,

Block One Drive for Business Syncronization to Non-Joined Domain PC

leave a comment »

OFBIf your company is using Office 365, of course, you as an IT Admin wants the office’s data remains secure. In order to make the data in One Drive for Bussiness and Sharepoint Online stay safe, then you must  to inactivate the syncronization feature on PCs that do not join the domain like home PC. So if the employee resign, they are difficult to copy the company work files.

The Prerequsites are:
1. You know the domain GUID active directory (AD) in the office
2. You have access to the company’s Office 365 powershell

Here are the steps:
1. To determine the domain GUID  : log in as Administrator to the domain controller and use powershell with the following command (bold text):



Windows PowerShell
Copyright (C) 2014 Microsoft Corporation. All rights reserved.


PS C:\Users\Administrator> $domains = (Get-ADForest).Domains; foreach($d in $domains) {Get-ADDomain -identity $d | Select ObjectGuid}

The result:

ObjectGuid
----------
19e5a505-2498-42b3-a426-fb3aeb5976fs

PS C:\Users\Administrator>

2. Install the latest shell management sharepoint online on your laptop (at least OS windows 7). And do the following command line (as Administrator):

Login to sharepoint online:

PS C:\WINDOWS\system32> $cred=Get-Credential

PS C:\WINDOWS\system32> connect-sposervice -url https://TenantName-admin.sharepoint.com/ -credential $cred

Set restriction that only PC that has been join domain (Domian GUIID: 19e5a505-2498-42b3-a426-fb3aeb5976fs) can sync to one drive for bussiness:

PS C:\WINDOWS\system32> Set-SPOTenantSyncClientRestriction -enable -DomainGuids "19e5a505-2498-42b3-a426-fb3aeb5976fs"

The result:

 TenantRestrictionEnabled : True
 AllowedDomainList : {19e5a505-2498-42b3-a426-fb3aeb5976fs}
 BlockMacSync : False
 ExcludedFileExtensions : {}
 OptOutOfGrooveBlock : True
 OptOutOfGrooveSoftBlock : True

Baca entri selengkapnya »

%d blogger menyukai ini: