Vbscript to create sites on a windows 2008 DC

Hello,

I am trying to use this script provided by MS to create a site on my windows 
2008 DC:

However, it does not work. I get an error saying:There is a naming violation

for line:

Set objSite = objSitesContainer.Create("site", strSiteRDN)
objSite.SetInfo

Here is the script. Is it not intended to work in windows 2008?

Thanks!

strSiteRDN      = "cn=Ga-Atl-Sales"
strSiteLinkRDN  = "cn=DEFAULTIPSITELINK"
strSiteLinkType = "IP"                      
 
Const ADS_PROPERTY_APPEND = 3
 
Set objRootDSE = GetObject("LDAP://RootDSE")
strConfigurationNC = objRootDSE.Get("configurationNamingContext")
strSitesContainer = "LDAP://cn=Sites," & strConfigurationNC
 
Set objSitesContainer = GetObject(strSitesContainer)
 
Set objSite = objSitesContainer.Create("site", strSiteRDN)
objSite.SetInfo
 
Set objLicensingSiteSettings = objSite.Create("licensingSiteSettings", _
    "cn=Licensing Site Settings")
objLicensingSiteSettings.SetInfo
 
Set objNtdsSiteSettings = objSite.Create("nTDSSiteSettings", _
     "cn=NTDS Site Settings")
objNtdsSiteSettings.SetInfo
 
Set objServersContainer = objSite.Create("serversContainer", "cn=Servers")
objServersContainer.SetInfo
 
strSiteLinkPath = "LDAP://" & strSiteLinkRDN & ",cn=" & strSiteLinkType & _
    ",cn=Inter-Site Transports,cn=Sites," & strConfigurationNC
 
