IBM released Storage Management Pack 1.1.0 for SCOM

This document contains information related to obtaining the IBM Storage Management Pack for Microsoft System Center Operations Manager v1.1.0. 

 

Download Description

The package is a set of software modules, or management packs, which allow you to access and monitor IBM storage systems Storwize V7000, SVC, XIV and DS8000, using the host-based Microsoft SCOM interface. Please refer to the release notes and user guide for detailed storage devices’ version support.

 

Prerequisites

URL LANGUAGE SIZE(Bytes)
IBM Storage Management Pack Release Notes v1.1.0 English 136588
Installation Instructions
URL LANGUAGE SIZE(Bytes)
IBM Storage Management Pack User Guide v1.1.0 English 1336807
Download package
DESCRIPTION DOCUMENTATION Download Options
Platform Windows Not Applicable
English
Byte Size 42075880
Date 1-5-2011



IBM Storage MP v1.1.0 32 bits FTP
Platform Windows Not Applicable
English
Byte Size 36438392
Date 1-5-2011



IBM Storage MP v1.1.0 64 bits FTP
Cross Reference information
Segment Product Component Platform Version Edition
Disk Storage Systems System Storage DS8700


https://www-304.ibm.com/support/docview.wss?mynp=OCSTUVMB&mync=E&uid=ssg1S4000937&myns=s028

 

Advertisements

,

Leave a comment

Potential Problem on XIV Storage System microcode versions 10.2.2 thru 10.2.4.a

Potential Problem on XIV Storage System ranging microcode versions from 10.2.2 thru 10.2.4.a that can be caused by changing system time via Network Time Protocol (NTP) or when changing the clock via XCLI

When the system time is changed to more than ~500 years ahead in the future, the Manager Node will get stuck. It will stop handling xcli operations, but more severely – it will not be able to detect any failure in the system. Once such a failure occurs, all hosts will lose access to the system and IBM support needs to be contacted immediately.

In case of a Manager Node impact, the system will continue to serve I/O’s but in case of a subsequent data component failure (either a disk or a module) the system might not properly identify the failure and therefore will not initiate a rebuild process and possibly cause hosts to lose access to data. Other symptoms may include, but not limited to: the XIV will not be able to properly detect loss of input AC (building power outage) and therefore shutdown while ensuring all writes are committed to disk; the customer may not be able perform any operations on the XIV, including GUI updates or inquiries.

If the machine is reporting to the XIV service center then XIV will receive the proper events that will notify us regarding this issue and we will be able to contact the customer and verify/fix this state.

 

Environment

Affected versions Environment

  • 10.2.2
  • 10.2.2.a
  • 10.2.4
  • 10.2.4.a

Resolving the problem

Mitigation

  • Remove NTP server configuration from the XIV to avoid getting into this situation.
  • Do not perform a manual change of the machine time to a date 500 years or more in the future (this would only happen by an error).

Fix
Fix is included in version 10.2.4.b version that is planned to be released in Q2 2011.

  • 10.2.4.b version will disallow setting of invalid dates
  • Year must be between 2000 and 2030,
  • 10.2.4.b will have error handling messages and more debug information to better manage this situation.
  • NEW_TIME_CHANGE_IS_INAVLID
    This event will be raised when an attempt to set the time is blocked because time is invalid. (year not between 2000 to 2030)
  • SETTING_NEW_TIME
    This event is raised every time an attempt to set a ‘complete’ time, not a delta from the last time setting. (when delta >TIME_UPDATE_MINIMUM_DIFF)
  • Both events are limited to one in an hour.

 

https://www-304.ibm.com/support/docview.wss?mynp=OCSTJTAG&mync=E&uid=ssg1S1003838&myns=s028

, , ,

Leave a comment

Getting VMware Data Storages FreeSpace with percent as CSV file on VMware vSphere PowerCLI

If you need Data Storage free space of on your Vmware infrastructure (vSphere) as a Excel format ! Solution is here. I just need this information to follow my data growth in monthly or weekly. As you all know VMware does not provide this information like performans chart.

 

