MCSA Windows Server 2012 R2: Difference between revisions
mNo edit summary |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 57: | Line 57: | ||
==Convert from Full to Core and vice-versa== | ==Convert from Full to Core and vice-versa== | ||
After a while looking at the videos, I decided there was some need for the full desktop. So, mounted the iso again .. I had to use DISM (Deployment Image Servicing and Management Tool) because of a problem I seemed to have not finding the source. More info of my problem [http://social.technet.microsoft.com/Forums/windowsserver/en-US/6eb62cdc-ae43-48b1-873e-9903c3bc73a7/powershell-to-add-gui-to-server-core-servercorefullserver?forum=winserver8gen here] | After a while looking at the videos, I decided there was some need for the full desktop. So, mounted the iso again .. I had to use DISM (Deployment Image Servicing and Management Tool) because of a problem I seemed to have not finding the source. More info of my problem [http://social.technet.microsoft.com/Forums/windowsserver/en-US/6eb62cdc-ae43-48b1-873e-9903c3bc73a7/powershell-to-add-gui-to-server-core-servercorefullserver?forum=winserver8gen here] | ||
<source lang="powershell"> | <source lang="powershell"> | ||
Line 77: | Line 78: | ||
Uninstall-WindowsFeature -name gpmc -vhd "Path\to\file.vhdx" -Remove | Uninstall-WindowsFeature -name gpmc -vhd "Path\to\file.vhdx" -Remove | ||
# The remove flag will actually remove the binaries ( payload ) from the disk, not only disable them. | # The remove flag will actually remove the binaries ( payload ) from the disk, not only disable them. | ||
</source> | |||
You can get a full list of names and services with this powershell cmdlet: | |||
<source lang="powershell"> | |||
get-windowsfeature | |||
</source> | </source> | ||
Line 87: | Line 94: | ||
Remove-WindowsFeature Server-Gui-Shell –Restart | Remove-WindowsFeature Server-Gui-Shell –Restart | ||
# you can do ''shutdown /r /t 0'' if you don't use ''-Restart'' | # you can do ''shutdown /r /t 0'' if you don't use ''-Restart'' | ||
</source> | |||
==Configuring== | |||
You can do alot with the powershell cmdlets but there are other ways too. A nice tool is: ''sconfig''. It was introduced with WS2K8. | |||
===Configuring networking=== | |||
You can view your current configuration with this: | |||
<source lang="powershell"> | |||
ipconfig /all | |||
</source> | |||
First, we need the Idx/Name for the interface | |||
<source lang="powershell"> | |||
netsh interface ipv4 show interfaces | |||
# you can use ''index=Idx'' instead of ''name=Ethernet'' | |||
netsh interface ipv4 set address name=Ethernet source=static address=10.0.2.15 mask=255.255.255.0 gateway=10.0.2.254 | |||
netsh interface ipv4 add dnsserver name=Ethernet address=10.0.2.253 index=1 | |||
</source> | |||
===Changing computer name=== | |||
Not recommended to be done on a CA. | |||
Even though ipconfig/set can show you the computername, use this: | |||
<source lang="powershell"> | |||
hostname | |||
</source> | |||
Here's how to change it. | |||
<source lang="powershell"> | |||
# %cmputername% = current computer name variable | |||
netdom renamecomputer %computername% /new:VBox01 /userd:Administrator /passwordd: /reboot:0 | |||
</source> | |||
===Joining a domain=== | |||
<source lang="powershell"> | |||
netdom join %computername% /domain:VBDom.com /userd:Administrator /passwordd: /reboot:5 | |||
</source> | |||
===Creating/Managing user accounts/groups=== | |||
<source lang="powershell"> | |||
net user VBoxUser /add * | |||
# will ask you a password | |||
</source> | |||
<source lang="powershell"> | |||
net localgroup Administrators /add VBoxUser | |||
</source> | |||
You can check a user's settings/info: | |||
<source lang="powershell"> | |||
net user VBoxUser | |||
</source> | |||
===Enable remote administration in firewall=== | |||
<source lang="powershell"> | |||
netsh advfirewall firewall set rule group="remote administration" new enable=yes | |||
</source> | |||
===Disable the firewall=== | |||
<source lang="powershell"> | |||
netsh advfirewall set allprofiles state off | |||
</source> | |||
===Reset firewall=== | |||
This should set you to the out of the box rules: | |||
<source lang="powershell"> | |||
netsh advfirewall reset | |||
</source> | |||
==Remote Management== | |||
It can be done by using a tool named ''winrm'' like this on the host machines: | |||
<source lang="powershell"> | |||
winrm quickconfig # short qc | |||
</source> | |||
You can test from another host ( like the DC ). This should yell some output. | |||
<source lang="powershell"> | |||
winrm id -remote:<hostname> | |||
</source> | |||
Checking free memory on the remote machine: | |||
<source lang="powershell"> | |||
winrm g wmicimv2/Win32_OperatingSystem -fragment:PhysicalMemory -r:<hostname> | |||
</source> | |||
Running a remote config: | |||
<source lang="powershell"> | |||
winrs -r:<hostname> ipconfig /all | |||
</source> | </source> |
Latest revision as of 16:10, 15 July 2014
EXAMS
As you can see on the page above, there are multiple paths you can take. I choose the WS2K12R2 one.
It is composed of 3 exams.
Installing and Configuring Windows Server 2012 Exam: 70-410
Administering Windows Server 2012 Exam: 70-411
Configuring Advanced Windows Server 2012 Services Exam 70-412
Books are available at microsoftpressstore.com
I'm using en_windows_server_2012_r2_with_update_x64_dvd_4065220.iso in a virtualbox/vmware environment.
I'm also watching CBTNuggets video training
The guys at Infiniteskills, VTC and Pluralsight have nice video trainings too.
The guys at examcollection provide a big test base. Also Microsoft points to Transcender and others to test your skills before the exam.
Steps
After installing it in a virtualbox environment .. The process was easy. Just *click click*. I started with the Standard core edition.
Check and enable remote desktop
cd c:\windows\system32
cscript scregedit.wsf /AR /v
Will yell 1 by default ( which means disabled. )
Enabled the remote desktop:
cd c:\windows\system32
cscript scregedit.wsf /AR 0
Running the cscript scregedit.wsf file without any params will yell other stuff you can do like:
/AU - Manage Automatic Windows Updates
/AR - Allow Remote Administration Connections
/CS - Allow connections from previous versions of Windows
/IM - IPSec monitor
/DP - DNS SRV Priority
/DW - DNS SRV Weight
/CLI - CLI reference
Convert from Full to Core and vice-versa
After a while looking at the videos, I decided there was some need for the full desktop. So, mounted the iso again .. I had to use DISM (Deployment Image Servicing and Management Tool) because of a problem I seemed to have not finding the source. More info of my problem here
Import-Module ServerManager
mkdir c:\mountdir
Dism /get-wiminfo /wimfile:<drive>:sources\install.wim # I used drive d
Dism /mount-wim /WimFile:<drive>:\sources\install.wim /Index:<ID_from_step_2> /MountDir:c:\mountdir /readonly # my index was 2 for the standard installation, datacenter was also an option there ..
Install-WindowsFeature Server-Gui-Mgmt-Infra,Server-Gui-Shell –Restart –Source c:\mountdir\windows\winsxs
The reason I had to use dism was because for some reason, it couldn't find the source to download it ( altough I had net access ). You could try directly the powershell cmdlet without the -Source param.
Also, other interesting cmdlets are Uninstall-WindowsFeature ( with -Remove ) and Remove-WindowsFeature
The nice thing is that you can even do this to vhd ( Hyper-V VirtualHardDisk files ).
# This will remove Group Policy Management Console
Uninstall-WindowsFeature -name gpmc -vhd "Path\to\file.vhdx" -Remove
# The remove flag will actually remove the binaries ( payload ) from the disk, not only disable them.
You can get a full list of names and services with this powershell cmdlet:
get-windowsfeature
Minimal Server
From a full install, it's as simple as:
# you can add a ''-whatif'' to check if it'll affect other programs.
Remove-WindowsFeature Server-Gui-Shell –Restart
# you can do ''shutdown /r /t 0'' if you don't use ''-Restart''
Configuring
You can do alot with the powershell cmdlets but there are other ways too. A nice tool is: sconfig. It was introduced with WS2K8.
Configuring networking
You can view your current configuration with this:
ipconfig /all
First, we need the Idx/Name for the interface
netsh interface ipv4 show interfaces
# you can use ''index=Idx'' instead of ''name=Ethernet''
netsh interface ipv4 set address name=Ethernet source=static address=10.0.2.15 mask=255.255.255.0 gateway=10.0.2.254
netsh interface ipv4 add dnsserver name=Ethernet address=10.0.2.253 index=1
Changing computer name
Not recommended to be done on a CA.
Even though ipconfig/set can show you the computername, use this:
hostname
Here's how to change it.
# %cmputername% = current computer name variable
netdom renamecomputer %computername% /new:VBox01 /userd:Administrator /passwordd: /reboot:0
Joining a domain
netdom join %computername% /domain:VBDom.com /userd:Administrator /passwordd: /reboot:5
Creating/Managing user accounts/groups
net user VBoxUser /add *
# will ask you a password
net localgroup Administrators /add VBoxUser
You can check a user's settings/info:
net user VBoxUser
Enable remote administration in firewall
netsh advfirewall firewall set rule group="remote administration" new enable=yes
Disable the firewall
netsh advfirewall set allprofiles state off
Reset firewall
This should set you to the out of the box rules:
netsh advfirewall reset
Remote Management
It can be done by using a tool named winrm like this on the host machines:
winrm quickconfig # short qc
You can test from another host ( like the DC ). This should yell some output.
winrm id -remote:<hostname>
Checking free memory on the remote machine:
winrm g wmicimv2/Win32_OperatingSystem -fragment:PhysicalMemory -r:<hostname>
Running a remote config:
winrs -r:<hostname> ipconfig /all