Sunday, September 25, 2011

Copy files over SFTP

Copy files over SFTP

using PSFTP: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html


psftp.exe 192.168..25.122 -P 22 -l UserName -pw Passw0rd -b C:\pathtoBatchFile.txt


pathtoBatchFile.txt:
==============
cd "/57/Inbound/DCMS Files"
mput DCMS*
ls
==============

Monday, September 19, 2011

The password stored in Credential Manager is invalid. This might be caused by the user changing the password from this computer or a different compute

http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx
and copy it to C:\Windows\System32 .
From a command prompt run: psexec -i -s -d cmd.exe
From the new DOS window run: rundll32 keymgr.dll,KRShowKeyMgr
Remove any items that appear in the list of Stored User Names and Passwords. Restart the computer.

Retrive user Member of which Active driectory groups

dsquery user "CN=Donya ,OU=Internal Audit,OU=123,DC=123,DC=bh,DC=com" -o dn | dsget user -memberof > c:\Temp\sep\Donya.txt

Thursday, September 15, 2011

How to Reset Local Group Policy Objects to default settings

I just copied it from a web site to keep it here as refrence

After much searching on how to do such a simple task as reset local GPOs back to their defaults, I finally found the real answer. I tried this on Windows XP, although it is said to work for 2000 and 2003 Server as well.

1. If you need to clear IPSec settings and software restriction settings do these two sub-steps, otherwise go on to the second step:
a. reg delete hklm\software\policies\microsoft /f
b. regedit /s "c:\policies.reg" (where c:\policies.reg is the exported hklm\software\policies\microsoft hive of a virgin or target configured machine)
2. Issue this magical command to reset the rest of the GPO settings to their defaults (enter this all on one line):
secedit /configure /db reset /cfg "c:\windows\security\templates\setup security.inf" /overwrite
3. Delete the registry.pol file if it exists:
del c:\windows\system32\grouppolicy\machine\registry.pol
4. Reboot

That's it! You're done!

Thursday, September 8, 2011

Wput Example

copy c:\ahmad\ftp\*.htm c:\ahmad\Backup\

wput c:\ahmad\Backup\*.htm ftp://ahmad:PaSsw0rd@127.0.0.1/

pause