So just install VMware PowerCLI over here then write following script in a .ps1 file and save as getdatastorestatusascsv.ps1 via notepad or other text editor. Open Vmware PowerCLI on your desktop and  just run it wherever you saved. Like  “.getdatastorestatusascsv.ps1”

 

Do not forget determine csv file path, your Virtual Center IP address or DNS name, Username and Password for connect to Virtual Center in script.

example:

Connect-VIServer -server 192.168.1.1 -protocol https -user administrator -password Pwesd42#3

 

Script:

 

Connect-VIServer -server %VCServerIPorDNSName% -protocol https -user %USERNAME% -password %PASSWORD%
$file=”c:DataStoreStatus.csv”
$GetInfoDataSt = Get-Datastore | Sort-Object Name

$DataStorages = @()

foreach ($stores in $GetInfoDataSt )
{
$stor = “” | Select-Object Name, CapacityGB, UsedGB, FreeGB, PercentUse

$stor.Name = $stores.name
$stor.CapacityGB = [math]::Round($stores.CapacityMB/1024,2)
$stor.UsedGB = [math]::Round(($stores.CapacityMB – $stores.FreeSpaceMB)/1024,2)
$stor.FreeGB = $stor.CapacityGB – $stor.UsedGB
$stor.PercentUse = [math]::Round(100*$stores.FreeSpaceMB/$stores.CapacityMB,2)
$stor.PercentUse = 100 – $stor.PercentUse
$DataStorages += $stor
}

$DataStorages | Export-csv -Path $file

 

 

Leave a comment

Performance charts for networking does not work on ESX/ESXi 4.1 Update 1

Symptoms

  • Performance charts for networking fail to work on ESX/ESXi 4.1 Update 1
  • You are using bnx2x driver version 1.54.1.v41

Resolution

To workaround this issue, use an asynchronous Broadcom driver, such as bnx2x-1.62.15.v41.2.
To download the driver, see the VMware Download Center.

Additional Information

This issue will be fixed in  ESX 4.1 Update 2 with a pre-installed driver.

 

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1038653

,

Leave a comment

Storwize V7000 new features been released

Storwize V7000 was introduced in October 2010 in IBM Storage Mid-range portfolio. V7000 archived one of the fastest product ramps in IBM history with more than 1.800 systems sold to more than 1.000 worldwide customers since general availability in November 2010. The products supports 10 GbE ports in new control enclosure models and this can increase ISCSI thoughput by up to 700 per cent. High performance 2.5-inch 146 GB, 15.000 rpm SAS drive is available and provides up to 30 per cent faster thoughput. Original disk drives choice is 2.5-inch 10.000 rpm SAS drives comes with 300, 450, 600 and 300 GB E-MLC SSD (enterprise-grade multilevel cell). Also 3.5-inch 2 TB 7.2K rpm Near-Line SAS disk is available. Two V7000 control enclosures (2U rack-mountable chasses) have Eight 8 Gbps FC host ports, Four 1 Gbps and optionally Four 10 Gbps ISCSI hosts ports. Per control enclosure 16 GB cache memory.

 

Two V7000 control enclosures can now be clustered to another V7000 control enclosure with IBM Storwize V7000 software v6.2, meaning doubling the capacity of a single managed V7000 up to 480 TB. The software has had built-in real time performance monitoring fuctionality added and the FlashCopy function can be used with Remote Mirror volumes, adding more choices to high-availability scenarios. This is similar to high-end storage products like DS8000.

 

Vmware vStorage API for Array Integration is now supported, meaning the array can now do storage work offloaded from the ESX server, enabling more VMs to be hosted and run. This is one of the most important features in this release. (v6.2)

 

When a customer is buying new V7000, IBM is offering data migration features for 60 days free. Which is enough for a company can migrate all the data from another storage device to V7000 himself and/or any storage devices behind V7000 as an external storage virtualization. Storwize V7000 can be upgraded from the smallest to the largest configuration without disruption. Existing V7000s can participate in clusters via a non-disruptive software upgrade to v6.2 and a cluster is managed as a single system. Once clustering is enabled then expansion enclosures can be added to scale capacity and/or a second control enclosure can be added to boost performance.

 

