달력

5

« 2024/5 »

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
2009. 11. 19. 16:56

Windows Server 2008 R2 Core의 기능/역할 설치 Etc.2009. 11. 19. 16:56

Powershell 설치
설치된 기능 쿼리
Dism /online /get-features /format:table

Powershell 설치를 위해 .NET Framework 2.0 설치
Dism /online /enable-feature /featurename:NetFx2-ServerCore

Powershell 설치
Dism /online /enable-feature /featurename:MicrosoftWindowsPowerShell

ServerManager, BestPractices 설치
Dism /online /enable-feature /featurename:ServerManager-PSH-Cmdlets
Dism /online /enable-feature /featurename:BestPractices-PSH-Cmdlets


Powershell 실행
c:\windows\system32\WindowsPowerShell\v1.0\powershell.exe

기능 및 역할 설치를 위해 ServerManager 모듈 Import
Import-Module ServerManager

설치된 기능 쿼리
Get-WindowsFeature | Where {$_.installed –eq $true}

기능 설치/제거 (예: Hyper-V Role)
Add-WindowsFeature Hyper-V
Remove-WindowsFeature Hyper-V

:
Posted by 커널64

param ($rootMS,$Domain,$targetmS,$targetAgent)
#Checking Root MS parameter
     if ($rootMS -eq $null) {
        Write-Host ""
        Write-Host "SYNTAX:";
        Write-Host ""
        Write-Host "-rootMS: FQDN of the root management server for the target management group.";
        Write-Host "Ex: RootManagementServer.fqdn.local";
        Write-Host ""
        Write-Host "-Domain: The target group.  Use the display name of the group.";
        Write-Host "Ex: 'NOC Computers Test";
        Write-Host ""
        Write-Host "-targetMS: FQDN of the management server for discovery, install and agent mgmt.";
        Write-Host "Ex: 'MyMS.fqdn.local'"
        Write-Host ""
        Write-Host "-targetAgent: FQDN of the server on which agent(s) should be installed (wildcards allowed).";
        Write-Host "Ex: 'Computer.fqdn.local'"
        Write-Host ""
 exit;
     }

#Initialize the OpsMgr Provider
Add-PSSnapin Microsoft.EnterpriseManagement.OperationsManager.Client

# Set the location to the root of the provider namespace.
cd OperationsManagerMonitoring::

#create a connection to the Management Group
New-ManagementGroupConnection $rootMS

#change the path
cd $rootMS

#configure query setting based on your -targetMS parameter input
$ldap_query = new-ldapquerydiscoverycriteria -domain $Domain '
 -ldapquery "(sAMAccountType=805306369)(name=$targetAgent*)"

#configure discovery setting
$windows_discovery_cfg = new-windowsdiscoveryconfiguration -ldapquery $ldap_query

# discoveryresults
$discovery_results = start-discovery -managementserver (get-managementserver | '
where {$_.Name -eq "$targetMS"}) -windowsdiscoveryconfiguration $windows_discovery_cfg

#install Agent(s) based on the criteria of your search in the -targetMS parameter
install-agent -managementserver (get-managementserver | where {$_.Name -eq "$targetMS"}) '
-agentmanagedcomputer $discovery_results.custommonitoringobjects

:
Posted by 커널64

Operations Manager 콘솔이나 Management Server가 설치된 컴퓨터에서 실행

[사용 방법]
powershell D:\MpToXml.ps1 -mpFilePath:'D:\Microsoft.Exchange.Server.2003.Monitoring.mp' -outputDirectory:'D:\'

:
Posted by 커널64