Friday, September 26, 2014

Commands to elevate Server Core 2008 to a Domain Controller

Ok, this post is going to be a lot more technical than previous posts. In fact I'm going to assume a few things, first you know what a Windows 2008 Server Core is. Second you know what a domain controller is, DHCP, DNS and server roles. If you didn't understand what any of that is, you won't know have much of a clue as to what the commands do. I also assume you are a domain or server admin. Since I'm assuming such things I won't go into detail about the commands. 

This came about as I was setting up a few server core installations at work. I had trouble finding all the commands I needed in one spot. Wording in red are the items that need to be specific to the server you are setting up, such as server name and IP address. I've highlighted the commands that need to be entered into the command prompt. All the commands are listed in order. 

Powershell

sconfig 
--This will bring up a blue PowerShell window where you can select different options such as Windows updates. Some of the commands listed below can be done using PowerShell. If you want to minimize using the command prompt this is a good option. It's up to you as it does the same thing. The process of promoting the server to a domain controller cannot be done using PowerShell.

To set the local user password
net user administrator *"

This will give you a prompt to set the password

To change the computer name
netdom renamecomputer %computername% /NewName:MyServerCore

To setup a static IP address and DNS server
netsh interface ipv4 set address name="Local Area Connection" source=static address=192.168.1.100 mask=255.255.255.0

netsh interface ipv4 add dnsserver name="Local Area Connection" address=192.168.1.1 (IP address of DNS server)

To join a domain
netdom join %computername% /domain:MyDomain /userd: MyDomain\MyLogin /passwordd:*

To setup the local time and set the timezone
control timedate.cpl

--This will launch the GUI found on other versions of Windows

To enable remote desktop /RDP
cscrip %windir%\system32\SCRegEdit.wsf /ar 0

Disabling Firewall
netsh advfirewall set allprofiles state off 
The following is the command line for promoting a Server Core 2008 R2 to a DC                 
Dcpromo.exe  /unattend /confirmGC: yes /DatabasePath:”c:\Windows\NTDS” /logpath:”c:\ntdslog s” /sysvolpath:”C:\sysvol” /SafemodeAdminPassword:Password /ReplicaOrNewDomain:replica /Userdomain:domain /Username:admin name /Password:admin password /ReplicaDomainDNSName: domain FQDN /rebootoncompletion:yes

This link will show all the available DC promo commands. http://technet.microsoft.com/en-us/library/cc732887(v=ws.10).aspx I haven’t found it necessary to use more than the command switches above.

To add different roles to the server use one of the following commands
--For DNS
                Start /w ocsetup DNS-Server-Core-Role


--For DHCP
                start /w ocsetup DHCPServerCore
                sc config dhcpserver start= auto
                net start dhcpserver

--DNS and DHCP are best configured using the MMC snap in from a Windows 7 desktop connected to the server.

--For print services role
                start /w ocsetup Printing-ServerCore-Role
                start /w ocsetup Printing-LPDPrintService

Printers can be added and configured using the Print Management snap in from your Windows 7 desktop.
  1. Determine the IP address or host name of the printer. This may be on the printer's test or printer configuration page or you might need to refer to the manufacturer's documentation for instructions.
  2. Verify that the print server can communicate with the printer through the network by pinging the printer from the print server.
  3. On another computer running Windows 7 or Windows Server 2008, open the Print Management console and add the server running the Server Core installation.
  4. Expand the entry for the print server running a Server Core installation, right-click Drivers, and then click Add Driver. The Add Printer Driver Wizard starts
  5. Complete the wizard to install the printer driver for your printer.
  6. In the Print Management console, right-click Printers and then click Add Printer. The Network Printer Installation Wizard starts.
  7. Click Add a TCP/IP or Web Services printer by IP address or hostname and then click Next.
  8. Enter the printer's host name or IP address (the port name will be the same by default), and then click Next.
  9. Make any necessary changes to the printer name, contact information, or sharing status, and then click Next.


To add the Active Directory Lightweight Directory Services role
            start /w ocsetup DirectoryServices-ADAM-ServerCore

AD is also best configured using the MMC snap in from a Windows 7 desktop connected to the server.

Demoting a Server Core domain controller 
I had trouble with domain replication for one of our branch servers. When I tried to force replication it kept getting an error and of course it wouldn't do it on it's own. The best solution seemed to be to demote it as a DC and re-promote it. The commands to do that seemed difficult to find, so I added them to this post.

dcpromo /unattend /forceremoval /demotefsmo:yes /username:<domain admin> /userdomain:<domain> /password:<DA password> /administratorpassword:<local admin password>

dcpromo /unattend /uninstallbinaries

Then just re-run the commands to promote it to a DC. If you use the command below to dis-join it from a domain, you'll need to re-join it to a domain before promoting it.

Remove server from a Domain
netdom remove /d:%USERDOMAIN% %COMPUTERNAME%


Tuesday, September 23, 2014

Amazon Instant Video on your Android phone

For awhile Amazon's Instant Video only worked if you installed a third party browser (Chrome does not support flash) and the Adobe Flash apk.  In my experience this worked, but was not optimal for mobile viewing. To make it work on a Nexus 7, I had to install the Dolphin browser with the jetpack add-on. I also had to install the Adobe Flash apk. Since it is no longer in the Google play store, that meant downloading and saving it to my device to install it.

Now you can install the Amazon Instant Video app on your phone or tablet, though as of this writing it only works on a phone. I have only tested this so far on a Nexus 5 and Nexus 7 with Android 4.4.4 and an ASUS Transformer 101 with Android 4.0.

I should clarify that if you already have the Amazon app store app you can skip this part and go straight to installing the Instant Video app. Right now it's a convoluted method to get the Instant Video app but it works better than modifying a mobile browser. Why Amazon can't just release it along side their other apps in the Google Play store is beyond me. I suppose they still don't want people to know about it to try and entice people to buy a Fire tablet or phone.

You'll need an Amazon account, preferably with Prime to watch Prime Instant videos. First you will need to install the Amazon Appstore App. Annoyingly this is also not available in the Google Play Store. If you do a search in the play store, Amazon Appstore Installer from Sweet Wind will come up. This is not the one you want.

You'll need to modify your security settings in Android to allow installation of non-play store apps. Go to --> settings --> security --> make sure the box next to unknown sources is checked.  Open up a browser on your device and go to  http://www.amazon.com/getappstore. Click on download the Amazon Appstore. Follow the on screen prompts to install it once it has downloaded.  From here open up the Amazon Appstore which should now be in your app drawer. You will have to enter your Amazon logon but this should only happen once. Below is what the app should look like once installed.


Search for Amazon Instant Video. It is generally the first app that comes up. Install the app and once it's done navigate to your app drawer. For some reason I got a warning that says I already owned the app. I ignored the warning and re-installed the app. In your app drawer look for the green icon labeled Instant Video.

Open it up and you're done. So far this hasn't worked on tablets; instead it just opens up the default browser to Amazon. On my phone this works fine on WiFi or 4G. Though if you are using 4G it prompts you if you want to limit viewing to WiFi. If you tap the 3 bars in the top left a pop out menu appears and you can navigate to your watch list or video library. Viewing is nice with no noticeable choppiness and it's a lot easier to navigate and use than running it in a mobile browser.


While this is a nice addition, the limitation to phones and the fact it's too many steps to download make it less appealing than using Netflix or Crackle. Still I can say, it's about time Amazon. I can understand trying to keep Instant Video propriety to their Fire tablets and phone however I'm paying for the service so why do I have to jump through hoops to use it.