There is a Storwize V7000 plug-in for Vmware Vcenter wihch also supports virtualised external disk systems. The list of supported external systems now includes EMCs VNX, HDSs VSP, HP P9500 plus Texas  Memory Systems RamSan-620. Lastly existing model 112 and 124 control enclosures can be upgraded to add 10 GbE support. ISCSI is getting important and more important because of agility and cost approaches.

 

As a reminder, i want to marked that usually everybody want 15K rpm HDD but 10K rpm HDD is better if you have a change to balance the performance impact. So V7000 can provide a better performance for 10K rpm HDD with SSD and/or 146 GB 15K rpm HDD. Result is with the right approach and calculation, you can get better performance compare to native 15K rpm HDD.

 

IBM has not yet added compression to the V7000 and it is expected at some future date. It said in September 2010 that, within 12-18 moths, we didsee the RACE integration into IBMs block storage products; we may some time to wait.

 

Most of the new V7000 functionality will be available in June this year . There is no extra feature to order and no extra charge for clustering. The Vcenter plug-in will be available at no charge on 30 June (for v6.1 software) and 31 July (v6.2 software).

 

http://www-03.ibm.com/systems/storage/disk/storwize_v7000/index.html

 

, , ,

1 Comment

Search,Enable or Disable user/computer accounts in Active Directory over Web page (LDAP ASP)

through this code/ASP in below/file, you can search users,computers, printers and other objects in Active directory over web page, as a result of this search, you can get object’s location in AD. You can enable and disable the user/computer accounts of this page in Active Directory. Also You’ll able to move accounts into a Organization Unit when disable or enable accounts. (you can set different Organization Unit for Enable and Disable process). I mean you can collect disabled user/computer accounts into one Organization Unit or separated OUs.

 

To publish this ASP page over web site in IIS 6 or 7,ASP page need administrative privilege for working but for search just need authorized users. So at least ISS default authentication method should be change to basic authentication. For prevent unauthorized user to disable/enable accounts in Active Directory.

 

You can download ASP file here

source : http://www.emrullahekmekci.com.tr/?p=400

 

<%

‘    10 / 05 /2011 — Emrullah Tahir Ekmekçi
‘    Search, Enable or Disable Users and Computer account in Active Directory over Web browser
‘    1.0

response.charset=”windows-1254″
Response.CacheControl = “no-cache”
response.Clear()
%>

<title>Search/Enable/Disable Users/Computers Accounts</title>
<body>
<br>
<br>

<center><form id=”form1″ name=”form1″ method=”post” action=”ADAramaAcmaKapama.asp”>
<label>User/Computer name
<input name=”is” type=”hidden” value=”is” /><input type=”text” name=”uname” id=”uname” />
</label>
</form></center>

</body>
</html>

<%

Dim strCN, objRootDSE, strDNSDomain, adoCommand, adoConnection
Dim strBase, strFilter, strAttributes, strQuery, adoRecordset
Dim strDN, strDisplay, strObjectCategory, intIndex

‘ Kullanici ve Bilgisayar hesabi acma ve kapatma

if request(“hesap”)  <> “” and request(“y”)  <> “” and request(“t”) <> “” then

strCN = request(“hesap”)
ka = request(“y”)

