Environment

How to purge Kerberos tickets of the system account

Posted by on Mar 30, 2016 in Active Directory, Environment | 0 comments

How to purge Kerberos tickets of the system account

… or: How to update group membership information of the computer account. When updating Active Directory group membership of your users you usally ask them to logoff and logon again. You don’t tell them why, you just tell them to do so. What happens? When logging on again the group membership information of a user (within their kerberos tickets) gets updated and they can access the ressources they have access to. You can check which tickets a user has by using the klist command: But how about the system / computer account. You can’t logoff and logon the system account. You...

Read More

How to change BitLocker recovery password with vbScript?

Posted by on Oct 5, 2011 in BitLocker, Environment, VBScript, WMI | 0 comments

Related to my last post about how to change BitLocker recovery password from an elevated command prompt here is how you can achieve the same result with vbScript and WMI. This script is from Microsoft TechNet: BitLocker Drive Encryption Operations Guide: Recovering Encrypted Volumes with AD DS. ' Target drive letter strDriveLetter = "c:" ' Target computer name ' Use "." to connect to the local computer strComputerName = "." ' -------------------------------------------------------------------------------- ' Connect to the BitLocker WMI provider class '...

Read More

How to change BitLocker recovery password?

Posted by on Oct 5, 2011 in BitLocker, Environment | 0 comments

Sometimes you need to give a BitLocker recovery password to one of your customers. For example when you cannot access the computer remotely. It also happens that passwords get revealed accidentally or intentionally. While either scenario can be a security lack you may want to change the recovery password of a certain computer. To do so, you’ll need to open an elevated command prompt. With manage-bde.exe (BitLocker Drive Encryption: Configuration Tool) you can manage to change such recovery passwords. First get a list of recovery passwords for the desired partition by typing:...

Read More

How to set the Windows 7 user account picture programmatically?

Posted by on Aug 12, 2011 in C#, Environment, VB.net | 6 comments

Windows 7 offers the possibility to show small user account pictures, for example in the start menu or on the lock screen. Since there is no documented way of setting this picture programmatically here is a solution for developing a small application that can do this for you. You’ll simply need Visual Studio – either with C# or Visual Basic support. You can get your free edition here: http://www.microsoft.com/visualstudio/express. Create a new console application, copy and paste the following source code an build the solution. The resulting application will be able to set the user...

Read More

How to use environment variables in Powershell?

Posted by on Nov 6, 2010 in Environment, Powershell | 0 comments

Sometimes you need to use an environment variable (eg. username, userprofile, computername, …) in Powershell. The location where environment variables are stored is “env:”. This behaves similar to a hard or flash drive. You can list its content or browse it by using dir env: The output shows all existing environment variables you can use. But how to use them? You can get every environment variable by using the get-content or for short gc cmdlet. $computername = get-content env:computername $username = gc env:username List of environment variables in Windows 7 /...

Read More