2015년 10월 11일 일요일

Presentation about Shell-based Windows Server Administration

 

쉘을 활용한 Windows Server 관리 
2015.10.11-shell-admin-ws-old-ppt-01

(무려 16개월 전) 2014.04.26 발표했던 자료인데, 블로그를 되살리면서(?) 썰렁함을 이겨내기 위해 포스팅합니다.

발표에 사용된 명령어/스크립트 다운로드
http://1drv.ms/1lSgHXy

 

 

참고자료

What is Shell? Wikipedia
http://en.wikipedia.org/wiki/Shell_(computing)
http://ko.wikipedia.org/wiki/셸

Console Emulator
cmder http://bliker.github.io/cmder/
conemu-maximus5 https://code.google.com/p/conemu-maximus5/
clink http://mridgers.github.io/clink/
ckw http://d.hatena.ne.jp/hideden/20071115/1195229532

To run scripts using the command-line-based script host (Cscript.exe)
http://goo.gl/6UkQMV

To run scripts using the Windows-based script host (Wscript.exe)
http://goo.gl/ThUyqx

MS12-020: Description of the security update for Terminal Server Denial of Service Vulnerability: March 13, 2012
http://support.microsoft.com/kb/2667402/en-us

svchost.exe_TermService crashes after installation of KB2621440
http://goo.gl/tzHO5b

DiskPart Command-Line Options
http://technet.microsoft.com/en-us/library/cc766465(WS.10).aspx

Installing SQL Server 2012 on Server Core 2012
http://www.maxtblog.com/2012/07/installing-sql-server-2012-on-server-core-2012/

Installing SQL Server 2012 on Windows Server Core ParT 3
http://www.mssqltips.com/sqlservertip/2725/installing-sql-server-2012-on-windows-server-core-part-3/

Quick Guide to the Virtual Switch in Hyper-V Server 2012
http://www.altaro.com/hyper-v/virtual-switch-hyper-v-server-2012/

Manage Hyper-V with PowerShell
http://windowsitpro.com/hyper-v/manage-hyperv-powershell

How to Change Your IP Address Using PowerShell
http://www.howtogeek.com/112660/how-to-change-your-ip-address-using-powershell/

PowerShell remoting between two workgroup machines
http://blogs.msdn.com/b/wmi/archive/2009/07/24/powershell-remoting-between-two-workgroup-machines.aspx

Install Active Directory Domain Services (Level 100)
http://technet.microsoft.com/en-us/library/hh472162.aspx

Install a Replica Windows Server 2012 Domain Controller in an Existing Domain (Level 200)
http://technet.microsoft.com/en-us/library/jj574134.aspx

Netdom query
http://technet.microsoft.com/en-us/library/cc835089.aspx

Invoke-WebRequest
http://technet.microsoft.com/en-us/library/hh849901.aspx

How to join a domain from the command line
http://support.microsoft.com/kb/150493/en-us

Set-VMMemory
http://technet.microsoft.com/en-us/library/hh848572.aspx

Mount-DiskImage
http://technet.microsoft.com/en-us/library/hh848706.aspx

GNU utilities for Win32
http://unxutils.sourceforge.net

2012년 12월 5일 수요일

2012년 6월 8일 금요일

Windows 8 RP Bug - Can not input specific Korean character in Messenger App

 

image

Screenshot from Wikipedia 한글자판

 

  10년 이상 세벌식을 사용하고 있다. 그래서,  Windows Client의 한글 입력에 대해서는 항상 예민하게 체크하게 된다.

   메신저 앱에서 특정 문자 "'"를 입력할 수 없는 버그가 Windows 8 RP에서도 고쳐지지 않고 있다. (CP에서도 있었던 문제임)

 

 

1. 증상

image

메시지 앱에서 처음에는 두벌식 자판으로 세팅하고 *퇴근*을 입력하면 잘 된다.

