search
Categories
Sponsors
VirtualMetric Hyper-V Monitoring, Hyper-V Reporting
Archive
Blogroll

Badges
MCSE
Community

Cozumpark Bilisim Portali
Posted in Virtual Machine Manager, Windows Powershell | No Comment | 2,747 views | 20/02/2009 16:19

SCVMM powershell konsolu üzerinden aşağıdaki komutla hangi işletim sistemlerinin template’lerini oluşturabileceğinizi öğrenebilirsiniz.

1
Get-OperatingSystem | where { $_.IsCustomizationAllowed -eq $true } | sort | ft Name

İşte yukardaki komut sonrası Powershell konsoluna dönen işletim sistemleri:

64-bit edition of Windows Server 2008 Datacenter
64-bit edition of Windows Server 2008 Enterprise
64-bit edition of Windows Server 2008 Standard
64-bit edition of Windows Vista
Windows 2000 Advanced Server
Windows 2000 Server
Windows Server 2003 Datacenter Edition (32-bit x86)
Windows Server 2003 Datacenter x64 Edition
Windows Server 2003 Enterprise Edition (32-bit x86)
Windows Server 2003 Enterprise x64 Edition
Windows Server 2003 Standard Edition (32-bit x86)
Windows Server 2003 Standard x64 Edition
Windows Server 2003 Web Edition
Windows Server 2008 Datacenter 32-Bit
Windows Server 2008 Enterprise 32-Bit
Windows Server 2008 Standard 32-Bit
Windows Small Business Server 2003
Windows Vista
Windows Web Server 2008
Windows XP 64-Bit Edition
Windows XP Professional

Görebileceğiniz gibi listede hiç Linux işletim sistemi yok. Bu durumda aklınıza “Hani Hyper-V, Suse Ent. destekliyordu?” sorusu gelebilir. Microsoft, Suse’ye Hyper-v üzerinden destek verse de SCVMM üzerinden Customize desteği vermiyor demek ki :)


Posted in Windows Server | No Comment | 3,704 views | 18/02/2009 11:34

We can install unattended Plesk Panel on Windows 2008. You should create a batch file and add it to your answer file. Install-Plesk-with-MSDE.cmd:

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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
@echo off
if "%3" == "" ( 
	echo " USAGE: install-plesk-with-mssqlexpress.cmd <distrib path> <installation path> <mode> [<MSSQLEXPRESS password>]"
	echo " where <mode> can be: 
	echo " complete - Complete Plesk installation
	echo " typical - Typical Plesk installation
	echo " {comp_list} - Complete Plesk installation without specified components (use a comma to separate the components)
	exit /b 1
)
 
set plesk_distrib_dir=%~1
 
set plesk_dir=%~2
 
set plesk_non_typical=KasperskyAV,PDFDoc,Python,JDK,Tomcat
 
if "%3" == "complete" set plesk_exclude=MSDE,MSSQLEXPRESS
 
if "%3" == "typical" set plesk_exclude=MSDE,MSSQLEXPRESS,%plesk_non_typical%
 
if "%plesk_exclude%" == "" set plesk_exclude=MSDE,MSSQLEXPRESS,%~3
 
set mssqlexpress_pwd=1q2w3e4R
 
if "%~4" NEQ "" set mssqlexpress_pwd=%4
 
@echo on
 
set sql_server_exe=%plesk_distrib_dir%\sql_server_2005_express_edition_sp2_x32.EXE
 
If "%PROCESSOR_ARCHITECTURE%" NEQ "x86" set sql_server_exe=%plesk_distrib_dir%\sql_server_2005_express_edition_sp2_x64.EXE
 
@echo SQL SERVER Installer path: "%sql_server_exe%"
 
"%sql_server_exe%" /qb ADDLOCAL=ALL DISABLENETWORKPROTOCOLS=0 SECURITYMODE=SQL REBOOT=ReallySuppress INSTALLSQLDIR="%plesk_dir%\Databases\MSSQL\" INSTALLSQLDATADIR="%plesk_dir%\Databases\MSSQL\" INSTALLSQLSHAREDDIR="%plesk_dir%\Databases\MSSQL\" INSTALLASDATADIR="%plesk_dir%\Databases\MSSQL\" INSTANCENAME=MSSQLSERVER
 
If "%ERRORLEVEL%" NEQ "0" exit /b %ERRORLEVEL%
 
set osql_exe=%plesk_dir%\Databases\MSSQL\90\Tools\Binn\OSQL.EXE
 
If "%PROCESSOR_ARCHITECTURE%" NEQ "x86" set osql_exe=%plesk_dir%\Databases\MSSQL (x86)\90\Tools\Binn\OSQL.EXE
 
@echo OSQL.EXE path: "%osql_exe%" 
 
