Showing posts with label Windows Server 2008. Show all posts
Showing posts with label Windows Server 2008. Show all posts

Thursday, June 7, 2012

(error 0x000006d9) Printer Sharing Error

Windows 7 and 2008 R2 both have a weird problem when sharing printers.  I found this out when trying to share a generic/text only printer.  At first I thought it was invalid characters in the printers name or the spaces I used, but thanks to an article by Tomas, I got it working.  Here's how:

1.  Runas /u:administrator net start "windows firewall"  (you'll have to know the local admin password)
2. Share your printer
3. Runas /u:administrator net stop "windows firewall"

Leave a comment if this doesn't work for you.

Wednesday, January 18, 2012

Windows 2008 R2 Server Core Installation​​​


After the normal hardware/firmware setup, insert the Windows 2008 R2 x64/x32 DVD and select Windows 2008 R2 Standard/Enterprise Server Core Version.  Complete installation as normal.  When the system has booted two times, you'll be prompted to input the new Administrator password twice.  Instead of the standard desktop via Windows Explorer, you'll have a permanent command shell.  This list of instructions will get you started with the new interface.  


Use this command to show the network cards:

netsh interface ipv4 show interfaces

note = Idx - use to add features to the NIC instead of having to type out "Local Area Connection" in following NIC commands



Set the IP version 4 address information for the destination NIC:

netsh inter ipv4 set address name=3 source=static address=xxx.xxx.xxx.xxx mask=255.255.255.xxx gateway=xxx.xxx.xxx.xxx



Set DNS servers (index 1 has higher priority than subsequent numbers):

netsh inter ipv4 add dnsserver name=3 address=xxx.xxx.xxx.xxx  index=1

netsh inter ipv4 add dnsserver name=3 address=xxx.xxx.xxx.xxx  index=2



Change Server Name:

netdom renamecomputer %computername% /NewName:My-NewServer01
Note = Reboot required  -  shutdown /r /t 0   <- Reboot command



There is a good suite of GUI-based tools to make your job easier.  Download the tool to a memory stick or CD then make a folder on your C: drive and copy the files into it.

for example:

md c:\gui

copy d:\. c:\gui

c:

cd\gui

run the command -> visualcore2008.exe

Use the visualcore2008 tool to update all the security patches before joining the domain.

(You can also run SCONFIG.CMD from any folder.  The MS tool has some nice features)



To join the Domain:

netdom join My-NewServer01 /domain:My.Domain.com /userd:xxxxxx /passwordd:xxxx

note = reboot required  shutdown /r /t 0



If you need to leave the Domain:

netdom remove My-NewServer01 /domain:My.Domain.com /userd:xxxxx /passwordd:xxxx



Adding the product key to the Server:

slmgr.vbs –ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx (use the dashes)

note = wait for acknowledgement



Once the key has been added, activate the server:
slmgr.vbs -ato
note = wait for confirmation



If you want to check the license:

slmgr.vbs /dli



Setup Server for RDP:

cscript C:\Windows\System32\Scregedit.wsf /ar 0

cscript C:\Windows\System32\Scregedit.wsf /ar /v

cscript C:\Windows\System32\Scregedit.wsf /cs 0

netsh advfirewall firewall set rule group="Remote Desktop" new enable=yes


You'll also want to add users to your "Remote Desktop Users" group:

net localgroup "Remote Desktop Users" "domain\domain admins" /add



When you're finished with your session, you can logout via:


shutdown /L


If this is a VM, install the tools via the console: VM, Guest, Install VMWare Tools

Check Vsphere server summary when finished.

References:

Thursday, October 20, 2011

Multiple Domain Hosting on one IP address using IIS 7

I'm working on finding a way to save IP addresses while hosting several redirection IIS sites.  I've burned three IP's and have been playing with the possibility of combining them into one IP.  Here are my findings that you can replicate on your IIS7 server:

  1. Add your new IP address to the production NIC group of IPs via the NIC's IPv4 properties
  2. Create your new IIS sites:
    1. I used Tom, Bob, and Ed for my new sites
    2. Ensure you've created default document pages for each site (default.htm or .asp)
    3. Tom is the anchor site which I connected bindings to the new IP address.  I selected the new IP address from the bindings menu and ensured there was no host name.
  3. Now that you've added the new IP address to your NIC, you should notice a new A record in DNS for your domain.  Edit this Host(A) entry to something specific to your new sites; I used MyHostTom.domain.com - connecting the DNS name to the anchor sites IP address
  4. I don't know if it's necessary but I also added a pointer record going to myhosttom.domain.com
  5. Insert an alias record in your domain DNS of Tom and point it to myhosttom.domain.com (the A record you made earlier).
  6. Use your web browser to test your DNS table by going to your new site via it's DNS address
  7. If your sites default page opens properly, then you can connect your other sites to your anchor site
    1. Go to the bindings for Bob and select "All unassigned" addresses and input bob.domain.com
    2. For your third site Ed, use *All unassigned* and ed.domain.com
  8. IIS will now read the incoming expected DNS name and route to the correct site via the anchor site of Tom.
If you have any questions about this post, as it's pretty full of acronyms and kinda vague, leave a comment or send me an email.  Thanks for reading.



Friday, September 23, 2011

Manipulating FrontPage 2002 Server Extensions in Windows 2008 Server

My recent task was to help move FrontPage 2002 websites from a Windows 2000 server utilizing IIS 5.0 to a new Windows 2008 R1 server with IIS 7.0.  Microsoft stopped supporting FrontPage Server Extensions (FPSE) in IIS 7 so a third party company named Ready-to-Run created a solution.  Beware though, for Windows 2008 R1, there is no need for a separate license server.  But, for 2008 R2, which is IIS 7.5, the FPSE add-on requires a separate license server if Windows 2008 is hosted on a virtual machine.  This requires at least 5 ports to be opened in your firewall plus having a dependency on a another (physical) computer to host the license file and associated program/service.


Adding the FPSE software is relatively easy.  IIS.Net has great information about this process. Warning:  logon as the Administrator and perform all duties as the Administrator, no matter what your user permissions are.  UAC creates unusual and unexpected results if you don't run as Administrator -- especially if running from the PowerShell or Command line.  Another note, ASP from IIS 5.0 uses .Net 2.0 and IIS 7.x uses .Net 3.0 (integrated).


FPSE comes with a powerful command line executable you may want to use if you have several websites, subwebs, and/or users and permissions to populate.  Combined with PowerShell, you can create some simple CSV files, input your information, and build your web environment without having to the use SharePoint Designer GUI in a painstakingly slow building process.


Using IIS, create a parent website that will host the subwebs.  Assign it's IP, port, etc. Use the SharePoint Admin web interface to extend the website with FPSE.  Once created and extended, click on IIS/Sites locate your new websites ID number.  That will be important for the scripts.


Creating subwebs using PowerShell and OWSADM:
The FPSE executable OWSADM.EXE is located in "%systemdrive%\program files (x86)\common files\microsoft shared\Web Server Extensions\50\bin".  Open a cmd.exe window and CD your way to the owsadm.exe location.  This is the syntax for creating a subweb:
owsadm.exe -o create -w /Subwebname -m YourParentSiteID -u InitialSubwebAdmn -pw (don't have to use)
Example:
owsadm -o create -w /TestSubWeb -m 4 -u Administrator -pw MyPa$$w0rd


Once your subsite is created, you can add users and roles.  To do so, follow this syntax:
owsadm -o roleusers -w /Subwebname -c add -u user1,user2,user3 -n Browser -m YourParentSideID
Example:
owsadm -o roleusers -w /TestSubWeb -c add -u Bob,Tom,Wilma -n Browser -m 4
(no spaces between users and commas and for Advanced author use Advauthor)


If you have several websites, subsites, and users, it might be worth your while to create CSV files to import into a couple of PowerShell scripts.  PowerShell is powerful and requires you to run it as Administrator.  Also, you have to turn on scripting for PS via the "set-executionpolicy Unrestricted."  Default is Restricted.  I mention how to change it in a previous blog post.  


Create a CSV for your Subwebs:



ParentWeb,Subweb,Admin,Password
4,2014,dbadmin,password

4,TestSubweb,Admin,password



Save this file as Subwebs.csv in the same folder as you'll run your PowerShell script from (I suggest from the owsadm.exe folder)


Create a PowerShell script:



import-csv Subwebs.csv|foreach {
$parent = $_.ParentWeb
$subweb = $_.Subweb
$admin = $_.Admin
$password = $_.Password
.\owsadm.exe -o create -w /$subweb -m $parent -u $admin
}


In this script I left out the password portion as the user accounts were already created and I ddn't want to jeopardize them.  You can add and use -pw and input the data from column four of the Subwebs.csv, just remember to add -pw $password to the owsadm line.


Once the subwebs are created, you can work on inputting your users and their subweb roles.  Create Webperms.csv and add users and roles:



Subweb,User,Perm
2014,brad,Browser
2014,anslo,advauthor


Save to the owsadm.exe folder then create a PowerShell script:



import-csv Webperms.csv|foreach {
$perm = $_.Perm
$user = $_.User
$subweb = $_.Subweb
.\owsadm.exe -o roleusers -w /$subweb -c add -u $user -n $perm -m 4
}

Now you can consult with your webmaster to get all the information about moving sites over to a new server.  Update the CSV files with the appropriate information and run the PowerShell scripts when you're finished dotting your I's and crossing your T's.  Both owsadm.exe and PowerShell are syntax picky so ensure there's no extra spaces, quotes, or other extraneous marks in your commands or CSV files.


Please leave comments if this article helped you or you need more information.  I wrote it with the assumption that you are well-versed in server administration and some scripting knowledge.  Enjoy!


References:
http://technet.microsoft.com/en-us/library/cc768032.aspx
http://support.microsoft.com/kb/272945
http://support.microsoft.com/kb/838684
http://learn.iis.net/page.aspx/134/installing-the-frontpage-server-extensions-on-iis-7/