세벌식(390)으로 자판을 변경하고 다시 동일한 문장을 입력하려고 시도하면 위의 스크린샷처럼 대신 (Apostrophe)가 입력된다. :-(

 

 

2. 세벌식(390)으로 자판 변경하는 방법

image

제어판 –> 시계, 언어 및 국가별 옵션 -> 언어 선택

 

 

image

옵션 클릭

 

image

세벌식 390 자판 선택

2012년 5월 11일 금요일

Presentation about DHCP Server for Windows Server 2012


어제(20125.05.10) 스터디모임에서 발표했던 자료를 공유합니다.
그리고, 발표에 참고했던 링크만 빼내어서 아래 정리해 두었으니 관심있는 분들은 살펴보세요.

참고자료

2012년 3월 20일 화요일

Deduplication Test on Windows Server 8 Beta

2012.03.20-dedup-on-ws8beta-02

 

Deduplication 테스트는 너무 쉬워서 상세 설명은 생략함. 결과만 공유~

 

참고자료

Upgrading vSphere 5.0 Update 1 with CLI interface

 

2012.03.20-vs5u1-status

 

vSphere 5.0 Update 1 패치 적용과정을 정리함

 

  • 업데이트 파일을 vSphere Host 에 업로드해 두었다고 가정 (winscp 이용)
    /vmfs/volumes/datastore1/update-from-esxi5.0-5.0_update01.zip

 

  • vSphere Host를 Maintenance 모드로 변경
C:\> vicfg-hostops.pl --server giseong-pc03 --username=root --password=암호 --operation enter
Host giseong-pc03 entered into maintenance mode successfully.
 


  • esxcli 명령으로 Update

C:\> esxcli --server=giseong-pc03 --username=root --password=암호 software vib update
--depot=/vmfs/volumes/datastore1/update-from-esxi5.0-5.0_update01.zip

Installation Result
Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
Reboot Required: true
VIBs Installed: VMware_bootbank_ehci-ehci-hcd_1.0-3vmw.500.1.11.623860.................
 


  • vSphere Host를 Reboot 한다.

C:\> vicfg-hostops.pl --server giseong-pc03 --username=root --password=암호 --operation reboot
Host giseong-pc03 rebooted successfully.
 


  • reboot 완료된 vSphere Host를 Maintenance 모드에서 일반 모드로 변경한다.

C:\> vicfg-hostops.pl --server giseong-pc03 --username=root --password=암호 --operation exit
Host giseong-pc03 exited from maintenance mode successfully.
 

 


참고자료


2012년 1월 20일 금요일

Testing Storage Space on Windows Server 8 dev. preview

 

image

- Storage Space Virtual-Disk가 추가된 상태

 

 

배경

Windows 8 빌드 블로그 의 Storage Space 기능을 보고 간단히 테스트하고 싶어졌다. 그런데.. Developer Preview 버전에서는 GUI를 이용해서 작업할 수 없다고 한다. 하지만 뭐 PowerShell 로 할 수 있다면.. Just go on ~!!!

 

 

테스트 환경

 

image

VMware Workstation 8.0.1 에서 Windows Server 8 VM을 생성했다.  주의해서 볼 내용은

  • 72G Disk * 1 - C:\ 드라이브 / 시스템 디스크)
  • 10G Disk * 2 - Storage Space 테스트 용도

 

 

image

Disk Management MMC 에서 현재 10G Disk 2개가 Offline 상태인 것을 볼 수 있다.

 

 

Storage Space 생성 및 사용

 

image

Get-PhysicalDisk cmdlet 명령으로 Storage Space 용도의 10G 디스크 2개 확인

 

 

image

New-StoragePool cmdlet 명령으로 "SS Testing” 이라는 Storage Pool을 생성한다. Friendly 옵션이 중요하다. 왜냐하면 복잡한 ID 대신 자주 사용하기 때문이다. 경력이 쌓일 수록 떨어지는 기억력~

 

 

 

image

전 단계에서 생성한 “SS Testing” Pool 에서 2TB Virtual Disk를 생성한다. (20G가 아닌 2TB임을 주목하자)

 

 

image

Disk Management MMC 에서 현재 2TB Disk 1개가 표시된다. 이제 포맷해서 사용하면 된다. (10G 디스크들의 정보는 보이지 않는다)

E:\ 드라이브로 포맷완료.

 

 

image

Device Manager 에서는 Storage Space Device가 하나 추가되었다. 그리고, Disk Management MMC 에서 보이지 않던 10G 디스크들이 목록에 표시되어 있다.

 

 

image

등록 정보를 보면 2TB 라고 표시되어 있다.

 

 

