2015年4月27日 星期一

Minimum rights required to run a windows service as a domain account

1. Edit the properties of the service and set the Log On user.
    The appropriate right will be automatically assigned.


2.  Set it manually:
     Go to Administrative Tools -> Local Security Policy -> Local Policies ->
     User Rights Assignment. Edit the item "Log on as a service" and
     add your domain user there.

2015年4月26日 星期日

Windows 2008 Scheduled tasks result codes

§  0 or 0x0: The operation completed successfully.
§  1 or 0x1: Incorrect function called or unknown function called.
             (
Did you use the correct start in folder and/or environment path for
              the bat/exe?)
§  2 or 0x2: File not found.
§  10 or 0xa: The environment is incorrect.
§  0x41300: Task is ready to run at its next scheduled time.
§  0x41301: Task is currently running.
§  0x41302: Task is disabled.
§  0x41303: Task has not yet run.
§  0x41304: There are no more runs scheduled for this task.
§  0x41306: Task is terminated.
§  0x8004130F: Credentials became corrupted
§  0x8004131F: An instance of this task is already running.
§  0x80070002: Basically something like file not available (2147942402)
§  0x8007010B: Action 'start in' directory cannot be found.
§  0x800704DD: The service is not available (is 'Run only when a user is logged
                            on' checked?)                     
§  0xC000013A: The application terminated as a result of a CTRL+C.
§  0xC06D007E: Unknown software exception.

2015年4月22日 星期三

System Administrator command line shortcuts to popular MMCs

Admin AppletCommand
AD Domains and Trusts
domain.msc
Active Directory Management
admgmt.msc
AD Sites and Services
dssite.msc
AD Users and Computers
dsa.msc
ADSI Edit
adsiedit.msc
Authorization manager
azman.msc
Certification Authority Management
certsrv.msc
Certificate Templates
certtmpl.msc
Cluster Administrator
cluadmin.exe
Computer Management
compmgmt.msc
Component Services
comexp.msc
Configure Your Server
cys.exe
Device Manager
devmgmt.msc
DHCP Management
dhcpmgmt.msc
Disk Defragmenter
dfrg.msc
Disk Manager
diskmgmt.msc
Distributed File System
dfsgui.msc
DNS Management
dnsmgmt.msc
Event Viewer
eventvwr.msc
Indexing Service Management
ciadv.msc
IP Address Manage
ipaddrmgmt.msc
Licensing Manager
llsmgr.exe
Local Certificates Management
certmgr.msc
Local Group Policy Editor
gpedit.msc
Local Security Settings Manager
secpol.msc
Local Users and Groups Manager
lusrmgr.msc
Network Load balancing
nlbmgr.exe
Performance Monitor
perfmon.msc
PKI Viewer
pkiview.msc
Public Key Management
pkmgmt.msc
Quality of Service Control Management
acssnap.msc
Remote Desktop
tsmmc.msc
Remote Storage Administration
rsadmin.msc
Removable Storage
ntmsmgr.msc
Removable Storage Operator Requests
ntmsoprq.msc
Routing and Remote Access Manager
rrasmgmt.msc
Resultant Set of Policy
rsop.msc
Schema management
schmmgmt.msc
Services Management
services.msc
Shared Folders
fsmgmt.msc
SID Security Migration
sidwalk.msc
Telephony Management
tapimgmt.msc
Terminal Server Configuration
tscc.msc
Terminal Server Licensing
licmgr.exe
Terminal Server Manager
tsadmin.exe


2015年4月19日 星期日

Cannot connect to admin$ folder

You cannot access an administrative share on a computer after you set the SrvsvcDefaultShareInfo registry entry to configure the default share permissions for a network share https://support.microsoft.com/en-us/kb/971277/

2015年3月17日 星期二

Clear Printer Queue

a)   Click on Windows Vista/Windows 7 Start orb and type Command in start menu search field.
b)   From the list select and right-click Command Prompt and select Run as administrator.
      (This will give you an elevated command prompt).
c)    Type “net stop spooler” into command prompt window without the quotes and
       then press Enter.
       You should get a confirmation that the print spooler is stopping.
d)   Then type “del %systemroot%\System32\spool\prtiners\* /Q” without the quotes
       then press Enter.
e)   Then type “net start spooler” without the quotes and then press Enter.
f)    Type exit and press Enter to exit the elevated command window.

2015年3月10日 星期二

User profile service 1530 Warning

Symptom
==========
Customer has user profile service 1530 Warning in application log. Customer would like to know what is the reason of this issue.

Cause
======
This behavior occurs because Windows automatically closes any registry handle to a user profile that is left open by an application

Resolution

===========
This behavior is by design. 

Getting event ID 64 with the event source CertificateServicesClient-AutoEnrollment

Event Source:  CertificateServicesClient-AutoEnrollment
Event ID:  64
Description:  Certificate for local system with Thumbprint [CERTIFICATE THUMBPRINT] is about to expire or already has expired.

Cause
========
It appears that the CA that issued the Server certificates had been removed from the network and these expired certificates where left in the local computer certificate store.

Resolution
===========
1.  Logon to the Server.
2.  Type in:  MMC
3.  Click on File menu option and select Add/Remove Snap-in.
4.  Select Certificate and click the Add button.
5.  Select Computer account, then Next.
6.  Click on Local Computer and click on the Finish button.
7.  Click the OK button.
8.  Once the certificates MMC is click on:  Certificates (Local Computer)\Personal

9.  Delete all the expired certificates.