dsquery user domainroot -name “name”* | dsget user -samid Read more →
Category: code
AD Distribution Group or Security Group
dsquery group domainroot -name | dsget group -secgrp Read more →
Limit users who can log in using Remote Desktop
By default, all Administrators can log in to Remote Desktop. If you have multiple Administrator accounts on your computer, you should limit remote access only to those accounts that need it. If Remote Desktop is not used for system administration, remove all administrative access via RDP and only allow user accounts requiring RDP service. For Departments that manage many machines… Read more →
Find domain group membership
gpresult /V Read more →
Tips for Sql query performance
The following are a list of good practices I follow when querying large sets of data. SELECT * Avoid selecting all columns from a table. Queries should explicitly list each column it requires Changing column definitions on the underlying tables can have an adverse effect on dependencies such as views, name clashes etc Avoid reading and returning unnecessary data Can… Read more →
How to download a nupkg file
You can download nupkg files by navigating directly to the url using the syntax: nuget.org/api/v2/package/<xyw> where <xyz> is the name of the package you are seeking e.g. nuget.org/api/v2/package/NuGet.CommandLine. You can also request earlier versions of the package by specifying the version in the url e.g. http://www.nuget.org/api/v2/package/NuGet.CommandLine/2.8.6/ Read more →
TeamCity: Agent has unregistered (will upgrade)
I have been getting the TeamCity error Agent has unregistered (will upgrade) with an upgraded installation for sometime and today on a new installation. Both installations are configured to run as a dedicated Windows user account. The problem can be resolved by adding the Windows user to the Administrators group, restart the Build Agent service and wait for the upgrade… Read more →
Copy Outlook signatures between computers
The Signatures folder is usually hidden and the easiest way to open the folder is to Run the command %APPDATA%\Microsoft\Signatures. Copy the contents to the same location on the new computer. Easy. Read more →
Url Redirect for moved blog
namespace Director { public class HttpModule : IHttpModule { public void Init(HttpApplication context) { context.BeginRequest += new EventHandler(this.context_BeginRequest); } private void context_BeginRequest(object sender, EventArgs e) { HttpApplication application = (HttpApplication)sender; HttpContext context = application.Context; if (context.Request.FilePath.TrimEnd(‘/’).Length > 0 && !File.Exists(context.Request.PhysicalPath)) { context.Response.Redirect( $”http://scrapbook.qujck.com{context.Request.FilePath}”, true); } } public void Dispose() { } } } <system.webServer> <modules runAllManagedModulesForAllRequests=”true”> <add name=”HttpModule” type=”Director.HttpModule” />… Read more →
Migrate helps to move WordPress installations between URLs
https://github.com/ErisDS/Migrate Read more →