Set objRootDSE = GetObject(“LDAP://RootDSE”)

strDNSDomain = objRootDSE.Get(“defaultNamingContext”)

Set adoCommand = CreateObject(“ADODB.Command”)
Set adoConnection = CreateObject(“ADODB.Connection”)

adoConnection.Provider = “ADsDSOObject”
adoConnection.Open “Active Directory Provider”
adoCommand.ActiveConnection = adoConnection

strBase = “<LDAP://” & strDNSDomain & “>”

strFilter = “(cn=” & strCN & “*)”

strAttributes = “cn,distinguishedName,sAMAccountName,name,userAccountControl”

strQuery = strBase & “;” & strFilter & “;” & strAttributes & “;subtree”
adoCommand.CommandText = strQuery
adoCommand.Properties(“Page Size”) = 100
adoCommand.Properties(“Timeout”) = 30
adoCommand.Properties(“Cache Results”) = False

Set adoRecordset = adoCommand.Execute

Const ADS_UF_ACCOUNTDISABLE = 2

Set objUser = GetObject (“LDAP://” & adoRecordset.Fields(“distinguishedName”))

strOUDN = “OU=DisabledComputers,DC=fabrikam,DC=com”    ‘ Disabled computers account will be moved this ou
strOUDNE = “CN=Computers,DC=fabrikam,DC=com” ‘ Enabled computers account will be moved this ou

strOUDNU = “OU=DisabledComputers,DC=fabrikam,DC=com”     ‘Disabled users account will be moved this ou
strOUDNEU = “CN=Users,DC=fabrikami,DC=com” ‘ Enabled users account will be moved this ou

intUAC = objUser.Get(“userAccountControl”)

if ka = “k” then

if request(“t”) = “u” then
Set objOU = GetObject(“LDAP://” & strOUDNU)
objUser.Put “userAccountControl”, intUAC OR ADS_UF_ACCOUNTDISABLE ‘ User account is closed.
objUser.SetInfo
objOU.movehere objUser.ADsPath, objUser.name ‘ User account is moving.
end if

if request(“t”) = “b” then

Set objOU = GetObject(“LDAP://” & strOUDN)
objUser.accountdisabled = true ‘ Computer account is closed.
objUser.SetInfo
objOU.movehere objUser.ADsPath, objUser.name ‘ Computer account is moving.
end if

response.write “Account has been closed”
elseif ka = “a” then

if request(“t”) = “u” then
Set objOU = GetObject(“LDAP://” & strOUDNEU)
objUser.Put “userAccountControl”, intUAC XOR ADS_UF_ACCOUNTDISABLE ‘ User account is open.
objUser.SetInfo
objOU.movehere objUser.ADsPath, objUser.name ‘ User account is moving.
end if

if request(“t”) = “b” then

Set objOU = GetObject(“LDAP://” & strOUDNE)
objUser.accountdisabled = false ‘ Computer account is open.
objUser.SetInfo
objOU.movehere objUser.ADsPath, objUser.name ‘Computer account is moving.
end if

response.write “Account has been opened”
end if

response.Redirect “ADAramaAcmaKapama.asp?uname=”&request(“hesap”)&”&is=1″

adoRecordset.Close

response.End()
end if

‘ object search
if request(“uname”) = “” and request(“is”) <> “” then

%><p><b><center>User/Computer name can not be empty.</center></b></font></p><%
elseif request(“uname”) <> “” and request(“is”) <> “” then

strCN = request(“uname”) & “*”

if len(strCN) <4 then
response.Clear()
Response.Write(“Please enter least 3 char.”)
Response.end
end if

Set objRootDSE = GetObject(“LDAP://RootDSE”)

strDNSDomain = objRootDSE.Get(“defaultNamingContext”)

Set adoCommand = CreateObject(“ADODB.Command”)
Set adoConnection = CreateObject(“ADODB.Connection”)

adoConnection.Provider = “ADsDSOObject”
adoConnection.Open “Active Directory Provider”
adoCommand.ActiveConnection = adoConnection

strBase = “<LDAP://” & strDNSDomain & “>”

strFilter = “(cn=” & strCN & “)”

strAttributes = “cn,distinguishedName,sAMAccountName,name,userAccountControl”

strQuery = strBase & “;” & strFilter & “;” & strAttributes & “;subtree”
adoCommand.CommandText = strQuery
adoCommand.Properties(“Page Size”) = 100
adoCommand.Properties(“Timeout”) = 30
adoCommand.Properties(“Cache Results”) = False

Set adoRecordset = adoCommand.Execute

If (adoRecordset.EOF = True) Then
Response.Write(“<center>No record found</center>”)
Response.end
End If

‘ Table has been created what is object will be show.
Response.Write(“<table width=100% height=100% ><tr width=100% height=100% ><td width=100% height=100% align=center valign=center><table border=’1′>”)
Response.Write(“<tr><th> Account Name </th><th> Computer/User name </th><th> Status</th><th> Type </th><th> DN </th></tr>”)
Response.Write(“<font size=-2>”)

Do Until adoRecordset.EOF

vSAMAccountName= adoRecordset.Fields(“sAMAccountName”).Value
vName = adoRecordset.Fields(“name”).Value
vUserAccountControl= adoRecordset.Fields(“userAccountControl”).Value
vDistinguishedName= adoRecordset.Fields(“distinguishedName”).Value
AKR = 0
if vUserAccountControl = 512 then
AKR = 1
vUserAccountControlDesc = “<a href=’./ADAramaAcmaKapama.asp?hesap=”&vSAMAccountName&”&y=k&t=u’ title=’Kapatmak için tiklayin’><center> Close</center> </a>”
elseif vUserAccountControl = 514  then
AKR = 0
vUserAccountControlDesc = “<a href=’./ADAramaAcmaKapama.asp?hesap=”&vSAMAccountName&”&y=a&t=u’ title=’Açmak için tiklayin’><center> Open </center></a>”
elseif vUserAccountControl = 544  then
AKR = 1
vUserAccountControlDesc =  “<a href=’./ADAramaAcmaKapama.asp?hesap=”&vSAMAccountName&”&y=k&t=u’ title=’Kapatmak için tiklayin’><center> Close/ilsd </center></a>”
elseif vUserAccountControl = 66048  then
AKR = 1
vUserAccountControlDesc = “<a href=’./ADAramaAcmaKapama.asp?hesap=”&vSAMAccountName&”&y=k&t=u’ title=’Kapatmak için tiklayin’><center> Close/s </center></a>”
elseif vUserAccountControl = 66050  then
AKR = 0
vUserAccountControlDesc = “<a href=’./ADAramaAcmaKapama.asp?hesap=”&vSAMAccountName&”&y=a&t=u’ title=’Açmak için tiklayin’><center> Open/s </center></a>”
elseif vUserAccountControl = 4096  then
AKR = 1
vUserAccountControlDesc = “<a href=’./ADAramaAcmaKapama.asp?hesap=”&vName&”&y=k&t=b’ title=’Kapatmak için tiklayin’><center> Close </center></a>”
elseif vUserAccountControl = 4128  then
AKR = 1
vUserAccountControlDesc = “<a href=’./ADAramaAcmaKapama.asp?hesap=”&vName&”&y=k&t=b’ title=’Kapatmak için tiklayin’><center> Close </center></a>”
elseif vUserAccountControl = 4098  then
AKR = 0
vUserAccountControlDesc = “<a href=’./ADAramaAcmaKapama.asp?hesap=”&vName&”&y=a&t=b’ title=’Açmak için tiklayin’><center> Open </center></a>”
else

vUserAccountControlDesc = vUserAccountControl
end if

cuc = instr (vSAMAccountName,”$”)
if vUserAccountControl <> “” then

if cuc = 0 then Response.Write(“<tr><td> ” & vSAMAccountName & ” </td>”) else  Response.Write(“<tr><td></td>”)

if AKR = 0 then
response.write (“<td style=’background-color: #FF0000′> “&vName&” </td>”)
else
response.write (“<td style=’background-color: #00FF00′> “&vName&” </td>”)
end if

if cuc = 0 then

Response.Write(“<td style=’background-color: #667C26′>” & ” User ” & “</td>”)
else

Response.Write(“<td style=’background-color: #4863A0′>”& ” Computer ” & “</td>”)
end if

Response.Write(“<td>” & vUserAccountControlDesc & ” </td>”)

Response.Write(“<td align=right > ” & vDistinguishedName & ” </td>”)
else

end if

Response.Write(“</td></tr>”)

adoRecordset.MoveNext
strDisplay = 1

Loop

adoRecordset.Close

if strDisplay = “” then Response.Write(“Can not be search       —” & strDisplay & “—“)

adoConnection.Close

Response.Write(“</font>”)
Response.Write(“</table></td></tr></table>”)
Response.Write(“<br><align=left>P.S. :<br>Open/ilsd = Password will change first logon<br>Open/s = Password never expire<br>Close/s= Password never expire<br><br><br><br>”)

Response.End()
end if%>

 

 

Leave a comment

Web’ten Active Directory’deki Kullanıcı ve Bilgisayar hesaplarını Enable/Disable yapılması (ASP ile)

Aşağıda ve linkte bulunan asp kodları/dosyası ile, Active Directory’deki kullanıcı ve bilgisayar hesapları arasında arama yapabilir, nesnelerin Active Directory içerisindeki yerini öğrenebilir ve kullanıcı ve bilgisayar hesaplarını kapatıp açabilirsiniz. Kapatılan kulanıcı ve bilgisayar hesaplarını istediğiniz OU’da toplayabilir veya açtıklarınızı istediğiniz OU ya taşıyabilirsiniz.

Bu ASP dosyasını çalışabilmesi yayınladığınız web sitesi için IIS yapılacak tek ayar ise ; web site’ın authentication method’unu Basic authentication yapmak, böylece yetkisiz kullanıcılar Active Directory’de arama yapabilecekler fakat, enable/disable veya nesne taşıması yapamıyacaklar.

 

Dosyayi buradan indirebilirsiniz

Kaynak : http://www.emrullahekmekci.com.tr/?p=379

 

<%

‘    10 / 05 /2011 — Emrullah Tahir Ekmekçi
‘    Kullanici ve Bilgisayar hesaplarinin web üzerinden Enable/Disable yapilmasi
‘    1.0

response.charset=”windows-1254″
Response.CacheControl = “no-cache”
response.Clear()
%>

<title>Kullanici/Bilgisayar hesabi arama/acma/kapatma</title>
<body>
<br>
<br>

<center><form id=”form1″ name=”form1″ method=”post” action=”ADAramaAcmaKapama.asp”>
<label>Nesne adi
<input name=”is” type=”hidden” value=”is” /><input type=”text” name=”uname” id=”uname” />
</label>
</form></center>

</body>
</html>

<%

Dim strCN, objRootDSE, strDNSDomain, adoCommand, adoConnection
Dim strBase, strFilter, strAttributes, strQuery, adoRecordset
Dim strDN, strDisplay, strObjectCategory, intIndex

‘ Kullanici ve Bilgisayar hesabi acma ve kapatma

if request(“hesap”)  <> “” and request(“y”)  <> “” and request(“t”) <> “” then

strCN = request(“hesap”)
ka = request(“y”)

Set objRootDSE = GetObject(“LDAP://RootDSE”)

strDNSDomain = objRootDSE.Get(“defaultNamingContext”)

Set adoCommand = CreateObject(“ADODB.Command”)
Set adoConnection = CreateObject(“ADODB.Connection”)

adoConnection.Provider = “ADsDSOObject”
adoConnection.Open “Active Directory Provider”
adoCommand.ActiveConnection = adoConnection

strBase = “<LDAP://” & strDNSDomain & “>”

strFilter = “(cn=” & strCN & “*)”

strAttributes = “cn,distinguishedName,sAMAccountName,name,userAccountControl”

strQuery = strBase & “;” & strFilter & “;” & strAttributes & “;subtree”
adoCommand.CommandText = strQuery
adoCommand.Properties(“Page Size”) = 100
adoCommand.Properties(“Timeout”) = 30
adoCommand.Properties(“Cache Results”) = False

Set adoRecordset = adoCommand.Execute

Const ADS_UF_ACCOUNTDISABLE = 2

Set objUser = GetObject (“LDAP://” & adoRecordset.Fields(“distinguishedName”))

strOUDN = “OU=DisabledComputers,DC=fabrikam,DC=com”    ‘ Kapatilan Bilgisayar Hesaplarinin tasinacagi OU
strOUDNE = “CN=Computers,DC=fabrikam,DC=com” ‘ Açilan Bilgisayar Hesaplarinin tasinacagi OU

strOUDNU = “OU=DisabledComputers,DC=fabrikam,DC=com”     ‘Kapatilan kullanici Hesaplarinin tasinacagi OU
strOUDNEU = “CN=Users,DC=fabrikami,DC=com” ‘ Açilan Bilgisayar Hesaplarinin tasinacagi OU

intUAC = objUser.Get(“userAccountControl”)

if ka = “k” then

if request(“t”) = “u” then
Set objOU = GetObject(“LDAP://” & strOUDNU)
objUser.Put “userAccountControl”, intUAC OR ADS_UF_ACCOUNTDISABLE ‘ kullanici hesabi kapatiliyor
objUser.SetInfo
objOU.movehere objUser.ADsPath, objUser.name ‘ kullanici hesabi tasiniyor
end if

if request(“t”) = “b” then

Set objOU = GetObject(“LDAP://” & strOUDN)
objUser.accountdisabled = true ‘ bilgisayar hesabi kapatiliyor
objUser.SetInfo
objOU.movehere objUser.ADsPath, objUser.name ‘ bilgisayar hesabi tasiniyor
end if

response.write “Hesap Kapatildi”
elseif ka = “a” then

if request(“t”) = “u” then
Set objOU = GetObject(“LDAP://” & strOUDNEU)
objUser.Put “userAccountControl”, intUAC XOR ADS_UF_ACCOUNTDISABLE ‘ kullanici hesabi açiliyor
objUser.SetInfo
objOU.movehere objUser.ADsPath, objUser.name ‘ bilgisayar hesabi kapatiliyor
end if

if request(“t”) = “b” then

Set objOU = GetObject(“LDAP://” & strOUDNE)
objUser.accountdisabled = false ‘ bilgisayar hesabi açiliyor
objUser.SetInfo
objOU.movehere objUser.ADsPath, objUser.name ‘bilgisayar hesabi tasiniyor
end if

response.write “Hesap Acildi”
end if

response.Redirect “ADAramaAcmaKapama.asp?uname=”&request(“hesap”)&”&is=1″

adoRecordset.Close

response.End()
end if

‘ AD’de nesene aramari
if request(“uname”) = “” and request(“is”) <> “” then

%><p><b><center>Nesneyi bos gecmeyin lütfen.</center></b></font></p><%
elseif request(“uname”) <> “” and request(“is”) <> “” then

strCN = request(“uname”) & “*”

if len(strCN) <4 then
response.Clear()
Response.Write(“en az 3 karakter girmelisiniz.”)
Response.end
end if

Set objRootDSE = GetObject(“LDAP://RootDSE”)

strDNSDomain = objRootDSE.Get(“defaultNamingContext”)

Set adoCommand = CreateObject(“ADODB.Command”)
Set adoConnection = CreateObject(“ADODB.Connection”)

adoConnection.Provider = “ADsDSOObject”
adoConnection.Open “Active Directory Provider”
adoCommand.ActiveConnection = adoConnection

strBase = “<LDAP://” & strDNSDomain & “>”

strFilter = “(cn=” & strCN & “)”

strAttributes = “cn,distinguishedName,sAMAccountName,name,userAccountControl”

strQuery = strBase & “;” & strFilter & “;” & strAttributes & “;subtree”
adoCommand.CommandText = strQuery
adoCommand.Properties(“Page Size”) = 100
adoCommand.Properties(“Timeout”) = 30
adoCommand.Properties(“Cache Results”) = False

Set adoRecordset = adoCommand.Execute

If (adoRecordset.EOF = True) Then
Response.Write(“<center>Aradiginiz kriterde kayit bulunamadi</center>”)
Response.end
End If

‘ AD nesnelerinin gösterilecegi tablo olusturuluyor.
Response.Write(“<table width=100% height=100% ><tr width=100% height=100% ><td width=100% height=100% align=center valign=center><table border=’1′>”)
Response.Write(“<tr><th> Hesap adi </th><th> Bilgisayar/Kullanici Adi </th><th> Durum </th><th> Tipi </th><th> AD Yeri </th></tr>”)
Response.Write(“<font size=-3>”)

Do Until adoRecordset.EOF

vSAMAccountName= adoRecordset.Fields(“sAMAccountName”).Value
vName = adoRecordset.Fields(“name”).Value
vUserAccountControl= adoRecordset.Fields(“userAccountControl”).Value
vDistinguishedName= adoRecordset.Fields(“distinguishedName”).Value
AKR = 0
if vUserAccountControl = 512 then
AKR = 1
vUserAccountControlDesc = “<a href=’./ADAramaAcmaKapama.asp?hesap=”&vSAMAccountName&”&y=k&t=u’ title=’Kapatmak için tiklayin’><center> Kapat</center> </a>”
elseif vUserAccountControl = 514  then
AKR = 0
vUserAccountControlDesc = “<a href=’./ADAramaAcmaKapama.asp?hesap=”&vSAMAccountName&”&y=a&t=u’ title=’Açmak için tiklayin’><center> Aç </center></a>”
elseif vUserAccountControl = 544  then
AKR = 1
vUserAccountControlDesc =  “<a href=’./ADAramaAcmaKapama.asp?hesap=”&vSAMAccountName&”&y=k&t=u’ title=’Kapatmak için tiklayin’><center> Kapat/ilsd </center></a>”
elseif vUserAccountControl = 66048  then
AKR = 1
vUserAccountControlDesc = “<a href=’./ADAramaAcmaKapama.asp?hesap=”&vSAMAccountName&”&y=k&t=u’ title=’Kapatmak için tiklayin’><center> Kapat/s </center></a>”
elseif vUserAccountControl = 66050  then
AKR = 0
vUserAccountControlDesc = “<a href=’./ADAramaAcmaKapama.asp?hesap=”&vSAMAccountName&”&y=a&t=u’ title=’Açmak için tiklayin’><center> Aç/s </center></a>”
elseif vUserAccountControl = 4096  then
AKR = 1
vUserAccountControlDesc = “<a href=’./ADAramaAcmaKapama.asp?hesap=”&vName&”&y=k&t=b’ title=’Kapatmak için tiklayin’><center> Kapat </center></a>”
elseif vUserAccountControl = 4128  then
AKR = 1
vUserAccountControlDesc = “<a href=’./ADAramaAcmaKapama.asp?hesap=”&vName&”&y=k&t=b’ title=’Kapatmak için tiklayin’><center> Kapat </center></a>”
elseif vUserAccountControl = 4098  then
AKR = 0
vUserAccountControlDesc = “<a href=’./ADAramaAcmaKapama.asp?hesap=”&vName&”&y=a&t=b’ title=’Açmak için tiklayin’><center> Aç </center></a>”
else

vUserAccountControlDesc = vUserAccountControl
end if

cuc = instr (vSAMAccountName,”$”) ‘ Nesnin Bilgisayar hesabini oldugunu belirten “$” karakteri kontrolu yapiliyor
if vUserAccountControl <> “” then

if cuc = 0 then Response.Write(“<tr><td> ” & vSAMAccountName & ” </td>”) else  Response.Write(“<tr><td></td>”)

if AKR = 0 then
response.write (“<td style=’background-color: #FF0000′> “&vName&” </td>”)
else
response.write (“<td style=’background-color: #00FF00′> “&vName&” </td>”)
end if

if cuc = 0 then

Response.Write(“<td style=’background-color: #667C26′>” & ” Kullanici ” & “</td>”)
else

Response.Write(“<td style=’background-color: #4863A0’>”& ” Bilgisayar ” & “</td>”)
end if

Response.Write(“<td>” & vUserAccountControlDesc & ” </td>”)

Response.Write(“<td align=right > ” & vDistinguishedName & ” </td>”)
else

end if

Response.Write(“</td></tr>”)

adoRecordset.MoveNext
strDisplay = 1

Loop

adoRecordset.Close

if strDisplay = “” then Response.Write(“Arama yapilamadi      —” & strDisplay & “—“)

adoConnection.Close

Response.Write(“</font>”)
Response.Write(“</table></td></tr></table>”)
Response.Write(“<br><align=left>Note :<br>Acik/ilsd = Ilk logon’da sifre degistirilecek<br>Acik/s = Süresis sifre<br>Kapali/s = Süresis sifre<br><br><br><br>”)

Response.End()
end if%>

 

Leave a comment