# The Wiert Corner – irregular stream of stuff

• ## Email Subscription

Join 1,533 other followers

# Archive for the ‘Windows Server 2000’ Category

## Finding out when your domain password will expire :: Active Directory :: Admin Tips :: Windows 7 :: Windows Server 2012/2008/2003/2000/XP/NT Administrator Knowledge Base :: KBase Tips :: WindowsNetworking.com

Posted by jpluimers on 2018/02/02

Here’s how you can find out when your domain password will expire.

net user %USERNAME% /domain

It figures this out for the current logon domain (so it doesn’t work cross-domain) but it is a great help, especially when filtering out just the password information:

net user %USERNAME% /domain | findstr "Password"

This can be done in a more complex way with dsquery or adinfo that are tools to query

## 17 years ago, C:\nul\nul crashed/BSOD Windows; now $MFT does for Windows < 10 Posted by jpluimers on 2017/05/26 Source: History repeating itself: [Archive.is31607 – C:\nul\nul crashes/BSOD then, now it’s this: Via: All versions prior to Windows 10 and Windows Server 2016 seem vulnerable. So add$MFT to this list:

The following device names have been known to render a system unstable: CON,
NUL, AUX, PRN, CLOCK$, COMx, LPT1, and CONFIG$.

### Oh BTW: history repeated itself this year too. With NUL

In short, Steven Sheldon created a rust package named nul which broke the complete package manager on Windows:

BTW: one of my gripes on learning new languages is that they come with a whole new idiom of their ecosystem: rust, cargo, crates, all sound like being a truck mechanic to me.

–jeroen

## Two Quick Methods for Finding Shared Folders in Windows

Posted by jpluimers on 2017/05/01

In addition to the two methods mentioned at Two Quick Methods for Finding Shared Folders in Windows (use net share or compmgmt.msc) I like this one:

fsmgmt.msc

It directly gets you to the “Shared Folders” inside compmgmt.msc

–jeroen

## permissions – recursively change owner windows 7 – Super User

Posted by jpluimers on 2016/10/27

Slightly updated the answer the /D Y part will recursively accept taking ownership when directory listing is denied in the permissions:

To fix really broken permissions, the best is to run these two commands one after the other:

takeown /F /D Y "C:\path\to\folder" /R
icacls "C:\path\to\folder" /reset /T

The first one will give you ownership of all the files, however that might not be enough, for example if all the files have the read/write/exec permissions set to “deny”. You own the files but still cannot do anything with them.

In that case, run the second command, which will fix the broken permissions.

–jeroen

## Batch files to show the User/System environment variables stored in registry – via: Stack Overflow

Posted by jpluimers on 2016/09/20

I wrote two tiny batch files that would dump the environment variables from the registry.

Various reasons:

1. Environment variables can be stored in two contexts: System and User (SET will show them all at once and for instance combine PATH up to 1920 characters).
2. Environment variables can be set to auto-expand or not, which you cannot see from a SET command (REG_EXPAND_SZ versus REG_SZ).

show-user-environment-variables.bat:

reg query "HKCU\Environment"

show-system-environment-variables.bat:

reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment"

Filtered results: