Instance migrations and best practice implementations have never been safer, faster or freer.
SQL Bulk Upload
How can we avoid duplicate values while we are doing bulk insert to a table
--BEGIN TRAN
CREATE TABLE [tlg].[UserVisitLogs](
[TStamp] DATETIME,
[SessionID] NVARCHAR(20),
[CorrelationID] NVARCHAR(20),
[SchoolCode] NVARCHAR(20),
[SiteExternalID] NVARCHAR(20),
[WebType] NVARCHAR(20),
[WebUrl] NVARCHAR(100),
[UserSid] NVARCHAR(50),
[UserName] NVARCHAR(20),
[UserType] NVARCHAR(20),
[CachedUser] NVARCHAR(20)
)
GO
-- Create Unique Clustered Index with IGNORE_DUPE_KEY=ON to avoid duplicate
CREATE UNIQUE CLUSTERED INDEX [ClusteredIndex-Logs] ON [tlg].[UserVisitLogs]
(
[TStamp] DESC,
[SessionID] ASC,
[CorrelationID] ASC,
[SchoolCode] ASC,
[SiteExternalID] ASC,
[WebType] ASC,
[WebUrl] ASC,
[UserSid] ASC,
[UserName] ASC,
[UserType] ASC,
[CachedUser] ASC
) WITH (IGNORE_DUP_KEY = ON)
GO
--ROLLBACK TRAN
/*
Thanks to dbatools.io : https://www.youtube.com/watch?v=kQYUrSlb0wg
*/
PowerShell: Script to move items from one folder to another in a user’s office 365 mailbox
Exchange Web Services 2.0 Using PowerShell
- Exchange Online and Exchange 2013 development
- Microsoft Exchange Web Services Managed API 2.2
- EWS Managed API reference
- PowerShell – Script to move items from one folder to another in a user’s mailbox
- Quick searching of today’s email using Powershell and EWS
- Search-Mailbox
- Explore the EWS Managed API, EWS, and web services in Exchange
- EWS Managed API, EWS, and web services in Exchange
- Exchange Online and Exchange 2013 development
- Exporting and importing items by using EWS in Exchange
- PowerShell EWS Save as for e-mails
PowerShell implicit remoting on imported a cmdlet
Import-PSSession -Session (
New-PSSession -ComputerName dc01 -Credential (Get-Credential)
) -CommandName New-ADUser
$Password = Read-Host -assecurestring "SP2013 Farm Account Password"
$Name = "spExtranetFarm"
$UPN = "spExtranetFarm@mikefrobbins.com"
$Description = "SharePoint Farm Administrator Account - Extranet"
$Path = "ou=service,ou=accounts,ou=test,dc=mikefrobbins,dc=com"
New-ADUser -Name $Name -AccountPassword $Password -Description $Description `
-Enabled $true `
-PasswordNeverExpires $true `
-Path $Path `
-SamAccountName $Name `
-UserPrincipalName $UPN