This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Call executable with values for input parameters | |
$socketTest = "C:\Program Files (x86)\check_mk\bin\socketTest.exe" | |
$Params = "tcp ${myNode}:${myPort} $timeout".Split(" ") | |
$myconn = & $socketTest $Params |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check all installed Windows Capabilities | |
Get-WindowsCapability -Online | where state -eq 'Installed' | |
# Check OpenSSH Windows Capabilities | |
Get-WindowsCapability -Online | where Name -match 'OpenSSH' | |
# Add-WIndowsCapability | |
PS C:\Users\Administrator> Add-WindowsCapability -Name OpenSSH.Server~~~~0.0.1.0 -Online | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo OFF | |
:: --------------------------------------------------------------------- | |
:: Script : fetchMyfiles.bat | |
:: Description : SCP files from a remote machine. | |
:: Requires the OpenSSH client Windows Capability to be installed (Windows Server 2019) | |
:: --------------------------------------------------------------------- | |
:: | |
:: Variables | |
:: | |
set rootdir=D:\myfiles |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Hostname | |
$myhost=$env:COMPUTERNAME | |
# Script Name | |
$myname=[string] ($MyInvocation.MyCommand.Name) | |
# Script Path | |
$mypath=[string] ($MyInvocation.MyCommand.Definition) | |
# Script Directory | |
$scriptdir="$($mypath.substring(0,$mypath.LastIndexOf('\')))\.." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --------------------------------------------------------------------- | |
# SCP files from remote host | |
# --------------------------------------------------------------------- | |
# | |
# Variables | |
# | |
$myHost=$env:COMPUTERNAME | |
$scriptPath=[string] ($MyInvocation.MyCommand.Definition) | |
$rootDir="$($scriptPath.substring(0,$scriptPath.LastIndexOf('\')))" | |
$scpKey="${rootDir}\id_rsa" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Barrier client on Manjaro Linux | |
cybergavin> ip -6 addr | |
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN qlen 1000 | |
inet6 ::1/128 scope host | |
valid_lft forever preferred_lft forever | |
3: wlp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000 | |
inet6 fe80::4be8:842b:6d73:8992/64 scope link noprefixroute | |
valid_lft forever preferred_lft forever | |
cybergavin> telnet fe80::d478:413a:45f4:f96e%wlp4s0 24800 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reduce a CVM's memory from 24GB to 20GB | |
########################################################################### | |
[root@ahv01 ~]# virsh list --all | |
Id Name State | |
---------------------------------------------------- | |
2 NTNX-ahv01-CVM running | |
############################################################################ | |
[root@ahv01 ~]# virsh dominfo NTNX-ahv01-CVM | |
Id: 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Switch Hashing Algorithm on Issuing and Root CAs | |
certutil -setreg ca\csp\CNGHashAlgorithm SHA256 | |
net stop certsvc | |
net start certsvc | |
# Renew Issuing CA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ensure PING is enabled from CVMs/AHVs to all services (DNS/AD/NTP) as NCC uses ping first! | |
ncc health_checks | |
+---------------------------------------------------------------------------------------------------------+ | |
| Type | Name | Impact | Short help | | |
+---------------------------------------------------------------------------------------------------------+ | |
| M | anomaly_checks | N/A | Anomaly checks | | |
| M | cassandra_checks | N/A | Cassandra related checks | | |
| M | cerebro_stats | N/A | Various cerebro stats collectors. | | |
| M | data_protection_checks | N/A | Data Protection related checks | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Get the location of a script irrespective of how it's called (sourced or new shell) or | |
# where it's called from (absolute or relative paths). | |
# | |
########################################################################################## | |
# BASH | |
scriptDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
# PYTHON | |
from pathlib import * |
OlderNewer