Category Archives: Windows

Windows tips, howtos, scripts

Windows: How to determine the SID of a User or Group

Hi,

Sometimes you need the SID of a user or group. For example if you want to set permissions with icalcs in multilanguage environments. icacls needs as input the group name or the SID. If you want to set permission for the builtin groups you have to specify the group name in the current language of the operating system, i.e. “Users” for en-US and “Benutzer” for de-DE. The better choice is the SID, the SIDs for builtin groups are always the same.
Continue reading Windows: How to determine the SID of a User or Group

Advertisment to support michlstechblog.info

Powershell: Active Directory Domain Operations

Hi,

some commands to manage Active Directory Domain Controllers by using the .NET System.DirectoryServices.ActiveDirectory.Domain Class.
Load the assembly

[reflection.assembly]::LoadWithPartialName("System.DirectoryServices.Protocols")|Out-Null

Get a Domain Object with the logon Domain of the current user
Continue reading Powershell: Active Directory Domain Operations

Powershell: How to show a message box

Sometimes while a powershell script is running you want to show a MessageBox with a information or warning to the user. In Windows Powershell no Commandlet exists to show a Message Box.

Nevertheless it is possible by using the .NET Windows.Forms.MessageBox class:-).

First of all load the assembly.

# Load assembly
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")

To show the messagebox call the static function show(“Message Text”)
Continue reading Powershell: How to show a message box

Windows: Error: Cannot read from the source file or disk, Could not find this item. This is no longer locate…

Hi,

difficult Windows issue today. A user had the problem that he could not delete a Folder (C:\Temp\orders) , also renaming or moving is not possible. The same behaviour with the command line tools rmdir, ren and move.
The folder was created from Excel with a vba macro.

Error message: Cannot read from source file or disk
Error message: Cannot read from source file or disk

The error message was: Cannot delete file: Cannot read from the source file or disk.
Continue reading Windows: Error: Cannot read from the source file or disk, Could not find this item. This is no longer locate…

Windows: Disable automatic Window arranging and resizing while dragging with the mouse (AeroSnap)

Sometimes the Windows 7 functionality to automatically arrange or resize a window while dragging is a pain. This feature is called Aero Snap. Here are good news, you can disable the behaviour :-).

Open the Control Panel, go to “Ease of Access center”. If you are there, click “Make the mouse easier to use” and enable “Prevent Windows from being automatically arranged when moved to the edge of the screen”.

Mouse Settings

Continue reading Windows: Disable automatic Window arranging and resizing while dragging with the mouse (AeroSnap)