Friday, January 8, 2016

Someone has a file open.

So, they moved the GUI in 2012r2 to show who has a file open.

I have no idea where it went, and I'm sure there are a billion ways to do it on the interwebs.

Get-SmbOpenFile | Where-Object -Property Path -EQ 'DriveLetter:\Folder\Path\Here'

Play with Get-SmbOpenFile and it's friends Close-SmbOpenFile, Close-SmbOpenSession, Block-SmbShareAccess.

Ton of utility there.

Thursday, January 7, 2016

Wireless Disabled on Server 2012r2

Wireless networking is disabled (feature not installed), by default on Windows 2012r2.

Quick Google =

Easy fix. But why do it in the GUI?


Get-WindowsFeature Wireless*
#Confirm that "Wireless-Networking is not installed (available).
Install-WindowsFeature Wireless Networking 

You'll have to restart, and after you do, if there are issues, you might need to change the "WLAN AutoConfig" service off "manual".

...and this is probably a bad thing to have in production..something...something not a best practice.

Install-WindowsFeature is actually a really interesting cmdlet.

You can within that cmdlet, do things like -ForceRestart and -Source. Source will let you specify a network UNC path, a repo specified by GPO, local system, VHD, or the venerable Windows Update.

So if you go so far as to establish a well known GPO with the repo, you can never ever need to have media available (doesn't come up much, but it does for things such as .NET 3.5 needing to be installed in 2012r2).

The kicker really is that it (centralized sources) will become more and more needed as server slims down and attack surfaces are reduced through simply reducing the amount of components installed.

Wonder if this will be merged into One-Get in the future.