Skip to content

Instantly share code, notes, and snippets.

View fluggelgleckheimlen's full-sized avatar

fluggelgleckheimlen

View GitHub Profile
@fluggelgleckheimlen
fluggelgleckheimlen / ScriptingAgentConfig.xml
Created February 2, 2024 09:15
Заполняет SimpleDisplayName при создании почтового ящика
<?xml version="1.0" encoding="utf-8" ?>
<Configuration version="1.0">
<Feature Name="NewMailbox" Cmdlets="New-Mailbox">
<ApiCall Name="OnComplete">
If ($succeeded)
{
Start-Sleep -s 20
$DC = [string]($readOnlyIConfigurable.originatingserver)
$User = Get-User -Identity $provisioningHandler.UserSpecifiedParameters["Alias"]
$Alias = Get-Mailbox -Identity $user.DistinguishedName
@fluggelgleckheimlen
fluggelgleckheimlen / format_t10pi.sh
Last active August 14, 2023 10:38
Format HDD with T10-PI Type 2
#!/bin/bash
for i in {0..23}
do
sg_format --format --fmtpinfo=3 --pfu=0 /dev/sg$i &
done
@fluggelgleckheimlen
fluggelgleckheimlen / VMRC.reg
Created December 9, 2022 12:09
Fix VMRC link handler registration
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\vmrc]
@="URL:VMware VMRC Protocol"
"URL Protocol"=""
"UseOriginalUrlEncoding"=dword:00000001
[HKEY_CLASSES_ROOT\vmrc\DefaultIcon]
@="\"C:\\Program Files (x86)\\VMware\\VMware Remote Console\\vmrc.exe\",0"
@fluggelgleckheimlen
fluggelgleckheimlen / vCert.sh
Last active November 18, 2023 20:40
Script to manage vCenter SSL certificates from VMware GSS
#!/bin/bash
#------------------------------
# Script to manage vCenter SSL certificates.
#
# Author: Vincent Santa Maria [vsantamaria@vmware.com]
#------------------------------
#------------------------------
# for debugging purposes only, uncomment the following line:
# export PS4='+[${SECONDS}s][${BASH_SOURCE}:${LINENO}]: ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'; set -x;
@fluggelgleckheimlen
fluggelgleckheimlen / Exchnage Server Antimalware Exclusions.ps1
Last active October 13, 2023 11:35
Recommended exclusions for Windows Defender antivirus on Exchange servers
# Recommended exclusions for Windows antivirus programs on Exchange servers
# https://docs.microsoft.com/en-us/exchange/antispam-and-antimalware/windows-antivirus-software?view=exchserver-2019
Import-Module Defender
# Folder exclusions
Add-MpPreference -ExclusionPath '%SystemRoot%\Cluster'
Add-MpPreference -ExclusionPath '%SystemDrive%\DAGFileShareWitnesses\*'
Add-MpPreference -ExclusionPath '%ExchangeInstallPath%ClientAccess\OAB'
Add-MpPreference -ExclusionPath '%ExchangeInstallPath%FIP-FS'
@fluggelgleckheimlen
fluggelgleckheimlen / Exchange Server Antimalware Exclusions.reg
Last active October 4, 2022 14:38
Recommended exclusions for SCEP antivirus on Exchange servers
Windows Registry Editor Version 5.00
; Recommended exclusions for Windows antivirus programs on Exchange servers:
; https://docs.microsoft.com/en-us/exchange/antispam-and-antimalware/windows-antivirus-software?view=exchserver-2019
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Microsoft Antimalware\Exclusions\Extensions]
"config"=dword:00000000
"chk"=dword:00000000
"edb"=dword:00000000
"jfm"=dword:00000000
Turn ALL settings to false in Options > Preferences > Advanced:
bt.enable_pulse
distributed_share.enable
gui.show_notorrents_node
offers.left_rail_offer_enabled
gui.show_plus_upsell
offers.content_offer_autoexec
offers.sponsored_torrent_offer_enabled
offers.featured_content_notifications_enabled
# Создаёт резервную копию конфигурации ESXi, подробности тут: http://kb.vmware.com/kb/2042141
Import-Module VMware.VimAutomation.Core
# Игнорируем самоподписные сертификаты ESXi и VMCA
# Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Scope Session -Confirm:$false
Connect-VIServer vcenter.mydomain.tld
# Создаём папку с бекапом
$ConfigFolder = "C:\Temp\VMware\ConfigBackup\" + (Get-Date -Format "dd.MM.yyyy")
@fluggelgleckheimlen
fluggelgleckheimlen / nvidia.cmd
Last active July 15, 2019 14:15 — forked from CHEF-KOCH/nvidia.cmd
Remove nVidia 'Bloatware' Batch
rd /s /q Display.Optimus
rd /s /q Display.NView
rd /s /q Display.Update
rd /s /q GFExperience
rd /s /q GFExperience.NvStreamSrv
rd /s /q GfExperienceService
rd /s /q LEDVisualizer
rd /s /q Miracast.VirtualAudio
rd /s /q MS.NET
rd /s /q MSVCRT
@fluggelgleckheimlen
fluggelgleckheimlen / ClearAllEventLogs.ps1
Last active December 8, 2021 12:41
Clear All Event Logs with PowerShell
if ($env:ExchangeInstallPath) {
echo "DO NOT run on Exchange Server"
}
else {
wevtutil el | Foreach-Object {wevtutil cl "$_"}
}