Storage Space 쓰기 테스트

 

 

정말 2TB까지 쓸 수 있을까 싶어서 4G짜리 Exchange 2010 ISO 이미지를 E:\ 드라이브로 복사 테스트를 했다....

image

18G 정도까지는 이상없다가 20G를 넘는 데이터를 쓰려고 시도하는 순간....

 

image

"The device is not ready” 메시지와 함께 E:\ 드라이브가 사라졌다. 재부팅하니까 정상적으로 E:\ 드라이브가 돌아왔다. ^^

 

 

 

 

Storage Space 삭제

 

 

image

처음에 했던 작업의 역순으로 하면 된다. Remove-VirtualDisk cmdlet 명령을 이용한다.

 

 

image

마찬가지로 Remove-StoragePool 명령을 이용한다.

여기까지 마치면...

 

 

image

Disk Management MMC 에서 10G Disk들이 다시 표시된다.

 

 

image

Device Manager 에서는 Storage Space Device가 사라진 것을 볼 수 있다.

 

 

참고자료

2012년 1월 17일 화요일

Delegate Service Control on Windows Server 2008 R2

 

image

일반 사용자 계정이 속한 그룹 목록 (whoami  명령을 이용했다)

 

 

image

일반 사용자는 기본적으로 서비스를 제어할 권한이 없다. (DNS Client 서비스)

 

Helpdesk 직원에게 Service 제어를 위임하고 싶다.

 

1. Group Policy 이용

 

image

DNS Client 에 대한 서비스 제어 권한을 위임하는 GPO를 하나 작성해서 Link하면 끝. !!!!

 

 

 

2. subinacl 명령을 이용

Windows Server 2003 Resource Kit에 포함된 SubinACL 명령을 이용해서 해당 장비에서 설정

 

SubinACL.exe 명령 다운로드

http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=23510

subinacl 명령은 반드시 관리자 권한으로 실행한 cmd 에서 실행한다.

 

 

image

DNS Client (DNSCACHE) 서비스에 대해서 현재 권한 설정을 조회.

subinacl /SERVICE dnscache /display

 

 

image

BLUEHOLE\giseong.eom 계정에게 DNS Client (DNSCACHE) 서비스의 Full Control 권한을 위임

subinacl /SERVICE dnscache /GRANT=BLUEHOLE\giseong.eom=F

 

 

image

DNS Client (DNSCACHE) 서비스에 대해서 현재 권한 설정을 다시 조회.

BLUEHOLE\giseong.eom 계정에 대한 설정이 추가된 것을 볼 수 있다.

 

 

 

 

image

위임한 권한 설정을 삭제할 때에는 /REVOKE 명령을 이용한다.

subinacl /SERVICE dnscache /REVOKE=BLUEHOLE\giseong.eom

 

 

 

참고자료

2012년 1월 16일 월요일

If your corp network is congured as A Class, what’s your plan?

 

 

image

출처: http://blogs.technet.com/b/koalra/archive/2012/01/16/30-windows-server-tcp-ip.aspx

 

완전 짜증나는 legacy 인데, 변경을 시도하기엔 돈과 시간이 없다. ㅠ.ㅠ  TechNet Webcast 의 질문을 보다가 생각이 나서 올려 봄

2011년 12월 28일 수요일

VMware Workstation 8 runs smoothly on Windows 8 Dev. preview

 

2011-12-28_133842

 

VMware Workstation 8.0 은 Windows 8 Developer Preview 에서 잘 설치되고 실행된다. (인증샷~)

Enable Clipboard Copy and Paste in vSphere Client

 

image

이슈


    VMware Workstation의 경우, VMware Tools 설치가 끝나면 일반 텍스트, 바이너리 파일 등의 다양한 컨텐츠를 Host <---> Guest 서로 복사할 수 있다. 하지만 vSphere Client의 경우 설치 직후엔 아무것도 복사할 수 없다. Hyper-V Client처럼 적어도 일반 텍스트는 복사할 수 있으면 좋겠는데.

 

해결책

VMware KB 1026437 을 참고한다. 다음의 2가지 방법이 가능하다.

  • GuestVM 수준의 설정 변경 (해당 Guest VM만 적용됨)

