2015年10月20日 星期二

get sid windows7

wmic useraccount where name='administrator' get sid




Get SID of a local user
wmic useraccount where name='username' get sid

For example, to get the SID for a local user with the login name  ‘John’, the command would be as below
wmic useraccount where name='John' get sid

Get SID for current logged in user

To retrieve the SID for current logged in user we can run the below command. This does not require you to specify the user name in the command. This can be used in batch files which may be executed from different user accounts.
wmic useraccount where name='%username%' get sid

Get SID for current logged in domain user

Run the command ‘whoami /user’ from command line to get the SID for the logged in user.
 Example:
c:\>whoami /user
USER INFORMATION
----------------
User Name      SID
============== ==============================================
mydomain\wincmd S-1-5-21-7375663-6890924511-1272660413-2944159
c:\>

Get SID for the local administrator of the computer
wmic useraccount where (name='administrator' and domain='%computername%') get name,sid

Get SID for the domain administrator
wmic useraccount where (name='administrator' and domain='%userdomain%') get name,sid

jump-lists-reset-clear

:: Created by: Shawn Brink
:: http://www.eightforums.com
:: Tutorial:  http://www.eightforums.com/tutorials/9611-jump-lists-reset-clear-windows-8-a.html


del /F /Q %APPDATA%\Microsoft\Windows\Recent\*

del /F /Q %APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations\*

del /F /Q %APPDATA%\Microsoft\Windows\Recent\CustomDestinations\*

taskkill /f /im explorer.exe

start explorer.exe

Windows10 health Check

Dism /Online /Cleanup-Image /CheckHealth
Dism /Online /Cleanup-Image /ScanHealth
Dism /Online /Cleanup-Image /RestoreHealth
sfc /scannow

2015年3月11日 星期三

DeliverToMailboxAndForward 轉寄信件至信箱





Get-Mailbox -resultSize unlimited |where {$_.deliverTomailboxAndForward -eq '$true'}| Set-mailbox  -deliverTomailboxAndForward $False




Set-Mailbox -Identity "some user" -ForwardingAddress some.user@contoso.com -DeliverToMailboxAndForward $False
and to get a list of those users

get-mailbox -ResultSize unlimited | where {$_.delivertomailboxandforward -eq $true}|select Name, Samaccountname | export-csv c:\mailandforward.csv

2014年11月15日 星期六

Exchange 2010 Service Authentication Fails with UnexceptedExchangeAuthBlob

Event Viewer ID 1035 Inbound authentication failed with error UnexpectedExchangeAuthBlob for the Receive connector

只能收不能寄到別的主機
時間跑掉了,調回來就好了

2014年9月1日 星期一

OWA界面默认筛选器无法筛选关键字

C:\Program Files\Microsoft\Exchange Server\V14\Scripts  (Exchange 2010)

.\ResetSearchIndex.ps1  –force 15F
.\ResetSearchIndex.ps1  –force 16D

2014年3月31日 星期一

將連結的信箱轉換為使用者信箱。


在執行這個命令之後,您必須從信箱中移除 FullAccess, ExternalAccount 權限。
Set-User -Identity kweku@fabrikam.com -LinkedMasterAccount $null



http://technet.microsoft.com/zh-tw/library/bb201694(v=exchg.141).aspx