if not exists(select * from sys.sysobjects where id = object_id(N'dbo.InventoryADDomain'))
begin
    create table[dbo].[InventoryADDomain](
        [ID][uniqueidentifier] NOT NULL,
        [ScanID] [uniqueidentifier] NOT NULL,
        [Name] [nvarchar](256) NOT NULL,
        constraint[PK_InventoryADDomain] primary key clustered(ID)
    );
end;