Documento Confidencial
Mostrar menú Ocultar el menú
L | M | X | J | V | S | D |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Daniel Davila Lopez
Documento Confidencial
esto es para todos
Para ver este Post tienes que autenticarte.
Búsqueda a través de todos los buzones
Analizaremos termino por termino de la consulta
Búsqueda en los buzones «Get-Mailbox»
Termino para que la búsqueda sea ilimitada » -ResultSize unlimited», por default solo busca las primeras 1000 coincidencias
Consulta «-SearchQuery» ‘Subject:xxxxxxxx’, donde xxxxxxxx es el titulo del mail que búscamos, si se omite Subject: se buscara también el texto dentro del cuerpo del correo.
Buzón donde depositara la consulta y las coincidencias de la misma: -TargetMailbox
Carpeta donde depositara la consulta y las coincidencias (se puede omitir): -TargetFolder
Parámetro para indicar que las coincidencias deben ser borradas: -DeleteContent
-- Get-Mailbox -ResultSize unlimited | Search-Mailbox -SearchQuery 'Subject:COMP. DE PAGO FACT. 60% PEDIDO 578799758' -TargetMailbox ddavila@momentoexacto.com -TargetFolder "BusquedaFolder" -DeleteContent --
Documento Confidencial
Script para habilitar y deshabilitar la funcion de xp_cmdshell
-- To allow advanced options to be changed. EXECUTE sp_configure 'show advanced options', 1; GO -- To update the currently configured value for advanced options. RECONFIGURE; GO -- To enable the feature. EXECUTE sp_configure 'xp_cmdshell', 1; GO -- To update the currently configured value for this feature. RECONFIGURE; GO --*******************DESHABILITAR************************* -- To enable the feature. EXECUTE sp_configure 'xp_cmdshell', 0; GO -- To update the currently configured value for this feature. RECONFIGURE; GO -- To allow advanced options to be changed. EXECUTE sp_configure 'show advanced options', 0; GO RECONFIGURE; GO
-- To allow advanced options to be changed. EXEC sp_xp_cmdshell_proxy_account 'domain\user1','users1 Windows password' EXEC sp_xp_cmdshell_proxy_account 'domain\user2','users2 Windows password'
Aplicar permisos para que pueda ejecutar cmdshell
GRANT EXECUTE ON xp_cmdshell TO [BATTA-NET\User]
Verificar si esta habilitado xp_cmdschell
Use master EXEC SP_CONFIGURE 'xp_cmdshell';
Lista de usuarios con permisos
--usuarios que tienen habiilitado Use master EXEC sp_helprotect 'xp_cmdshell'
En ocasiones hay que agregar algunos registros en el REGEDIT para poder desinstalar
-- REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SAVService" /t REG_DWORD /v Start /d 0x00000004 /f REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Sophos MCS Agent" /t REG_DWORD /v Start /d 0x00000004 /f REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Sophos Endpoint Defense\TamperProtection\Config" /t REG_DWORD /v SAVEnabled /d 0 /f REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Sophos Endpoint Defense\TamperProtection\Config" /t REG_DWORD /v SEDEnabled /d 0 /f REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Sophos\SAVService\TamperProtection" /t REG_DWORD /v Enabled /d 0 /f --
Backup todas las bases de datos
Detach todas las bases de datos
Documentar users
Ejecutar desde línea de comandos:
-- setup.exe /ACTION=REBUILDDATABASE /INSTANCENAME=MSSQLSERVER /SQLCOLLATION=SQL_Latin1_General_CP1_CI_AS /SAPWD=$Passw0rd$ /SQLSYSADMINACCOUNTS=domain\administrator --
Utilizar este script para habilitar OpenQuery
-- sp_configure 'show advanced options', 1; RECONFIGURE; GO sp_configure 'Ad Hoc Distributed Queries', 1; RECONFIGURE; GO sp_configure 'show advanced options', 0; RECONFIGURE; GO --
Comentarios