This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| REM Deletes files in specified path older than X days. | |
| forfiles -p "C:\path\to\files" -s -m *.* -d -360 -c "cmd /c del @path" | |
| REM Alternate way to do it. Deletes all files in current directory older than X days. | |
| forfiles -s -m *.* -d -360 -c "cmd /c del @path" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sp_msforeachdb 'use [?]; CREATE USER [MyDBUser] FOR LOGIN [MyDBLogin];EXEC sp_addrolemember ''db_datareader'', ''[MyDBUser]''' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT | |
| CONVERT(CHAR(100), SERVERPROPERTY('193199-WEB1')) AS Server, | |
| msdb.dbo.backupset.database_name, | |
| msdb.dbo.backupset.backup_start_date, | |
| msdb.dbo.backupset.backup_finish_date, | |
| msdb.dbo.backupset.expiration_date, | |
| CASE msdb..backupset.type | |
| WHEN 'D' THEN 'Database' | |
| WHEN 'L' THEN 'Log' | |
| END AS backup_type, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| certutil -repairstore my "SerialNumber" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # CertUtil - Key must be in a .KEY file and must have the same base file name as the cert. | |
| certutil –MergePFX certfile.cer certfile.pfx | |
| # Old method, using OpenSSL | |
| openssl pkcs12 -export -inkey MyCert.pem -in MyCert.crt -out MyCert.p12 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sp_configure 'show advanced options', 1; | |
| GO | |
| RECONFIGURE; | |
| GO | |
| sp_configure 'clr enabled', 1; | |
| GO | |
| RECONFIGURE; | |
| GO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| EXEC sp_grantlogin 'BUILTIN\Administrators' | |
| EXEC sp_addsrvrolemember 'BUILTIN\Administrators','sysadmin' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # One of the many useful command line options discussed here: http://office.microsoft.com/en-us/outlook-help/command-line-switches-for-outlook-2010-HP010354956.aspx | |
| outlook.exe /resetfoldernames |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From: http://www.sevenforums.com/tutorials/49819-icon-cache-rebuild.html | |
| ie4uinit.exe -ClearIconCache | |
| taskkill /IM explorer.exe /F | |
| DEL "%localappdata%\IconCache.db" /A | |
| shutdown /r /f /t 00 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <configuration> | |
| <location path="." inheritInChildApplications="false"> | |
| <system.webServer> | |
| <rewrite> | |
| <rules> | |
| <clear /> | |
| <rule name="Root Hit Redirect" enabled="false" stopProcessing="true"> | |
| <match url="^$" /> | |
| <conditions logicalGrouping="MatchAll" trackAllCaptures="false" /> |