This file contains 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 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
net user UserName Password /ADD /FULLNAME:"Full Name" /PASSWORDCHG:Yes /EXPIRES:never /ACTIVE:yes /COMMENT:"Comment" | |
net localgroup GroupName UserName /add |
This file contains 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
DECLARE @UserName sysname; | |
DECLARE @NameToAdd sysname; | |
DECLARE @S nvarchar(1000) | |
SET @UserName = 'User Name'; | |
SET @NameToAdd = @@SERVERNAME + '\' + @UserName; | |
-- Create a login using windows auth | |
--set @s = 'CREATE LOGIN ' + quotename(@NameToAdd) + ' FROM WINDOWS;' | |
--exec (@S) |
This file contains 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" /> |
This file contains 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 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 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 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 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 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" |
OlderNewer