Na empresa onde trabalho se fez necessário dois papeis diferentes conforme o tipo de monitor, 4:3 ou 16:9, para isso foi necessário colocar o script abaixo no em uma GPO de logon para que mude o papel de parede conforme o tipo de tela
-------------------------------------
echo off
setLocal EnableDelayedExpansion
if %computername% == Servidor GOTO server
wmic path Win32_VideoController get CurrentHorizontalResolution| FIND /I "1920">Nul && (GOTO wide)
wmic path Win32_VideoController get CurrentHorizontalResolution| FIND /I "1440">Nul && (GOTO wide)
wmic path Win32_VideoController get CurrentHorizontalResolution| FIND /I "1366">Nul && (GOTO wide)
wmic path Win32_VideoController get CurrentHorizontalResolution| FIND /I "1360">Nul && (GOTO wide)
wmic path Win32_VideoController get CurrentHorizontalResolution| FIND /I "1600">Nul && (GOTO wide)
GOTO normal
:wide
copy /y \\servidor\sysvol\scripts\Wallpapers\wide\* %userprofile%\Pictures\
RUNDLL32.EXE USER32.DLL,UpdatePerUserSystemParameters 1, True
GOTO fim
:normal
copy /y \\servidor\sysvol\scripts\Wallpapers\normal\* %userprofile%\Pictures\
RUNDLL32.EXE USER32.DLL,UpdatePerUserSystemParameters 1, True
GOTO fim
:server
del /q c:\temp\wallpaper.bmp
del /q c:\temp\wallpaper.jpg
:fim
-------------------------------
Após o script é necessário definir na GPO que o papel de parede é o %userprofile%\Pictures\wallpaper.jpg
Como funciona
Ele verifica a resolução de tela e conforme a resolução copia um arquivo para o %userprofile%\Pictures\ , e a GPO usa esta imagem como padrão
quinta-feira, 5 de dezembro de 2019
quarta-feira, 27 de novembro de 2019
Forçar ações automática GLPI
#Força a ativação da tarefa de envio de email
*/1 * * * * php /var/www/html/glpi/front/cron.php --force mailgate
*/1 * * * * root php /var/www/html/glpi/front/cron.php --force mailgate
*/1 * * * * /usr/bin/php5.6 /var/www/html/glpi/front/cron.php --force mailgate
*/1 * * * * /usr/bin/php7.0 /var/www/html/glpi/front/cron.php --force mailgate
*/1 * * * * /usr/bin/php7.1 /var/www/html/glpi/front/cron.php --force mailgate
*/1 * * * * root php /var/www/html/glpi/front/cron.php --force queuedmail
Em outras palavras:
Ele força a execução da tarefa "mailgate" de 1 em 1 minuto
Perceba que coloquei para diversas versões do php, você precisa saber qual é a sua e adicionar a linha conforme sua versão
Aqui, no meu caso, resolveu.
Espero ter ajudado.
Abraço!
terça-feira, 22 de outubro de 2019
Iframe cortando margens
<html>
<head>
<title></title>
</head>
<body>
<div id="content">
<div style="height:800px;"><iframe frameborder="0" height="120%" scrolling="no" src="/portal/p/1/ecmnavigation?app_ecm_navigation_doc=244" style="position:absolute;
top:-100px; left:-80px;" width="110%"></iframe></div>
</div>
</body>
</html>
<head>
<title></title>
</head>
<body>
<div id="content">
<div style="height:800px;"><iframe frameborder="0" height="120%" scrolling="no" src="/portal/p/1/ecmnavigation?app_ecm_navigation_doc=244" style="position:absolute;
top:-100px; left:-80px;" width="110%"></iframe></div>
</div>
</body>
</html>
sexta-feira, 11 de outubro de 2019
How to disable Amazon Kindle Keyboard screensaver
By default if you leave your Kindle Keyboard idle for 10 minutes without turning a page, it will enter screensaver mode (sleep mode). There are times you just need it to stay on a page without going in to screensaver mode. This post will show you how you can disable the screensaver mode.
ress Home button.
Press Del button. This will bring up the search box.
Type ;debugOn and press Enter.
Type ~disableScreensaver and press Enter.
Type ;debugOff and press Enter.
Once you have disabled the screensaver mode, you can manually switch to screensaver mode by using the power slider.
Re-enable screensaver mode
Press Home button.
Press Del button. This will bring up the search box.
Type ;debugOn and press Enter.
Type ~resumeScreensaver and press Enter.
Type ;debugOff and press Enter.
ress Home button.
Press Del button. This will bring up the search box.
Type ;debugOn and press Enter.
Type ~disableScreensaver and press Enter.
Type ;debugOff and press Enter.
Once you have disabled the screensaver mode, you can manually switch to screensaver mode by using the power slider.
Re-enable screensaver mode
Press Home button.
Press Del button. This will bring up the search box.
Type ;debugOn and press Enter.
Type ~resumeScreensaver and press Enter.
Type ;debugOff and press Enter.
quinta-feira, 15 de agosto de 2019
Ativar opção de conta nunca expira no Office 365
Comando via powershell
Comandos para conectar ao PowerShell
Set-executionpolicy
unrestricted
Set-ExecutionPolicy
RemoteSigned
$LiveCred =
Get-Credential
$Session =
New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/
-Credential $LiveCred -Authentication Basic -AllowRedirection
Import-PSSession
$Session
Connect-Msolservice
-Credential $LiveCred
Configura pra não expirar mais a senha
Set-MSOLUser
-UserPrincipalName usuario@dominio.com -PasswordNeverExpires $true
Consulta o usuário
quarta-feira, 17 de julho de 2019
Dicas Específicos
- Localizar programas que tratam por grupo de usuários
- usuar_grp_usuar.cod_grp_usuar = 'XXX'
segunda-feira, 11 de março de 2019
Ver processos e matar no Linux
Comando via SHELL
- htop
- F4 (filtra por nome) + Enter
- Seleciona o processo
- F9 (Abre menu kill)
- Comando 9
Assinar:
Postagens (Atom)