Enjoying Being Alone, 孤独的在Microsoft里漫步
===========================================================
Create Bootable USB Drive
===========================================================

open a command line window on your Vista machine then type the following sequence of commands:

  • Diskpart
  • list disk (you should be able to spot your USB stick by the size, take note of the number listed against it)
  • select disk n (where n is the number from the previous step)
  • clean
  • create partition primary
  • select partition 1
  • active
  • format fs=ntfs quick
  • exit

szmmzs 发表于:2011.11.21 11:14 ::分类: ( 乱七八糟 ) ::阅读:(55次) :: Permanent link
===========================================================
Disable Dynamic DNS update
===========================================================

Unfortunately enabling and then disabling the "Register the connections address in DNS" option again did not resolve the issue. I figured this occurred as when upgrading VMware tools the servers network adapters are removed and re-added. To resolve this issue I opted to disable Dynamic DNS updates on the server all together using a registry entry. To disable Dymanic DNS on a Windows Server 2008 or Server 2008 R2 machine, perform the following actions.

1. Login to the server with the issue.

2. Click the Start menu and select Run.

3. In the Run dialog box type the following entry without the quotation marks and then click ok:

"reg add hklmsystemcurrentcontrolsetservicestcpipparameters /v DisableDynamicUpdate /t REG_DWORD /d 1 /f"

4. Reboot the server to complete the process.

I would recommend keeping a watch on your internal DNS servers for 24 hours after applying this registry key, to completely ensure the issue is resolved. You can find additional information on methods of disabling Dynamic DNS on Windows Server platforms at the following Microsoft KB article: http://support.microsoft.com/kb/816592


szmmzs 发表于:2011.11.21 11:09 ::分类: ( 乱七八糟 ) ::阅读:(50次) :: Permanent link
===========================================================
reduce the database log file
===========================================================
use DatabaseName
go

checkpoint

DBCC SHRINKFILE('DBlogName', 1)
BACKUP LOG DatabaseName WITH TRUNCATE_ONLY DBCC SHRINKFILE('DBlogName', 1)
szmmzs 发表于:2011.08.08 14:27 ::分类: ( 数据库 ) ::阅读:(75次) :: 评论 (0)
===========================================================
Disable Dynamic DNS Updates in Windows 2008
===========================================================

1. Login to the server with the issue.

2. Click the Start menu and select Run.

3. In the Run dialog box type the following entry without the quotation marks and then click ok: "reg add hklm system currentcontrolset services tcpip parameters /v DisableDynamicUpdate /t REG_DWORD /d 1 /f"

4. Reboot the server to complete the process.


szmmzs 发表于:2011.07.13 12:06 ::分类: ( 乱七八糟 ) ::阅读:(124次) :: 评论 (0)
===========================================================
Migrate DPM datasource to another hard drive using powershell
===========================================================

PS C:Program FilesMicrosoft DPMDPMbin> $disk = get-dpmdisk -DPMServerName dpmserver


PS C:Program FilesMicrosoft DPMDPMbin> $pg = Get-ProtectionGroup dpmserver


PS C:Program FilesMicrosoft DPMDPMbin> $ds = Get-Datasource $pg[12]


PPS C:Program FilesMicrosoft DPMDPMbin> .MigrateDatasourceDataFromDPM.ps1 -DPMServerName active-dpm -Source $ds[0] -Destination $disk[2]


szmmzs 发表于:2011.07.11 09:56 ::分类: ( 乱七八糟 ) ::阅读:(136次) :: 评论 (0)
===========================================================
Some Exchange Powershells
===========================================================

1. How to remove disconnected mailboxes:

Remove-StoreMailbox –database “DB2” –identity “Chakka Rajith” –MailboxState Disabled

If you want to remove all disconnected mailboxes from a database, run the following command

