728x90
  1. Exchange 관리 센터 UI 또는 Exchange Powershell로 데이터베이스가 탑재되지 않는 증상 확인
  2. Eseutil을 이용하여 데이터베이스 상태 확인

Eseutil.exe /mh <데이터베이스 파일>

:) eseutil.exe /mh E:\maildb\database04.edb

  1. 데이터 베이스 상태 확인 시 ‘Dirty Shutdown’으로 확인됨.
  2. Dirty Shutdown’ 상태 ‘Clean Shutdown’ 상태로 변경하기 위한 Eseutil 하드 복구 진행

Eseutil.exe /p <데이터베이스 파일>

Eseutil.exe /p e:\maildb\database04.edb

  1. 복구 진행 완료 후 2변 명령으로 ‘Clean Shutdown’ 상태로 변경되는지 확인.

사서함 데이터베이스 관련 로그는 다른 위치 또는 삭제 후 탑재(Mount) 진행

 

  1. Exchange 서버 Queue 증가 및 시스템 성능 저하로 인한 Queue 파일 초기화 작업 방법
  1. Microsoft Exchange Transport Service 중지
  2. Queue 파일 및 Queue 로그파일 삭제

C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\Queue 폴더 내의 모든 파일 삭제

  1. Microsoft Exchange Transport Service 시작
  2. Queue 파일 새로 생성되는 것 확인

C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\Queue 폴더에 mail.que 파일 및 로그파일 새로 생성되는지 확인

 

끝.

728x90
728x90

특정 사용자 계정잠금 예외처리는 Active Directory 관리 센터를 이용하여 가능 합니다.

 

[특정 사용자 계정 잠금 예외 처리 방법]

1. AD 서버 접속

2. 시작> Windows 관리 도구> Active Directory 관리 센터         

 

3. 도메인명(로컬)>system>Password Settings Container 선택       

 

4. 새로 만들기 > 암호 설정 선택         

5. 암호 설정 만들기 속성 값 설정

   5-1. 이름, 우선 순위 필수 값 입력

   5-2. 계정 잠금 정책 적용 체크 박스 해제

   5-3. 암호 정책 설정 값은 기존 회사 기준 값으로 설정 된 GPO를 참고 하시거나 임의로 넣으시면 됩니다.      

6. 적용 대상 추가

7. 계정 잠금 예외 처리 할 계정 입력 및 확인    

 8. 확인      

 

 9. 정책 적용

대상 컴퓨터에서 적용은 최대 90분이 소요 될 수 있습니다.

빠르게 하기 위해서는 대상 컴퓨터에서도 gpupdate 명령을 실행 해주시면 됩니다.

          

 

.

728x90
728x90
728x90

download : https://learn.microsoft.com/en-us/windows-server/opbuildpdf/administration/windows-commands/toc.pdf?branch=live

 

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

728x90
728x90

Default group policy GUIDs are as follows:

Default Domain Policy

31B2F340-016D-11D2-945F-00C04FB984F9

 

Default DC Policy

6AC1786C-016F-11D2-945F-00C04FB984F9

 

Recreates the default Group Policy Objects (GPOs) for a domain. To get to the Group Policy Management Console (GPMC), you must install Group Policy Management as a feature through Server Manager.

 Important

As a best practice, you should configure the Default Domain Policy GPO only to manage the default Account Policies settings, Password Policy, Account Lockout Policy, and Kerberos Policy. Additionally, you should configure the Default Domain Controllers Policy GPO only to set user rights and audit policies.

Syntax

Copy
dcgpofix [/ignoreschema] [/target: {domain | dc | both}] [/?]

Parameters

