Thursday, June 26, 2014

Forcing a user session off a server or workstation

Forcing a user off from a workstation or server using powershell



1) qwinsta /server:servername

rwinsta ID /server:servername

Sometime this won't work due to firewalls or other issues you can try

2)
# arguments for Win32Shutdown method:
#
# 0 Log Off
# 0 + 4 Forced Log Off
# 1 Shutdown
# 1 + 4 Forced Shutdown
# 2 Reboot
# 2 + 4 Forced Reboot
# 8 Power Off
# 8 + 4 Forced Power Off

$comp = read-host "Computer Name"
(gwmi win32_operatingsystem -ComputerName $comp).Win32Shutdown(4)

MAK to KMS licensing


Changing MAK to KMS
slmgr.vbs /ipk [KmsSetupKey]

To auto register with KMS server if SRV record has been created in DNS pointing to KMS server
slmrg.vbs /ato

Manually set KMS server\port

slmgr /skms yourkmsServer.com:1688

KMS Licensing Keys


Vista

Windows Vista Business
YFKBB-PQJJV-G996G-VWGXY-2V3X8

Windows Vista Business N

HMBQG-8H2RH-C77VX-27R82-VMQBT

Windows Vista Enterprise

VKK3X-68KWM-X2YGT-QR4M6-4BWMV

Windows Vista Enterprise N

VTC42-BM838-43QHV-84HX6-XJXKV


Server 2008

Windows Server 2008 Datacenter 
7M67G-PC374-GR742-YH8V4-TCBY3

Windows Server 2008 Datacenter without Hyper-V

22XQ2-VRXRG-P8D42-K34TD-G3QQC

Windows Server 2008 for Itanium-Based Systems

4DWFP-JF3DJ-B7DTH-78FJB-PDRHK

Windows Server 2008 Enterprise

YQGMW-MPWTJ-34KDK-48M3W-X4Q6V

Windows Server 2008 Enterprise without Hyper-V

39BXF-X8Q23-P2WWT-38T2F-G3FPG

Windows Server 2008 Standard

TM24T-X9RMF-VWXK6-X8JC9-BFGM2

Windows Server 2008 Standard without Hyper-V

W7VD6-7JFBR-RX26B-YKQ3Y-6FFFJ

Windows Web Server 2008

WYR28-R7TFJ-3X2YQ-YCY4H-M249D


Windows 7

Windows 7 Professional
FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4

Windows 7 Professional N

MRPKT-YTG23-K7D7T-X2JMM-QY7MG

Windows 7 Enterprise

33PXH-7Y6KF-2VJC9-XBBR8-HVTHH

Windows 7 Enterprise N

YDRBP-3D83W-TY26F-D46B2-XCKRJ

Windows 7 Enterprise E

C29WB-22CC8-VJ326-GHFJW-H9DH4


Windows Server 2008 R2 

Windows Server 2008 R2 HPC Edition
FKJQ8-TMCVP-FRMR7-4WR42-3JCD7

Windows Server 2008 R2 Datacenter

74YFP-3QFB3-KQT8W-PMXWJ-7M648

Windows Server 2008 R2 Enterprise

489J6-VHDMP-X63PK-3K798-CPX3Y

Windows Server 2008 R2 for Itanium-Based Systems

GT63C-RJFQ3-4GMB6-BRFB9-CB83V

Windows Server 2008 R2 Standard

YC6KT-GKW9T-YTKYR-T4X34-R7VHC

Windows Web Server 2008 R2

6TPJF-RBVHG-WBW2R-86QPH-6RTM4

Friday, June 20, 2014

Exchange 2007

Lingering delegate NDR --- **symptoms old assistant no longer in AD. When users email or create calendar event NDR would generate**
When you set up delegates a hidden rule in the Inbox that automatically forwards meeting requests to the delegate is created.
If this gets corrupted you can use MFCMapi to clean them up - http://support.microsoft.com/kb/924297

- Launch MFCMAPI Editor
- From the Session Menu, choose Logon and dispaly store table
- Double click the mailbox (Mailbox)
- Expand Root container, and Top of Information Store
- Right click the Inbox, and choose "Display Rules Table"
- This will open a new windows and will display the rules configured on this mailbox. The rules will be listed in the top half of this window.
- In the top window of the Rules table, under "PR_Rule_Provider"column delete the entry with display name "Schedule+EMS Interface"
- Right click the Delegate Rule mentioned above ("Schedule+EMS Interface") and then chose Delete. This will delete the rule from the mailbox.

Wednesday, June 18, 2014

Built a server 2008R2 box from a template and it kept losing the Default GW after every reboot.

Resetting the IP stack fixed it.

From the command line run :

netsh int ip reset

Reboot and enter IP config again.

Friday, June 13, 2014

Old delegate generating NDR's when emailing or scheduling calendaring

Exchange 2007

Lingering delegate NDR --- **symptoms old assistant no longer in AD. When users email or create calendar event NDR would generate**



When you set up delegates a hidden rule in the Inbox that automatically forwards meeting requests to the delegate is created.


If this gets corrupted or if user gets removed from AD before you remove them from AD you can use MFCMapi to clean them up - http://support.microsoft.com/kb/924297


Grant yourself full access to users mailbox
Use MFCMAPI Editor
Session | Logon and select your local profile
Double click the mailbox that is having the problem
Expand Root container, and Top of Information Store
Right click the Inbox, and choose other tables | rules table
Look at the rules listed in the top half of this window.
Look for the "PR_Rule_Provider"column.
Then delete the entry with display name "Schedule+EMS Interface"