Skip to content

Instantly share code, notes, and snippets.

View fluggelgleckheimlen's full-sized avatar

fluggelgleckheimlen

View GitHub Profile
@fluggelgleckheimlen
fluggelgleckheimlen / redfish.yml
Created October 8, 2024 09:37
Get bios attributes via redfish
- name: Get redfish info
hosts: localhost
gather_facts: no
vars:
baseuri: "10.10.10.10"
username: "<user>"
password: "<password>"
host_ips:
- "10.10.10.11"
- "10.10.10.12"
@fluggelgleckheimlen
fluggelgleckheimlen / vkteams.ps1
Created September 20, 2024 10:09
Проверяет обновления VK Teams, при загрузке должны быть проверки, но мне лень их писать и пока работает без сбоев
$VK = Invoke-WebRequest -Method Head -Uri https://vkteams-www.hb.bizmrg.com/win/x32/vkteamssetup.exe
$lastmod = $VK.Headers.'Last-Modified'
$lastdate = Get-Content -Path .\lastmodified.txt
$chatid = "@mychatid"
if ($lastmod -like $lastdate) {
$oldver = (Get-Item ".\vkteamssetup.exe").VersionInfo.FileVersion
$text = "Нет новых версий после $oldver."
echo $text
#.\Telegram.ps1 -chat_id $chatid -text $text -markdown -nopreview
@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 July 23, 2025 14:31
Script to manage vCenter SSL certificates from VMware GSS
#!/bin/bash
#------------------------------
# Script to manage vCenter SSL certificates.
#
# Author: Vincent Santa Maria [[email protected]]
#------------------------------
#------------------------------
# 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")