ParameterDescription
/ignoreschema Ignores the version of the Active Directory schema when you run this command. Otherwise, the command only works on the same schema version as the Windows version in which the command was shipped.
/target {domain | dc | both Specifies whether to target the Default Domain policy, the Default Domain Controllers policy, or both types of policies.
/? Displays Help at the command prompt.

Examples

To manage the default Account Policies settings, Password Policy, Account Lockout Policy, and Kerberos Policy, while ignoring the Active Directory schema version, type:

Copy
dcgpofix /ignoreschema /target:domain

To configure the Default Domain Controllers Policy GPO only to set user rights and audit policies, while ignoring the Active Directory schema version, type:

Copy
dcgpofix /ignoreschema /target:dc
728x90
728x90

오류 (12711)오류 때문에 VMM 서버(HPVCluster)
에서 WMI 작업을 완료할 수 없습니다: [MSCluster_Resource.Name=&] 클러스터 리소스를 찾을 수 없습니다.
클러스터 리소스를 찾을 수 없습니다(0x138F)

권장 작업
문제를 해결한 다음 작업을 다시 시도하십시오.

클러스터 리소스를 찾을 수 없습니다.

이 문제를
해결하려면 Hyper-V 노드에 로그인합니다. 그리고 달려라.

1
2
#Replace VMNAME with your VM which give the errorcode
get-clusterresource | where {$_.ownergroup -match "VMNAME" -and $_.resourcetype.name -eq 'virtual machine configuration'} | Update-ClusterVirtualMachineConfiguration

이 후 복구 -> SCVMM에서 무시 및 새로 고침을 클릭 할 수 있습니다.

728x90
728x90

조짐

만료가 다가오고 있는지 어떻게 알 수 있습니까? Hyper-V-VMMS 이벤트 로그에 다음 경고가 표시됩니다.

로그 이름: 마이크로소프트-윈도우-하이퍼-V-VMMS-관리
원본: 마이크로소프트-윈도우-하이퍼-V-VMMS
이벤트 ID: 12510
작업 범주: 없음
수준: 경고
사용자: 시스템
설명: 서버 인증에 사용되는 인증서는 30일 이내에 만료됩니다. 인증서가 만료된 후에는 가상 컴퓨터에 대한 원격 액세스를 사용할 수 없습니다. 인증서를 갱신하거나 다시 만드십시오.

 

조치

1. 각 VMM 및 Host 서버에서 인증서 삭제

2. 아래 파워셀로 인증서 다시 등록

$Credential = Get-Credential
Get-SCVMMManagedComputer -ComputerName "vmm.contoso.com" | Register-SCVMMManagedComputer  -Credential $credential

3. 인증서 생성 확인

4. 연결 확인
Get-SCVMMManagedComputer | ft Name, StateString, RoleString,State,VersionStateString,AgentVersion,UpdatedDate,IsFullyCached,MostRecentTaskIfLocal

5. SCVMM 작업창에서 연결 확인

728x90
728x90

wuauclt.exe  커맨드 옵션...

 

/DetectNow
/ReportNow
/RunHandlerComServer
/RunStoreAsComServer
/ShowSettingsDialog
/ResetAuthorization
/ResetEulas
/ShowWU
/ShowWindowsUpdate
/SelfUpdateManaged
/SelfUpdateUnmanaged
/UpdateNow
/ShowWUAutoScan
/ShowFeaturedUpdates
/ShowOptions
/ShowFeaturedOptInDialog
/DemoUI

728x90
728x90

Its been a while with no updates and it's not that I haven't been working hard, it's that I have been doing a lot of stuff directly with the API of systems like WHMCS or NetBox, which have an extremely low appeal to anyone not working in the service provider space, so haven't been adding it all to the blog. If anyone wants me to add this stuff please just get in touch and I will put it on.

I was recently asked to create a function that would allow you to set the IP address of a virtual machine from the host in a Hyper-V environment.

Getting this working for Windows was pretty easy:

function Set-VMIp {
param(
$VMhost,
$VMname,
$Mask,
$GateW,
$IPaddress
)

Invoke-Command -ComputerName $VMhost -ArgumentList $IPaddress, $Mask, $Gatew, $VMname  -ScriptBlock {

[string]$VMname = $args[3]

$VMManServ =  Get-WmiObject -Namespace root\virtualization\v2 -Class Msvm_VirtualSystemManagementService

$vm = Get-WmiObject -Namespace 'root\virtualization\v2' -Class 'Msvm_ComputerSystem' | Where-Object { $_.ElementName -eq $VMname }

$vmSettings = $vm.GetRelated('Msvm_VirtualSystemSettingData') | Where-Object { $_.VirtualSystemType -eq 'Microsoft:Hyper-V:System:Realized' } 

$nwAdapters = $vmSettings.GetRelated('Msvm_SyntheticEthernetPortSettingData') 

$ipstuff = $nwAdapters.getrelated('Msvm_GuestNetworkAdapterConfiguration')

$ipstuff.DHCPEnabled = $false
$ipstuff.DNSServers = "8.8.8.8"
$ipstuff.IPAddresses = $args[0]
$ipstuff.Subnets = $args[1]
$ipstuff.DefaultGateways = $args[2]

$setIP = $VMManServ.SetGuestNetworkAdapterConfiguration($VM, $ipstuff.GetText(1))
}
}

I can't really claim this as all being my own work, I used a blog post from a Microsoft employee, head of product dev or something or other. Unfortunately, I can't seem to source the link right now to give proper credit. You dont really need to see it though. His post was pretty hardcore and mine is much easier, I promise.

728x90
728x90

There is nothing more annoying than when people leave ISO's mounted to VM's. It drives me mad.This little script will list machines that have ISO's mounted and then if you like you bulk unmount them. Enjoy

This will just list all your VM's and show you the status od the DVD drive :

$clusternodes = Get-ClusterNode

ForEach ($clusternode in $clusternodes)
{get-VM -ComputerName $clusternode.Name | Get-VMDvdDrive }`

If you want to bulk unmount them its the same command with a little bit at the end

$clusternodes = Get-ClusterNode

ForEach ($clusternode in $clusternodes)
{get-VM -ComputerName $clusternode.Name | Get-VMDvdDrive | Set-VMDvdDrive -Path $null}`

This will recurse through ever node in your cluster, so if you have a large environment, don't panic, it will take a while.

728x90
728x90

I have written a guide on testing storage with VM-fleet that goes well with this.

Generally speaking when testing something new I will build it and tear it down a few times before I'm happy. Then when I'm sure I know what I'm doing I will do a final build from a build checklist that I have made, or a script if it's appropriate. That way I can be sure that I have done everything I need to do, the hosts are consistent and I have a record for future reference.

This is round 2 of my cycle so there may still be some errors. I will correct later if I find anything in round 3.

hardware

Storage spaces direct (S2D) wants all the hosts to be similar, in that they have the same type and amount of disks, and I would also recommend the same CPU. The storage CPU load for each volume takes place on the host that owns that volume. I think having mismatched CPU's would probably affect the performance of that volume significantly. You also need multiple RDMA capable 10GB interfaces.

I have 3 hosts that look like this:-

HP DL380 Gen9
Dual E5-2640v5
256GB RAM
2 x Chelsio 10GB network cards
1 x HP P440 Raid controller.
2 x HP H240 HBA
16 x 480GB Intel enterprise SSD's
2 x SATA drives

Switching, I have a pair of Arista switches for the 10GB and some Aruba affair for the 1GB.

I should also point out that this is currently POC kit bought specifically for this and that once I am happy with it all we will likely use this same kit in our public cloud environment.

The physical architecture is your standard cluster with redundant networks. I'm not going to document that but here.

Installation

First thing is to install Windows Server 2016 and all its updates. It also a good idea to properly name all your NIC interfaces as that will make it a lot easier to identify them later on.

Next, we need to install all the windows features required for S2D. This script should get them all in one go

Install-WindowsFeature -Name "Data-Center-Bridging","Failover-Clustering","Hyper-V","RSAT-Clustering-PowerShell","RSAT-Clustering-Mgmt","Hyper-V-PowerShell" -Restart  

This will likely need a reboot.

Once all this is done we can start putting together the required networking. This requires a little thought.

Network

S2D uses switch embedded teaming (SET). This is not the same as the switch teaming you may have used before. It has no GUI and can only be done from PowerShell. You need to be using SET in order to use the RDMA feature of your network cards. Switch embedded teaming also has support for some other features not available in standard NIC teaming. Microsoft has written a lovely little guide for you here. I warn you it's pretty long...

Depending on your choice of NIC you may also need to do some additional switch config to get RDMA to work. I chose a Chelsio card that has an RDMA implantation called iWarp, that doesn't need any specific switch config. It seemed like the easiest thing to do.

Now we start. The first thing we need to do is to create a QoS policy and give SMB high priority and a guaranteed allocation. You don't need to do this but it makes sense, especially in a hyper-converged environment where there may be resource contention.

You need to execute the following commands on all the servers that you plan to be in your cluster.

New-NetQosPolicy "SMB" -NetDirectPortMatchCondition 445 -PriorityValue8021Action 3

Enable-NetQosFlowControl -Priority 3

Disable-NetQosFlowControl -Priority 0,1,2,4,5,6,7

New-NetQosTrafficClass "SMB" –Priority 3 –BandwidthPercentage 30 –Algorithm ETS

The last line of that code essentially reserves 30% of the network specifically for S2D, which is what we want.

Now we need to enable the QoS policy on the relevant interfaces. To get a list of the NIC's run the following

Get-NetAdapter | FT Name, InterfaceDescription, Status, LinkSpeed

Which will give you something like this

  Name                  InterfaceDescription                         Status   LinkSpeed
----                  --------------------                         ------       -------
StorageNIC1           Chelsio Network Adapter #4                   Up           10 Gbps  
Ethernet 3            Chelsio Network Adapter #3                   Disconnected 0 bps    
VLAN 10               Microsoft Network Adapter Multiplexor Driver Up           2 Gbps   
StorageNIC2           Chelsio Network Adapter #2                   Up           10 Gbps  
Ethernet              Chelsio Network Adapter                      Disconnected 0 bps    
Embedded LOM 1 Port 4 HP Ethernet 1Gb 4-port 331i Adapter #4       Disconnected 0 bps    
Embedded LOM 1 Port 3 HP Ethernet 1Gb 4-port 331i Adapter #3       Disconnected 0 bps    
Embedded LOM 1 Port 2 HP Ethernet 1Gb 4-port 331i Adapter #2       Up           1 Gbps   
Embedded LOM 1 Port 1 HP Ethernet 1Gb 4-port 331i Adapter          Up           1 Gbps  

I need the policy on my 10GB storage interfaces, which I helpfully labeled during the hardware install. The other 2 are for migration and client traffic so won't be used for storage traffic and therefor don't need the policy.

Enable-NetAdapterQos –Name "StorageNIC1","StorageNIC2"

That bit is not done. We need to create the virtual switch and sort out the teaming (SET)

Again we will need the name of the storage NICs, which you should have from the previous step.

So we create the vSwitch

New-VMSwitch –Name vStorage –NetAdapterName "StorageNIC1", "StorageNIC2" –EnableEmbeddedTeaming $true

And now for the bit that I struggled to grasp for a while. Creating the vSwitch creates a single interface that has the name of the switch. This seems like it would be the vNIC you should be using. However, in testing, I have discovered that if I assign an IP to this vNIC and simulate failure in the physical NICS it does fail-over, but it takes a long time. Too long. So what we do is create 2 additional vNICs connected to the vSwitch, and map them to the physical. Essentially creating 2 diverse paths and allowing us to use the full 20GB of the network.

If one of the NIC's fails they IP will still fail-over to the other, and it still takes a long time, however, it doesn't matter due to the second path.

Add-VMNetworkAdapter –SwitchName vStorage –Name SMB_1 –managementOS
Add-VMNetworkAdapter –SwitchName vStorage –Name SMB_2 –managementOS
Set-VMNetworkAdapterVlan -VMNetworkAdapterName "SMB_1" -VlanId 48 -Access -ManagementOS
Set-VMNetworkAdapterVlan -VMNetworkAdapterName "SMB_2" -VlanId 48 -Access -ManagementOS

Once this is done restart the vNICs

Restart-NetAdapter "vEthernet (SMB_1)"
Restart-NetAdapter "vEthernet (SMB_2)"

And then we enable RDMA on these vNICS

Enable-NetAdapterRDMA "vEthernet (SMB_1)", "vEthernet (SMB_2)"

Finally, we assign them to a physical interface.

Set-VMNetworkAdapterTeamMapping -VMNetworkAdapterName "SMB_1" –ManagementOS –PhysicalNetAdapterName "StorageNIC1"
Set-VMNetworkAdapterTeamMapping -VMNetworkAdapterName "SMB_2" –ManagementOS –PhysicalNetAdapterName StorageNIC2"

Now we check if the relevant interfaces are set up correctly.

Get-SmbClientNetworkInterface

You should see this

Interface Index RSS Capable RDMA Capable Speed    IpAddresses   Friendly Name                                      
--------------- ----------- ------------ -----    -----------   -----------                                    

49              True        True         20 Gbps  {fe80::1964:a4a2:5f4d:b7e8,10.2.120.21}     vEthernet (SMB_1)                                  
53              True        True         20 Gbps  {fe80::ac59:19fa:1685:1247,10.2.121.21}     vEthernet (SMB_2)       

RDMA is enabled.

At this point, it's a good idea to assign your IP address and do some testing. Make sure things fail-over as expected, at the very least to make yourself familiar with what to expect from this sort of configuration.

That's the networking done, now we move onto creating the cluster.

Cluster

The first thing to do is some cluster tests to make sure we haven't forgotten anything.

Test-Cluster –Node MachineName1, MachineName2, MachineName3, –Include "Storage Spaces Direct", "Inventory", "Network", "System Configuration"

For me this threw up an error. The vNIC that is created when we created the switch I mentioned earlier has no IP config assigned. You can ignore this or better still disable that interface. Once I did this the cluster validation came back as OK. So now we can move on and create the cluster.

New-Cluster -Name clustername -StaticAddress x.x.x.x –Node MachineName1, MachineName2, MachineName3, –NoStorage

You need the -NoStrage argument as otherwise it will capture all the disks and add them to the cluster. You don't want this yet.

Now depending how many nodes you have you may want to create a witness for the cluster, in the form of another server of a quorum. I assume you know how to so that and will if needed.

S2D

Now we get to the part where we enable storage spaces direct and add the S2D compatible disks to the storage pool. According to Microsoft S2D wants "Clean" disks. No existing partition data on them and give you this script to clean your disks.

icm (Get-Cluster -Name <cluster or node name> | Get-ClusterNode) {

Update-StorageProviderCache

Get-StoragePool | ? IsPrimordial -eq $false | Set-StoragePool -IsReadOnly:$false -
ErrorAction SilentlyContinue

Get-StoragePool | ? IsPrimordial -eq $false | Get-VirtualDisk | Remove-VirtualDisk -
Confirm:$false -ErrorAction SilentlyContinue

Get-StoragePool | ? IsPrimordial -eq $false | Remove-StoragePool -Confirm:$false -
ErrorAction SilentlyContinue

Get-PhysicalDisk | Reset-PhysicalDisk -ErrorAction SilentlyContinue

Get-Disk | ? Number -ne $null | ? IsBoot -ne $true | ? IsSystem -ne $true | ? 
PartitionStyle -ne RAW | % {

$_ | Set-Disk -isoffline:$false

$_ | Set-Disk -isreadonly:$false

$_ | Clear-Disk -RemoveData -RemoveOEM -Confirm:$false

$_ | Set-Disk -isreadonly:$true

$_ | Set-Disk -isoffline:$true

}

Get-Disk |? Number -ne $null |? IsBoot -ne $true |? IsSystem -ne $true |? PartitionStyle -eq RAW | Group -NoElement -Property FriendlyName

} | Sort -Property PsComputerName,Count

Out of curiosity I tried to enable S2D with out doing this and unsurprisingly it failed. Don't skip this step, but also be aware this will flatten all the disks in the host. If you want to be more precise you may want to try using DiskPart.

Finally we enable storage spaces direct.

Enable-ClusterStorageSpacesDirect –CimSession <ClusterName>

And we are done. You can now create vdisks and Volumes from the GUI if you wish but I would recommend that you use New-Volume in PowerShell as there are some specifics you may want to add to you new disks.

I will write another guide on that next I think.

If you have any feedback on this please comment bellow.

728x90

+ Recent posts