Set objSiteLink = GetObject(strSiteLinkPath)
objSiteLink.PutEx ADS_PROPERTY_APPEND, "siteList", _
                  Array(objSite
0
Utf
5/28/2010 6:51:02 PM
windows.server.active_director 902 articles. 0 followers. Follow

2 Replies
1070 Views

Similar Articles

[PageSpeed] 44

Hello Dipti,

I am not that scripting guy, but maybe this one helps:
http://gallery.technet.microsoft.com/ScriptCenter/en-us/c76e6703-3601-4d68-a931-9583d2b7a6ad

Where did you find this one?

Best regards

Meinolf Weber
Disclaimer: This posting is provided "AS IS" with no warranties, and confers 
no rights.
** Please do NOT email, only reply to Newsgroups
** HELP us help YOU!!! http://www.blakjak.demon.co.uk/mul_crss.htm 


> Hello,
> 
> I am trying to use this script provided by MS to create a site on my
> windows 2008 DC:
> 
> However, it does not work. I get an error saying:There is a naming
> violation
> 
> for line:
> 
> Set objSite = objSitesContainer.Create("site", strSiteRDN)
> objSite.SetInfo
> 
> Here is the script. Is it not intended to work in windows 2008?
> 
> Thanks!
> 
> strSiteRDN      = "cn=Ga-Atl-Sales"
> strSiteLinkRDN  = "cn=DEFAULTIPSITELINK"
> strSiteLinkType = "IP"
> Const ADS_PROPERTY_APPEND = 3
> 
> Set objRootDSE = GetObject("LDAP://RootDSE")
> strConfigurationNC = objRootDSE.Get("configurationNamingContext")
> strSitesContainer = "LDAP://cn=Sites," & strConfigurationNC
> Set objSitesContainer = GetObject(strSitesContainer)
> 
> Set objSite = objSitesContainer.Create("site", strSiteRDN)
> objSite.SetInfo
> 
> Set objLicensingSiteSettings = objSite.Create("licensingSiteSettings",
> _
> "cn=Licensing Site Settings")
> objLicensingSiteSettings.SetInfo
> Set objNtdsSiteSettings = objSite.Create("nTDSSiteSettings", _
> "cn=NTDS Site Settings")
> objNtdsSiteSettings.SetInfo
> Set objServersContainer = objSite.Create("serversContainer",
> "cn=Servers") objServersContainer.SetInfo
> 
> strSiteLinkPath = "LDAP://" & strSiteLinkRDN & ",cn=" &
> strSiteLinkType & _
> ",cn=Inter-Site Transports,cn=Sites," & strConfigurationNC
> Set objSiteLink = GetObject(strSiteLinkPath)
> objSiteLink.PutEx ADS_PROPERTY_APPEND, "siteList", _
> Array(objSite


0
Meinolf
5/29/2010 10:18:58 AM
Hi Dipti,
Did you run the script with account who has access to create sites in 
forest?

thanks

-- 
Rahisuddin Shah
MCSE, MCSA, ITIL
Disclaimer: This posting is provided "AS IS" with no warranties, and confers
no rights.

"Dipti Seth" <DiptiSeth@discussions.microsoft.com> wrote in message 
news:291A5D28-01BC-4FF1-91BD-05CC70758F83@microsoft.com...
> Hello,
>
> I am trying to use this script provided by MS to create a site on my 
> windows
> 2008 DC:
>
> However, it does not work. I get an error saying:There is a naming 
> violation
>
> for line:
>
> Set objSite = objSitesContainer.Create("site", strSiteRDN)
> objSite.SetInfo
>
> Here is the script. Is it not intended to work in windows 2008?
>
> Thanks!
>
> strSiteRDN      = "cn=Ga-Atl-Sales"
> strSiteLinkRDN  = "cn=DEFAULTIPSITELINK"
> strSiteLinkType = "IP"
>
> Const ADS_PROPERTY_APPEND = 3
>
> Set objRootDSE = GetObject("LDAP://RootDSE")
> strConfigurationNC = objRootDSE.Get("configurationNamingContext")
> strSitesContainer = "LDAP://cn=Sites," & strConfigurationNC
>
> Set objSitesContainer = GetObject(strSitesContainer)
>
> Set objSite = objSitesContainer.Create("site", strSiteRDN)
> objSite.SetInfo
>
> Set objLicensingSiteSettings = objSite.Create("licensingSiteSettings", _
>    "cn=Licensing Site Settings")
> objLicensingSiteSettings.SetInfo
>
> Set objNtdsSiteSettings = objSite.Create("nTDSSiteSettings", _
>     "cn=NTDS Site Settings")
> objNtdsSiteSettings.SetInfo
>
> Set objServersContainer = objSite.Create("serversContainer", "cn=Servers")
> objServersContainer.SetInfo
>
> strSiteLinkPath = "LDAP://" & strSiteLinkRDN & ",cn=" & strSiteLinkType & 
> _
>    ",cn=Inter-Site Transports,cn=Sites," & strConfigurationNC
>
> Set objSiteLink = GetObject(strSiteLinkPath)
> objSiteLink.PutEx ADS_PROPERTY_APPEND, "siteList", _
>                  Array(objSite 

0
Rahisuddin
5/29/2010 11:44:06 AM
Reply:

Similar Artilces:

Creating a High-Low-Close chart with multiple series?
Hi Everyone, I’m trying to create a High-Low-Close stock chart with 2 data series. Right now, I can only get the chart to plot a single data series. I’ve spent some time playing with the chart options and doing some internet research but still I haven’t found any answers. My data looks something like this: Stock A Date High Low Close 6/30/2005 5 3 4 7/30/2005 10 6 8 8/30/2005 8 7 7.5 9/30/2005 9 2 5.5 10/30/2005 6 3 4.5 Stock B Date High Low Close 6/30/2005 50 30 40 7/30/2005 100 60 80 8/30/2005 80 70 75 9/30/2005 90 20 55 10/30/2005 60 30 45 Any thoughts? Thanks! ...

Windows ME
Can Publisher 2003 be used with Windows ME ? When I purchased it, the sales rep said Yes, but now I see all over the cover that it requires Windows 2000 or XP. I don't want to open the pkg if it won't work with ME Thanks ...

Moving Outlook e-mails from windows 2000 to xp professioal
I just got a new computer with windows xp professional and have outlook 2000 on it. I have e-mails on my old computer in outlook 2000 and windows 2000. What folder do I copy the old e-mails into on my new computer. Thank you for your help. Jay The file you need to back up is your Personal Folders file (*.pst) It's where all the mail, calendar, contacts etc are stored. Take a look at these pages for info on Outlook data backup: http://www.slipstick.com/config/backup.htm -- Russ Valentine [MVP-Outlook] "Jay Levy" <anonymous@discussions.microsoft.com> wrote in message ...

how do I create an assesment test that records answers in ppt.
How do I create an assessment test in PPT that records the answers and has a certificate of completion to be filled in at the end? You could only do this with vba code. Can you code? You might want to look at examples on "Powerful PowerPoint for Educators" http://www.loyola.edu/edudept/powerfulpowerpoint/ -- john ATSIGN PPTAlchemy.co.uk Free PPT Hints, Tips and Tutorials http://www.pptalchemy.co.uk/powerpoint_hints_and_tips_tutorials.html "seasmith" wrote: > How do I create an assessment test in PPT that records the answers and has a >...

using a custon Avery 8876 template to create membership cards. I .
shI created a unique template in Publisher for Avery 8876 business cards, which I am using for Memberhsip cards instead. I am only able to see and edit a single "representative " card. How can I enter individual members names on each sheet before I print it? Do a mail merge. Please be aware that if you do a Print Preview, you will only see a single name, not all of the members. -- JoAnn Paules MVP Microsoft [Publisher] "HOT FLASH" <HOT FLASH@discussions.microsoft.com> wrote in message news:525B2114-7F9C-4C08-8A7D-45D7A5EF0F07@microsoft.com... > shI crea...

One click to select a newly create account from a Lookup form
On the Case form, when you look up a Customer you have the option to click New. If New is clicked and a new Account (or Contact) is created, is it possible to link the Account straight back to the form when the Save & Close button is clicked. Rather than having to select the newly created Account from the Lookup up form, the account is selected automatically and the lookup form is closed. This CRM implemenation is for a call centre and they must minimse the amount of clicks to perform certain actions. This is a CRM 4.0 implementation. Is this possible with JScript, or by any other means...

visual basics 2008
ok, im making a app in vb08 and iv got all the codes ready, but i double click on the form and type in these codes... if Form1.close then msgbox("thankyou for useing") end if When ever i type the codes in it says theres a error, could someone give me the correct codes for it I suspect you need to find a newsgroup dealing with Visual Basic.NET (they may have dropped the ".NET" part in Visual Studio 2008). This newsgroup is devoted to technical discussion of, and questions and answers about, Microsoft Access database software, which uses the "antiquat...

Windows Mail- Delete it from Server
I have been using "Delete it from Server" option in Windows Mail Rules successfully for a number of years now until recently. The I noticed i began receiving mails that I have defined to be deleted from server. To further this, I used another email address defining the emails from this address to be deleted from server but the emails still come through. Can anyone enlighten and help me on this? I am using Vista Home Basic and updated to the most current. The mail program is the Windows Mail. "rbernal43" <rbernal43@discussions.microsoft.com> wrote in m...

Can't type in AnswerWizard or Index of code window help
Hi All, I run Access 2002 Developer. Recently, when I open help from visual basic code window, it won;t let me type text in the answer wizard or index search boxes. The icon switches to a horizontal, double arrow, as if I was trying to resize the pane. I can't figure out what stupid thing I've done. I sure miss help, though. Does this sound familiar to anyone? Help! - Max ...

SQL Server 2000+2008 on Win2008x64 question
Hi, I have SQL Server 2000 on my Win2008x64 server, the db file is on the D drive, while the program file is on C drive. Today I installed the SQL Server 2008 on the same machine. After the installation, the SQL Server Service Manager is still the same as just only SQL Server 2000 installed, I'm thinking isn't there some newer version of the SQL Server Service Manager for the SQL Server 2008? And in the SQL Server Management Studio, I can only find those db in the SQL Server 2000 db folder, I can't find those SQL Server 2008 system database like Master and Model. H...

creating a pointer to a imbeded struct causes C2065
I want to create a pointer of a sub struct because there will be more than one of them in a message. However I get C2065 error. I found the error explaination on Microsoft.com however I don't see how it applies to me. Here is a simple idea of what I am doing. char szBuffer[100]; typedef struct T_Smoo { struct { int a; }H; struct { int b; int c; int d; }D; } Smoo; Smoo *pSmoo = (Smoo*) szBuffer; pSmoo->H.a = 1; pSmoo->D.b = 2; pSmoo->D.c = 3; pSmoo->D.d = 4; int offset = sizeof(pSmoo->H); Smoo::D *p = (&Smoo::D) &szBuffer[offset]; p->D....

Creating HR Benefit Cards From Payroll Benefits Cards
I'm doing a migration of data into Great Plains V10. I've imported the benefits from the old system into Payroll via the Integration Manager. The benefits cards for employees are fine in Payroll, but there are no cards in HR. We ran the HR Reconcile thinking that would create the cards in HR. However it did not seem to do that. Is there a way to create the HR Benefits cards for employees from the cards in Payroll? Hi Royce, A bunch of exploring questions: - When you uploaded via IM, which Payroll window did you use to integrate your source data? - Is the data that you ar...

Cannot Find DC Exchange 2000 SP3
I have tried moving exchange to 3 different computers now all with the same results. "All Domain Controllers In Use Are No Responding" however the controller is there and responding quite well. In the system log I am getting all kinds of messages from LsaSrv, MrxSub, DCOM, Browser. Note this is a machine that was not having any problems until exchange was applied. What is going wrong? ...

IE 8 Makes Windows unstable
Once IE 8 was loaded, I started having boot problems and it slowed everything down to a crawl. IE would freeze the computer and I had to Hard power off. The compter had to be booted three times to get a good boot. I uninstalled IE 8 and everything is working smoothly. Is IE 8 incompatable with Windows XP Pro? Or did I get a bad install? No-charge support for Internet Explorer 8 installation, set-up and usage (only) is available via telephone (based on your locale) and has been extended until 02 July 2010. Customers must be running Windows XP or Windows Vista in a non-domain envi...

position of edt1 control of CFileDialog incorrect on Windows 2003
I'm using V6.0 CFileDialog and constructiing and opening it using the following code. CFileDialog dlg(FALSE, _T("export.txt"), NULL, OFN_CREATEPROMPT | OFN_PATHMUSTEXIST, _T("All Files (*.*)|*.*||"), pWnd ); if ( dlg.DoModal() == IDOK ) { .... } When the dialog displays the edt1 control is not positioned next to the stc3 label but is positioned elsewhere dependent upon the position of the parent window. Has anyone else seen this and does anyone have a solution? ...

JDBC Driver issue with SQL Server 2008
Hi, I just migrated to SQLServer 2008 Express from the 2005 version. I have a Java application that uses SQL JDBC Driver (sqljdbc4.jar - latest version) to connect to DB. I had to upgrade to the latest driver as the previous version sqljdbc.jar did not work with SQL 2008. Now my application works, but in one instance it fails. Debugging i found the issue to be when accessing this particular stored procedure that has both Update and Select queries. In this case the error says 'statement didnt return a resultset' when executing this code 'preStmt.executeQuery();' ...

Create a "View" for Accounts that displays Primary Contact's email
Hi, Today I created a new Account View for one of our business units. The view displays a listing of the particular type of Account that the business unit serves. When I asked the business unit if that View helped them, I got a reply saying that the column for Account Email was good but they preferred a column for the Primary Contact's Email. It seems that out-of-the-box, I can't use the web front end to include a column for the Primary Contact's Email. I can (& I have) include a column for the Primary Contact which displays the Contact's name. Of course, unlike t...

cannot remove microsoft exchange site replication service from ESM
I recently migrated from Exchange 5.5 to Exchange 2003. Everything has gone well and now all the mailboxes are completely moved to the new server running Exchange 2003. At this point I want to convert Exchange to native mode. The last step in the Exchange migration documentation is to delete the Microsoft Exchange Site Replication Service using Exchange Server Manager. However when I attempt to delete the SRS entry, I receive an error: There is no such object on this server Facility: Win32 Id No: 80072030 Exchange System Manager As a result I cannot switch to native mode until I remov...

Does Windows store a list of installed updates?
Hi, I am going to be fitting a larger drive to my PC and am going to be taking the opportunity to do a clean install. I have the Windows XP home CD with SP2 included and I will need to know which updates to download so that I can slipstream a CD/DVD with all the necessary up-to-date drivers. Does Windows store a list of the updates and if so, where? Many thanks Gerald Gerald Bramwell wrote: > Hi, > > I am going to be fitting a larger drive to my PC and am going to be > taking the opportunity to do a clean install. I have the Windows XP home > CD with ...

Office 97 vs Windows XP
Will Office 97 function with WindowsXP without causing problems. Frank, Yes, Office 97 works fine with Windows XP. -- Cordially, Chip Pearson Microsoft MVP - Excel www.cpearson.com chip@cpearson.com "Frank Miller" <franklinmiller@msn.com> wrote in message news:046c01c36a2d$8e366d30$a401280a@phx.gbl... > Will Office 97 function with WindowsXP without causing > problems. ...

Office 2008 for Mac Installation (Computer Amount)
How many computers can I legally install my Microsoft Office 2008 for Mac Special Media Edition on? I would like to install it on two desktop computers and one laptop computer that are networked together. There surely is no law about this in your country. The best way to see is to read the license agreement that is attached to your software. I was going to suggest how to do that on the Mac version of office, but I can't find it. Looking in Word. Not in Help. Not in About. Not in the readme file in the application folder. In Windows version of Word it's in the About menu. ...

Creating Watermarks in Excel 2000
I am trying to create an image watermark in Excel 2000, but it keeps overshadowing the data on the invoice I've created....any ideas? anonymous@discussions.microsoft.com wrote: > I am trying to create an image watermark in Excel 2000, > but it keeps overshadowing the data on the invoice I've > created....any ideas? Hi have a look at the following sites: http://www.xl-logic.com/pages/formulas.html http://www.rondebruin.nl/files/Watermark.zip And for Excel 2002+: http://cpap.com.br/orlando Frank ...

Determine Contact Created From Outlook
Hi, Does anybody know how to determine the Contacts that created from Outlook and Track in CRM? Is there a field in the backend that indicates that? What I need to do is to figure out all of the Contacts that the users created in Outlook, then do an update to those contacts. Just to make it clear, that the point of creation of the Contact is from Outlook address book. thanks! Darren Liu Crowe Chizek http://www.crowecrm.com ...

Create a test environment
Hi, I need to create a test environment, as soon as possible, ideal would be replicating the production environment. I've a windows server 2003 domain, w2k3 SP 2 with Active Directory. I'm thinking about create a VMware, maybe using physical 2 virtual, duplicating the domain controller and changing the server name and the domain name, what do you think? Could it be possible? I'm not totally sure about that, because I think you cannot rename a domain controller... Any ideas will be welcome! Thank you in advance. Hello Juan, See the following articles about creati...

how to create a chart in excel base on date?
hi..im a newbie to excel.. i need to create a bar chart..... i have only one column containing dates... which is this 03-Aug-05 03-Aug-05 03-Aug-05 03-Aug-05 03-Aug-05 04-Aug-05 04-Aug-05 04-Aug-05 04-Aug-05 04-Aug-05 04-Aug-05 04-Aug-05 04-Aug-05 .... .... ... until..... 31-Dec-05 total up to 10000 records of dates its a long list of dates and i need to create a bar chart showing th number of times in a day how many rows of them.. which means i have a bar chart showing on august and 3 days...etc...and a bar chart showing on sept....and so on.. i also need a bar chart on the 5 months..au...