Log into a vCenter Server system using the vSphere Client and power off the virtual machine.

  1. Select the virtual machine and click the Summary tab.
  2. Click Edit Settings.
  3. Navigate to Options > Advanced > General and click Configuration Parameters.
  4. Click Add Row.
  5. Type these values in the Name and Value columns:
    isolation.tools.copy.disable – false
    isolation.tools.paste.disable – false

 

  • vSphere Host 수준의 설정 (전체 Guest VM에 적용됨)
  1. Log in to the ESX/ESXi host as a root user and open the /etc/vmware/config file using a text editor.
  2. Add these entries to the file:
    isolation.tools.copy.disable="FALSE"
    isolation.tools.paste.disable="FALSE"
  3. Save and close the file.
    The Copy and Paste options are only enabled when the virtual machines restart or resume the next time or shutdown and power-on the VM for changes to take effect

 

참고자료

  • VMware KB 1026437: When attempting this for Redhat VMs, I had to enable on a per virtual machine basis.Clipboard Copy and Paste does not work in vSphere Client 4.1 and later
    http://kb.vmware.com/kb/1026437

2011년 12월 2일 금요일

Hyper-V Live migration without shared storage, Windows Server 8 dev. preview

 

image

 

1. Live Migration without shared storage

  Windows Server 8 의 개선된 기능 목록에서 가장 흥미로운 것이 Live Migration의 변화를 들 수 있다.  iSCSI, FCoE와 같은 기술 때문에 SAN 구현 비용이 저렴해졌다고 해도 기존 스토리지 인프라를 변경하는 것은 항상 부담이 된다. 

  이런 관점에서 보면, VMware VSA (vSphere Storage Appliance) 나 Windows Server 8 의 Live Migration 처럼 이제 SMB 환경을 도와주는 기술들은 참으로 반갑다. 테스트하면서 찍은 스크린샷을 보면서 함께 만족하시길~~ ^^

 

 

2. 테스트 환경

image

- Guest VM

  • Hostname: WinXP
    • Windows XP with SP3, English (x86)
    • Intergration Service 설치된 상태임
    • IP: 10.1.7.116

- Hyper-V Host

    • GiSeong-WS8-01
      • Role: Migration source -  현재 WinXP VM을 호스팅하고 있는 Hyper-V Host
      • Hyper-V 3.0 on Windows Server 8 Dev. Preview
      • Gigabit NIC * 1
    • GiSeong-WS8-02
      • Role: Migration target
      • Hyper-V 3.0 on Windows Server 8 Dev. Preview
      • Gigabit NIC * 1

 

 

3. Migration Demo

image

image

- 현재 running 중인 WinXP VM을 선택하고 마우스 우 클릭한다. Move 선택

 

 

image

 

image

- WinXP VM의 설정파일, 디스크, 기타 등등 모든 정보를 이동할 것이므로 Move virtual machine 선택

 

 

image

- 옮겨갈 Hyper-V Host의 DNS 이름을 입력한다. 여기서는 GiSeong-WS8-02 입력

 

 

image

- 옮길 내용을 지정할 수 있다. 앞에서 선택한 옵션 때문에 별도로 고민할 필요 없이 바로  Next 선택.

 

 

image

- VM 데이터의 저장 위치에 대한 옵션. 심플하게 관리하고 싶으므로  Move Virtual Machin’s data to a single location 선택.

 

 

image

- VM 데이터 전체를 저장할 폴더를 지정. 미리 만들어 두는 것이 좋다. 여기서는  C:\vmroot\winxp

 

 

image

- 특별히 더 생각할 것 없다. 그냥  Finish 선택.

 

 

image

- Live Migration  시~작!!!!!

 

 

image

- 현재 Gigabit NIC 1개만 사용하고 있다. Task Manager 에서 네트워크 대역폭을 914Mbps 까지 사용하는 것을 볼 수 있다.

 

 

 

image

- Migration이 끝났다. VM (10.1.7.116) IP에 대해서 Ping 테스트를 걸어 두었는데, Request timed out1회 발생하는 것을 볼 수 있다.

 

 

image

- VM은 아무런 영향받지 않고 그대로 GISEONG-WS8-02 Host에서 실행되고 있다. (Uptime이 18초)

 

 

4. 참고자료