Category: code examples

  • Powershell: Exporting Active Directory Contacts

    Some time ago, I needed to have a list of all Contacts registered in Active Directory. Knowing that there are a lot of them (numbering at least eighty), getting the data manually was not a viable alternative, particularly knowing that the same objective can be achieved through Powershell. I eventually came up with a solution.…

  • Exporting a list of a given users group memberships from Active Directory

    A while back, I showed you how to export a list of all members of a group, as well as all computers, from Active Directory. On a related note, here’s how to export all group memberships held by a single user: Log on to your Domain Controller Open a command prompt Enter the command dsget…

  • Exporting a list of all computers from Active Directory

    Last week I covered how you can use the DSQuery command to export members of a given AD Group. This week, on a related note, I will cover how to use the same basic command to export all computer accounts in Active Directoy. Log on to your Domain Controller Open a command prompt Enter the…

  • Exporting members of an Active Directory group

    A while back, my boss came to me, asking me if I could get him an export of the users that are members of two groups in Active Directory. For the purposes of this blog post, let’s call them “OfflineUsers” and “Software Access”. As it turns out, this is pretty easy to do. Here’s how:…

  • Sense: Referencing files from wherever you want

    In Sense, you can reference a list to control what your program does. By default, the [line X from_file “file.txt”] references the Sense project folder, but it can reference one of many locations. How this works differs on Windows and Mac, but the approach is much the same.     The way you do it,…

  • Exporting Sense scripts as clear text

    As part of my studies, I have been “programming” in Sense, a version of Scratch, the graphic programming environment developed at MIT. The programs developed in Sense are stored as .sb-files. Now, the problem is that these files are only readable by the program that made them (and Sense programs are apparently not readable by…

  • Deleting a service from the command prompt

    Sometimes, as an administrator, you will need to remove a service from Windows. This can be because it is malfunctioning, and reinstalling the software it came with does not solve the issue, or because an uninstall of the software it came with does not solve the actual problem. Whatever the cause, removing a service takes…

  • Controlling the version of Java installed

    Every so often, I encounter computers that, among other things, have very specific prerequisites. For SAP CRM and Mobile Sales, more often than not, a specific version of Java should be installed. If it isn’t, problems ensue. Now, while you’ll always have the option of finding out what version is installed through the control panel,…

  • Taking MailTo to the next level

    If you’ve ever written a website in HTML, you are probably familiar with the MailTo-command, used to automatically start a new email message when the link is clicked. However, you can do so much more with the command. Here are some examples:   Address message to multiple recipients Add entry in the “Subject” field Add…

  • Making bullet-point lists in HTML

    I frequently make use of bullet-point lists in my blog, and I usually code these in HTML. I like them to stand out a bit. It’s pretty simple to achieve, and here’s how:  <ul><li>Bulletpoint 1</li><li>Bulletpoint 2</li><li>Bulletpoint 2</li></ul> If you want a numbered list, you substitute the <ul> tag for <ol>

  • Posting code examples rendered like text

    When writing my last post I had a problem that parts of the code was parsed into the page, meaning that the result, instead of the actual code, was seen. As you can see in the post, I solved the problem, and here’s how: By replacing the lesser than symbol (<) with “&lt;“, the greater…