Get-MailboxStatistics –Database “dbname” | Where-Object {$_.DisconnectReason –eq “Disabled”} | ForEach {Remove-StoreMailbox –Database $_.database –identity $_.mailboxguid –MailboxState Disabled

If you want to remove all soft-deleted mailboxes from a database, run the following command

Get-MailboxStatistics –Database “dbname” | Where-Object {$_.DisconnectReason –eq “Softdeleted”} | ForEach {Remove-StoreMailbox –Database $_.database –identity $_.mailboxguid –MailboxState softdeleted

2. Point Exchange RPC client access server:

Get-MailboxDatabase <DB name> | fl RpcClientAccessserver

Set-MailboxDatabase <name of DB> -RpcClientAccessServer “outlook.domain.com”

3. Clean mailboxes to get them shown in the disconnected mailboxes:

Get-Mailboxstatistics -server active-mail | Where-Object { $_.DisconnectDate -ne $null } | FL DisplayName,LegacyDN,ItemCount,OriginatingServer

Clean a certain mailbox database with this command:

Clean-MailboxDatabase "Mailbox Database"

Clean all databases with this command:

Get-MailboxDatabase | Clean-MailboxDatabase

4. Assign full access to the all mailboxes on the mailbox database:

Get-MailboxDatabase -identity [mailbox database name] | Add-ADPermission -user [username] -AccessRights GenericAll

5. Assign full access to individual mailbox:

get-user -identity domainUSR | Add-MailboxPermission -User domainUSR -AccessRights 'FullAccess'

6. Enable anonymous authentication on receive connector:

add-adpermission 'Relay' -User 'NT AUTHORITYANONYMOUS LOGON' -ExtendedRights ms-Exch-SMTP-Accept-Authoritative-Domain-Sender


szmmzs 发表于:2011.07.11 09:46 ::分类: ( 其他程序 ) ::阅读:(109次) :: 评论 (0)
===========================================================
Recovery from LTO3 tapes with LTO5 tape drives using Backup Exec 2010
===========================================================

Steps:

Assign the media to Retire


Delete the media from retired media


Go to “tools” – “options” , in the “Settings” – “Catalog”, unselect “Request all media in the sequence for catalog operations”

Run Inventory on the media

When Inventory is finished, assign to media to “keep data infinitely – do not allow overwrite”

Run Catalog on the media

If there’s byte counts and catalog finished successfully, then start the restore.


szmmzs 发表于:2011.07.11 09:39 ::分类: ( 乱七八糟 ) ::阅读:(134次) :: 评论 (0)
===========================================================
No connection from Cisco VPN client using WWAN under Windows 7
===========================================================

If you have the issue with no connection activity after you cisco vpn is connected, especially when you are using WWAN or wireless broadband, here is the fix for it:

Download the new version and install it! Then restart and Enjoy!

http://www.citrix.com/lang/English/lp/lp_1680845.asp


szmmzs 发表于:2011.04.08 14:16 ::分类: ( 乱七八糟 ) ::阅读:(149次) :: Permanent link
===========================================================
Exchange 2000/2003 System Attendant does not start after disaster recovery installation, event ID 9022, 9149, 1005
===========================================================
After you run an Exchange disaster recovery installation, System Attendant may not start, and you may receive the following event ID messages:
Event Type: Error
Event Source: MSExchangeSA
Event Category: General
Event ID: 9022
Description:
Microsoft Exchange System Attendant encountered an error while processing the security data for Exchange server '<SERVERNAME>'.

For more information, click http://search.support.microsoft.com/search/?adv=1.


Event Type: Error
Event Source: MSExchangeSA
Event Category: General
Event ID: 9149
Description:
Microsoft Exchange System Attendant failed to start Exchange server '<SERVERNAME>'. Error code '0x80070005'.

For more information, click http://search.support.microsoft.com/search/?adv=1.


Event Type: Error
Event Source: MSExchangeSA
Event Category: General
Event ID: 1005
Description:
Unexpected error Access denied. Facility: LDAP Provider ID no: 80070005 Microsoft Exchange System Attendant occurred.


CAUSE

This issue may occur if the server account does not have the correct permissions on the Exchange server container in Active Directory.


RESOLUTION

To resolve this issue, use ADSI Edit to grant the correct permissions for the server account on the Exchange server container in Active Directory.

ADSI Edit is located in the SupportTools folder of the Windows 2000 or Windows Server 2003 CD. To install Windows 2000 or Windows Server 2003 Support Tools, follow these steps:

1. Insert the Windows 2000 Server or Windows Server 2003 CD in your CD-ROM drive.
2. Click No if you are prompted to reinstall Windows 2000 Server or Windows Server 2003.
3. Open the Support/Tools folder. For complete setup information, see the Sreadme.doc file that is available in this folder.

4. Double-click Setup.exe or suptools.msi.
5. Follow the instructions that appear on your screen.


How to Use ADSI Edit to Grant the Correct Permissions
Warning If you use the ADSI Edit snap-in, the LDP utility, or any other LDAP version 3 client, and you incorrectly modify the attributes of Active Directory objects, you can cause serious problems. These problems may require you to reinstall Microsoft Windows 2000 Server, Microsoft Windows Server 2003, Microsoft Exchange 2000 Server, Microsoft Exchange Server 2003, or both Windows and Exchange. Microsoft cannot guarantee that problems that occur if you incorrectly modify Active Directory object attributes can be solved. Modify these attributes at your own risk.

1. Start ADSI Edit.
1. Click Start, click Run, type adsiedit.msc, and then click OK.
2. Click Tools, and then click ADSI Edit.
2. Expand Configuration, expand Configuration (CN=Configuration,DC=domain,DC=com), expand Services, and then expand Microsoft Exchange.
3. Expand OrganizationName, expand Administrative Groups, expand AdministrativeGroupName, and then expand Servers.
4. Right-click Server Name, and then click Properties.
5. Click the Security tab, verify that the server object is in the list of accounts with rights, and then verify that the Allow check box for Full Control is selected. If this permission is not selected, click to select the Allow check box for Full Control, and then click OK.
6. Quit ADSI Edit.
7. Wait for the change to replicate among the domain controllers.
8. Start System Attendant.
szmmzs 发表于:2009.09.16 11:32 ::分类: ( 乱七八糟 ) ::阅读:(418次) :: 评论 (0)
===========================================================
SQL Database Maintenance Wizard
===========================================================

The following 2 database plans should be setup using the maintenance plan wizard to run on every SQL server weather they are used to store data by Great Plains or not. The steps below assume there is no SQL agent configured with the tape backup software to perform a database backup (dump) direct to tape, if a backup agent is used with tape software refer "Tape Software Backup Agent" in the last section below.

Weekly

Create a new maintenance plan and make the following changes from the default settings:

  1. Run on “All” databases
  2. Reorganise data and index pages changing free space percentage to 10, schedule to run once a week when things are quiet e.g. Sunday 5:15am
  3. Check database Integrity (dbcc) including the attempt to repair minor problems, schedule to run once a week when things are quiet e.g. Sunday 3:15am
  4. Once a week on Sunday evening Backup database with the verify option, perform the backup at the same time the daily evening backup runs e.g. 8:15pm, specify the backup to write to the subdirectory of the SQL “backup” folder with a name like backupscheduleweeklydb and remove backup files older than one week. Note: Folders will need to be created in the file system first.
  5. Write the report to the text file in default SQL log directory and delete text reports older than 4 weeks, write the history to msdb and limit row to 1000 lines
  6. Give the database Plan a name of “Weekly”


Daily

Create a new maintenance plan and make the following changes from the default settings:

  1. Run on “All user databases” although you could specify just DYNAMICS, GP Company DB's and any other user db's. See note 1 below.
  2. Update Statistics using 10% sample, scheduled early – ish every week day e.g. 6:15am
  3. Every week night backup without the verify option at a time well before the scheduled tape backup software runs e.g. 8:15pm, specify the backup to write to the subdirectory of the SQL “backup” folder with a name like backupscheduledailydb and remove backup files older than 2 days
  4. With the verify option enabled backup the transaction log every hour of every day starting 12:00am finishing 11:59pm, specify the backup to write to the subdirectory of the SQL “backup” folder with a name like backupschedulelog and remove backup files older than 3 days
  5. Write the report to the text file in the default SQL log directory and delete text reports older than 4 weeks, write the history to msdb and limit row to 1000 lines
  6. Give the database plan a name of “Daily”
  7. Change the database properties of each of the specific databases above disabling both “Truncate Log on Checkpoint” and “Select into Bulk Copy”. On SQL 8.0 this is done by changing the recovery model to “Full”. Also see note 2 below.

    Notes:

    1. The choice of “All user databases” for the daily plan is the better option as any databases that are added after the Maintenance Plan has been created will automatically be included. Also any database that is removed at a later date will need no further action by the database administrator.
    2. If the database is SQL 8.0 and “All user databases” are selected then also change both “pubs” and “Northwind” to “Full” recovery model. If this is missed the log back up may indicate an error and the expired log backups may not be deleted by the Job created by this maintenance plan.

In the Jobs area of the SQL server agent the separate jobs created by the Maintenance plan wizard will be present. It is worth running these manually from here to confirm they are runable and therefore operational. If a job completes but has errors this may indicate an incorrect setting, refer note 2 above.

If SQL is also being used for Great Plains data then in addition to those jobs created by the wizard it is also worth manually adding the script Grant70.sql to run often each day against all the Great Plains databases. If Great Plains is also using Fixed Assets then instead of Grant70.sql use the script grantall.sql. Details of these scripts can be found by following this link.

Within 24 hours have another look at the jobs area and confirm there are no errors, check the file system and identify the backup files are there. Check the SQL logs for errors, the log files can be found in the log folder in the SQL program folder. Note: the database integrity check will usually only report errors and not actually fix anything, it will report these errors into the SQL log and the text output file associated to the job. Therefore it is imperative to look at the text output file and the SQL log to check for errors. These log files should be checked often especially on the Monday morning after the Weekly scheduled dbcc integrity check is done. The Monday morning check should also identify the Sunday night weekly back files are present.

When in the SQL Server Agent jobs area resist the temptation to change any of the jobs created by the Maintenance Plan Wizard, instead make the needed change by adjusting the Properties of the associated maintenance Plan item.

Be aware the database transaction log backup is set to run as part of the Daily Backup Maintenance Plan every hour on the hour, for this reason other scheduled tasks are set to run at a time 15 minutes after the hour. Since the transaction log backup will seldom take longer than 3 minutes to write out the data to the specified backup folder and then truncate the log, it will be well finished before other scheduled tasks run.


Tape Software Backup Agent

If tape backup software like Arcserve or BackupExec is used with a SQL agent then both the daily and the weekly maintenance plans should still run with changes made as follows:

  1. In the “Weekly” plan no database backup is required as this will be taken by the tape software direct to tape
  2. In the “Daily” plan, the evening database backup should run an hour before the tape software starts, and expire the database backup backup files older than 1 day.

The evening backup to file is still useful as it allows the restoration of the previous evenings data without utilizing the tape software.


szmmzs 发表于:2009.09.16 11:22 ::分类: ( 数据库 ) ::阅读:(302次) :: 评论 (0)
===========================================================
How to change Licence Key for MS Office 2007
===========================================================
Note: The following steps involve modification of registry key values, which may corrupt your Windows if done incorrectly. Backup registry first before performing the workaround.
  1. Close all Microsoft Office programs.
  2. Click on Start button, then click on Run.
  3. Type “regedit” (without quotes) in the Run text box, and click OK or press Enter.
  4. Locate and then click the following subkey:

    HKEY_LOCAL_MACHINE SoftwareMicrosoftOffice12.0Registration

    Inside, you will find another subkey that resembles the following subkey:

    HKEY_LOCAL_MACHINESOFTWAREMicrosoftOffice12.0Registration{30120000-0011-0000-0000-0000000FF1CE}

  5. Optional: Backup this registry branch by exporting the Registration subkey to a file, just in case the new product key does not work and you have to restore back the old product key. To export the registry, right click on the Registration subkey and click on Export, and follow the on-screen prompt to enter a file name for the registry file and choose a location to store it.
  6. Under the Registration subkey, there may be several Globally Unique Identifiers (GUID) subkey that contain a combination of alphanumeric characters. Each GUID is specific to a program that is installed on your computer.

    If you find additional subkeys that reference Microsoft 12.0 registration, then click and open each GUID subkey to view and identify the Office product version by the ProductName registry entry in the right pane. For example:

    ProductName = Microsoft Office Proffesional Plus 2007

  7. After you find the GUID subkey that contains your Office product or program which you want to remove the existing product license key or registration details, delete the following registry entries by right clicking on the registry entry in the GUID subkey, click Delete, and then click Yes:

    • DigitalProductID
    • ProductID

  8. Exit Registry Editor.
  9. Run or open an Office application program, such as Word or Excel or Outlook. Office 2007 will prompt you to enter a new 25-character product key.

szmmzs 发表于:2009.09.16 11:15 ::分类: ( 乱七八糟 ) ::阅读:(406次) :: 评论 (0)
===========================================================
How to change Volume Licence Key for Windows XP and 2003
===========================================================
If you do not have to change many Volume Licensing product keys, you can use the Activation Wizard.

Note We recommend that you run System Restore on Windows XP to create a new restore point before you follow these steps. For information about how to create a restore point by using System Restore, see the "To Create a Restore Point" help topic in Help and Support.
  1. Click Start, click Run, type regedit, and then click OK.
  2. In the left pane, locate and then click the following registry subkey:
    HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsNTCurrent VersionWPAEvents
  3. In the right pane, right-click OOBETimer, and then click Modify.
  4. Change at least one digit of the OOBETimer value to deactivate Windows.
  5. Click Start, click Run, type the following command, and then click OK:
    %systemroot%system32oobemsoobe.exe /a
  6. Click Yes, I want to telephone a customer service representative to activate Windows, and then click Next.
  7. Click Change Product key, type the new product key in the New key boxes, and then click Update.

    Note If the previous Activation Wizard screen appears again, click Remind me later, and then restart the computer.
  8. Repeat steps 6 and 7 to verify that Windows is started. Click OK when you receive the following message:
    Windows is already activated. Click OK to exit.
  9. Install any Windows service packs that you want to install.

    Note If you cannot restart Windows after you install a service pack, press F8 when you restart the computer, click Last Known Good Configuration, and then repeat this procedure.

szmmzs 发表于:2009.09.16 11:10 ::分类: ( 乱七八糟 ) ::阅读:(334次) :: 评论 (0)
===========================================================
Useful powershell command for Windows SYS Admin
===========================================================

The get-wmiobject command is a very userful tool for Windows Admins to manage the remote inventories, for example, you can easily get the bios version, Serial Number and other bios info by using the following command:

get-wmiobject win32_bios -computername Test-PC1

you can simply get other info as well, here are some parametres I used a lot:

win32_computersystem, win32_processor, win32_logicaldisk, win32_diskdrive, win32_physicalmemory


szmmzs 发表于:2009.09.16 10:52 ::分类: ( 乱七八糟 ) ::阅读:(422次) :: 评论 (0)
===========================================================
Using BackupExec 12.5 and other VSS not supported Software to backup DPM
===========================================================

From BcakupExec 12.0, there hasn't been the DPM backup agent any more. So you can no more backup your DPM directly from BackupExec. However, there is a workaround and it's relatively easy:

There is a built-in backup tool for DPM. It's named DpmBackup.exe and it's located in the folder: C drive(If you install DPM on C drive) -> Program Files -> Microsoft Data Protection Manager -> DPM -> bin. This built-in backup tool will backup all the replicas for the proteced servers and the DPM database to the folder: C drive(If you install DPM on C drive) -> Program Files -> Microsoft Data Protection Manager -> DPM -> Volumes -> ShadowCopy. it will create individual subfolders for each protected server and DPM database. if you need only backup your replica, you can use the command as DpmBackup.exe -replica; similarly, for DPM database only, the command is DpmBackup.exe -db.

You can then use the BackupExec and other VSS not supported backup software to backup the shadowcopy folder.

You can of course run the tool manually before the daily backup but obviously it's better to make it running automatically. the easiest way is to to use a script or batch file that launch the DpmBackup.exe and use the Windows scheduled tasks to run the script every day/weekday.


szmmzs 发表于:2009.05.19 09:00 ::分类: ( 乱七八糟 ) ::阅读:(389次) :: 评论 (0)
===========================================================
Disable User Account Control (UAC) from Group Policy (GP)
===========================================================

UAC can be disabled from GP in "computer configuration"

Go to the policy you need to config and edit it:


computer configuration -> Windows Settings -> Security Settings -> Local Policies -> Security Options.


Change the following three policies:

User Account Control: Behavior of the elevation prompt for standard users - Automatically deny elevation requests/No Prompt

User Account Control: Detect application

installations and prompt for elevation - Disabled


User Account Control: Run all administrators in Admin Approval Mode - Disabled


szmmzs 发表于:2009.04.20 10:49 ::分类: ( 乱七八糟 ) ::阅读:(414次) :: 评论 (0)
自我介绍
切换风格
新闻聚合
博客日历
文章归档...
最新发表...
博客统计...
Blog信息
网站链接...