April 28, 2016

RDP inside RDP inside RDP ... and Password change

Your password is near expiration? Okay, enter "Ctrl+Alt+Delete" and change your password. It is not an easy task when you work in multiple remote desktop sessions. How to do it inside RDP (RDP in RDP etc.)? 

1. Simply run "osk".
2. Press Ctrl and Alt on your keyboard.
3. Then Delete on On-Screen Keyboard.

Note: sure thing you can run "Ctrl+Alt+End" combination but it will work only in one level. If you open a session inside current one it will not work. It just popups a password change menu from first session.

That's it.

April 26, 2016

PowerShell - Find out Shared Mailboxes with enabled AD account

Get-Mailbox | where {$_.RecipientTypeDetails -like "SharedMailbox"} | foreach {Get-ADUser -Identity $_.name} | where {$_.enabled -like "True"} | select UserPrincipalName,Enabled

April 21, 2016

Windows Server Core - Managing Programs, Updates and Drivers

# Get information about installed software using registry
REG QUERY HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall

# WMI method
wmic product

# Managing Windows Updates
wmic qfe
Wusa /uninstall /kb:XXXXXXX

# Managing Drivers
Sc query type= driver
pnputil -d -f package.inf

April 16, 2016

VMware vs. Hyper-V - Find VM ID

How to find ID of Virtual Machine?

In Hyper-V:
Get-VM VM_NAME | select ID

In VMware:
Get-VM VM_NAME | %{(Get-View $_.Id).config.uuid}

What was that?

PowerShell - NTFS Permissions report

The PowerShell script below provides NTFS permissions report for folders. It includes Path, Identity, Rights and Owner information. Also it has a note if permissions are inherited or not. The script contains some limitations (path over 260 in lengths and some special characters) but in most cases I found it very useful. Especially if you need some quick overview of permissions.

Usage examples:
# Get NTFS permissions report for folder C:\Test
.\Get-NTFSPermissions.ps1 -path C:\Test

# Get the same report as above but only 2 folders in depth
.\Get-NTFSPermissions.ps1 -path C:\test -Depth 2