Server 2012 R2 Shadow

List connected users and session ID:

From command prompt qwinsta.exe

 

Shadow user:

mstsc /shadow:ID

Shadow user with control:

mstsc /shadow:ID /control

Shadow user with control with no user prompt:

mstsc /shadow:ID /control /noconsentprompt

Grant a non administrator group rights to shadow a user:

wmic /namespace:\\root\CIMV2\TerminalServices PATH Win32_TSPermissionsSetting WHERE (TerminalName =”RDP-Tcp”) CALL AddAccount “DOMAIN\GROUPNAME”,2

 

 

Advertisements
Posted in Uncategorized | Leave a comment

Remote Desktop listener certificate configurations in Windows Server 2012 R2 and Windows Server 2012

https://support.microsoft.com/en-us/kb/3042780

Posted in Uncategorized | Leave a comment

Exchange Mailbox Permissions Via Powershell

List current permissions on Calendar Folder:
Get-MailboxFolderPermission -identity “MAILBOX:\calendar”

Update permissions on Calendar Folder where user is already listed:
Set-MailboxFolderPermission -identity “MAILBOX:\calendar” -user USER -accessrights reviewer

Add a user to a calendar folder where they are not listed already:
add-MailboxFolderPermission -identity “MAILBOX:\calendar” -user USER -accessrights reviewer

Permission Level Mailbox Folder Calendar Folder
None Yes Yes
Owner Yes Yes
PublishingEditor Yes Yes
Editor Yes Yes
PublishingAuthor Yes Yes
Author Yes Yes
NoneditingAuthor Yes Yes
Reviewer Yes Yes
Contributor Yes Yes
Custom Yes Yes
FreeBusyTimeOnly No Yes
FreeBusyTimeAndSubjectAndLocation No Yes
Posted in Exchange | Leave a comment

Update ManagedBy setting for all Distribution Lists Starting with Matching Criteria

Say you have a department with 50 or so distribution lists and they want to have a user or group of users manage all of the lists, the following command would be used.

This command will list all distribution lists starting with Muni and update the ManagedBy setting accordingly.

Get-DistributionGroup | where{$_.Name -like’muni*’} |Set-Distributiongroup –managedby user1,user2,user3

NOTE: This command will overwrite any existing settings

 

Posted in Exchange | Leave a comment

Moving arbitration mailboxes in child domain

Set-ADServerSettings -ViewEntireForest:$true

Get-Mailbox -Arbitration | New-MoveRequest -TargetDatabase DATABASENAME

Posted in Uncategorized | Leave a comment

Enable Mailbox access auditing for members of a distribution list

Get-DistributionGroupMember “EXECUTIVES” | set-mailbox -auditenabled $true

Posted in Uncategorized | Leave a comment

Remove message from user mailbox

Email sent to individual mailbox:

search-Mailbox -Identity “USER MAILBOX” -SearchQuery Subject:”SUBJECT” -DeleteContent

 

Email sent to distribution list:

Get-DistributionGroupMember “DISTRIBUTIONLISTNAME” | search-Mailbox -SearchQuery Subject:”SUBJECT” -DeleteContent

 

Email sent to a large number of users exported to a text file (one address per line):

Get-Content c:\Temp\FILENAME.txt | search-Mailbox -SearchQuery Subject:”SUBJECT” –DeleteContent

 

Posted in Exchange | Leave a comment