"%osql_exe%" -E -Q "ALTER LOGIN sa WITH PASSWORD='%mssqlexpress_pwd%'; ALTER LOGIN sa ENABLE"
 
If "%ERRORLEVEL%" NEQ "0" exit /b %ERRORLEVEL%
 
reg ADD "HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer" /v LoginMode /d 2 /t REG_DWORD /f 
 
net stop MSSQLSERVER /Y
 
net start MSSQLSERVER /Y
 
"%plesk_distrib_dir%\SetupPlesk.exe" /qn MSSQL_HOST=localhost MSSQL_ADMIN_NAME=sa MSSQL_ADMIN_PASSWD="%mssqlexpress_pwd%" INSTALLDIR="%plesk_dir%" ADDLOCAL=ALL REMOVE=%plesk_exclude% /l*v "%plesk_dir%\plesk-install.log"
 
If "%ERRORLEVEL%" NEQ "0" exit /b %ERRORLEVEL%

This bath file installs Plesk with Mssql Express Edition. You should add this in your answer file to execute:

1
install-plesk-with-mssqlexpress.cmd "C:\Plesk\Install" "C:\Plesk" complete [MSSQLpassword]

Complete key is for the complete installation. You can use Typical instead of it.


Posted in Linux Server, Windows Server | No Comment | 3,646 views | 18/02/2009 01:49

Zip paketinden MySQL kurulumu yaptıysanız, boş olan root şifresini cmd ya da ssh üzerinden aşağıdaki komutla değiştirebilirsiniz.

1
mysqladmin -u root password YENISIFRE

Mysqladmin komutunun direk olarak çalışabilmesi için Mysql path’ini “System Paths” içine eklemeyi unutmayın.


Posted in Virtual Machine Manager, Windows Powershell | No Comment | 9,750 views | 17/02/2009 20:15

You can store a vds account in library server on SCVMM with this Powershell commands:

1
2
3
4
5
6
7
8
9
10
11
12
13
# ------------------------------------------------------------------------------
# Store Virtual Machine Wizard Script
# ------------------------------------------------------------------------------
# Script generated on 17 Şubat 2009 Salı 14:25:54 by Virtual Machine Manager
# 
# For additional help on cmdlet usage, type get-help <cmdlet name>
# ------------------------------------------------------------------------------
 
$VMName = VM0212
$VM = Get-VM -VMMServer localhost -Name "$VMName" | where {$_.VMHost.Name -eq "hyperv02.fabrikam.contoso.net"}
$LibraryServer = Get-LibraryServer -VMMServer localhost | where {$_.Name -eq "hyperv02.fabrikam.contoso.net"}
 
Store-VM -VM $VM -LibraryServer $LibraryServer -SharePath "\\hyperv02.fabrikam.contoso.net\Library" -RunAsynchronously -UseLAN

We used “Localhost” but if you have another SCVMM and if you want to store vds in that host, you should use it like vmm02.fabrikam.contoso.net.


Posted in Virtual Machine Manager, Windows Powershell | No Comment | 2,253 views | 17/02/2009 20:10

There is an easy way to suspend a vds account on SCVMM with Powershell.

1
2
3
$VDSName = VDS022
SaveState-VM $VDSName
Set-VM $VDSName -Owner FABRIKAM\Administrator

As you see, first we saved vds then changed the owner. So user can not resume vds. Also this is resume part:

1
2
3
4
$Userid = 2512
$VDSName = VDS022
Set-VM $VDSName -Owner FABRIKAM\$Userid
Start-VM $VDSName

You should use Start-VM command to resume vds. In here, Fabrikam is our Domain Sam Name.


Posted in Windows Powershell, Windows Server | No Comment | 4,677 views | 17/02/2009 20:05

Active Directory üzerinde yarattığınız kullanıcıyı Powershell üzerinde aşağıdaki komutla silebilirsiniz.

1
dsrm user "CN=John, OU=Musteri, DC=fabrikam, DC=contoso, DC=net"

John ismi Display name değil burada. Musteri OU’su girdiğinizde listede görünen isimlerdir. Bilgilerinize..


Posted in Virtual Machine Manager, Windows Powershell | No Comment | 2,182 views | 17/02/2009 20:02

Kullanıcıyı owner olarak atamakta kullandığınız kullanıcı rolünü, aşağıdaki komut ile powershell üzerinden kaldırabilirsiniz.

1
2
3
$UserName = “JohnH”
$RemoveRole = Get-VMMUserRole | where {$_.Name -eq$UserName}
Remove-VMMUserrole -Userrole $RemoveRole

$RemoveRole’deki Get-VMMUserRole’ün önemli bir yeri var orada. Bu şekilde yapmazsanız, hata alacaksınız. Bilgilerinize..