Install IIS 7 from CMD

http://www.zerrouki.com/powershell-ways-to-install-iis7-x/ Start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-Security;IIS-RequestFiltering;IIS-HttpCompressionStatic;IIS-WebServerManagementTools;WAS-WindowsActivationService;WAS-ProcessModel

List Inactive Computer Accounts in Active Directory

https://gallery.technet.microsoft.com/scriptcenter/6b8163d1-5fae-43b5-a664-a2d1f6e1e2da Description: List all computer accounts not active for xxx days.   DO NOT RUN THIS AS AN AUTO PURGE!  Pink slips are NOT fun to receive. Use it as a report to get a view of POTENTIAL dead garbage. # Uses Quest Active Roles  # Free to download http://www.quest.com/powershell/activeroles-server.aspx  #  # Special Thanks to Mladen Milunovic for his comments that improved the Script!  #  # List all computers that have been  # Inactive in “Active Directory”(Boy THERE’S a play on words!)  # for a specified Number of Days  #   # New version exports the Data to a CSV file and removes limit  # on number of Computers listed (default is 1000)  #   $COMPAREDATE=GET-DATE  #  # DO NOT RUN THIS IN PRODUCTION. TEST IT FIRST and use it as  # a REFERENCE tool.   AUTO PURGING OF COMPUTER ACCOUNTS is  […]

Delete/Archiver files older than x-days – Cleanup Script

https://gallery.technet.microsoft.com/scriptcenter/Delete-files-older-than-x-13b29c09 Script to delete files older than x-days. The script is built to be used as a scheduled task, it automatically generates a log file based on the copy location and the current date/time. There are various levels of logging available. Or use simple Robocopy to archiver Old files tO USB HDD @echo off setlocal […]

Remote Desktop Services login history

http://serverfault.com/questions/479048/remote-desktop-services-login-history Q: Is it possible to generate a report of past user logins to a Windows Server 2008 Remote Desktop Services server? The closest Event Viewer logs I can find are under Application and Services Logs –> Microsoft –> Windows –> TerminalServices-RemoteConnectionManager. These logs are good, however you cannot display the user account for each […]

Join Debian Wheezy to Windows Active Directory Domain

http://www.digitalllama.net/2013/05/join-debian-wheezy-to-windows-active.html While looking for something to keep me busy on a quiet day I decided to work out how to get Debian 7 authenticating against our Active Directory domain. I have been doing this for a few years with our Redhat/CentOS systems but we have a few Debian boxes for variety and as they are […]

How to fix Orphan User in absense of login

http://sqldbpool.com/2010/12/22/how-to-fix-orphan-user-in-absense-of-login/ Error Msg 15291, Level 16, State 1, Procedure sp_change_users_login, Line 131 Terminating this procedure. The Login name ‘DJ’ is absent or invalid What is Orphaned User? An Orphaned User in SQL Server is a database user for which a valid SQL Server Login is not available or it is wrongly defined with the different […]

Few Step(s) to Remove SQL Server Database User(s)

http://www.codeproject.com/Articles/66827/Few-Step-s-to-Remove-SQL-Server-Database-User-s Introduction Database security is one of the significant concerns for most DBAs. DBAs frequently restore or backup the database, this is a very common scenario, But the thing is after successfully restoring a new version of your database, you want to remove the current users. Probably you thought of just expanding the user node […]

How to: Remove SQL Server Database User(s)

http://www.wisdom-soup.com/blog/security-audit/how-to-remove-sql-server-database-users/ Database security is one of the significant concerns for most DBAs. DBAs frequently restore or backup the database, this is a very common scenario, But the thing is after successfully restoring a new version of your database, you want to remove the current users. Probably you thought of just expanding the user node and […]