This file contains 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
## | |
# Powershell script to add whitelisted IPs to VMware vSphere and VMware vCenter firewall rules. | |
# Also adding a rule to fix the web console problem in vSphere Web Client | |
## | |
# Set execution policy | |
# AllSigned : Every script must bear a valid signature | |
# RemoteSigned : Must be signed by a trusted publisher (for example Microsoft) | |
# Unrestricted : No restrictions whatsoever, every script can run | |
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned |
This file contains 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
# Set execution policy | |
# AllSigned : Every script must bear a valid signature | |
# RemoteSigned : Must be signed by a trusted publisher (for example Microsoft) | |
# Unrestricted : No restrictions whatsoever, every script can run | |
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned | |
# Whitelisted IPs which are allowed to use the services on this host | |
$whitelistIPs = "8.8.8.8", "127.0.0.1" | |
# DisplayNames for the firewall rules for Remote Desktop |
This file contains 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
$report = @() | |
$arrUsedDisks = Get-View -ViewType VirtualMachine | % {$_.Layout} | % {$_.Disk} | % {$_.DiskFile} | |
$arrDS = Get-Datastore | Sort-Object -property Name | |
foreach ($strDatastore in $arrDS) { | |
Write-Host $strDatastore.Name | |
$ds = Get-Datastore -Name $strDatastore.Name | % {Get-View $_.Id} | |
$fileQueryFlags = New-Object VMware.Vim.FileQueryFlags | |
$fileQueryFlags.FileSize = $true | |
$fileQueryFlags.FileType = $true | |
$fileQueryFlags.Modification = $true |
This file contains 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
# LIst VMs with Raw Device Mappings (RMDs) in VMWare vSphere 5.x | |
# More info at VMware KB: http://kb.vmware.com/kb/2001823 | |
Get-VM | Get-HardDisk -DiskType "RawPhysical","RawVirtual" | Select Parent,Name,DiskType,ScsiCanonicalName,DeviceName | fl |
This file contains 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 a list with average and peak IOPS from all VMs | |
# Found at: https://www.linkedin.com/grp/post/3992597-5937675088978534402 | |
## | |
Get-VM | Sort | Select @{N="Name"; E={$_.Name}}, @{N="AvgWriteIOPS"; E={[math]::round((Get-Stat $_ -stat "datastore.numberWriteAveraged.average" -RealTime | Select -Expand Value | measure -average).Average, 1)}}, @{N="PeakWriteIOPS"; E={[math]::round((Get-Stat $_ -stat "datastore.numberWriteAveraged.average" -RealTime | Select -Expand Value | measure -max).maximum, 1)}}, @{N="AvgReadIOPS"; E={[math]::round((Get-Stat $_ -stat "datastore.numberReadAveraged.average" -RealTime | Select -Expand Value | measure -average).Average, 1)}}, @{N="PeakReadIOPS"; E={[math]::round((Get-Stat $_ -stat "datastore.numberReadAveraged.average" -RealTime | Select-Expand Value | measure -max).maximum, 1)}} | Format-Table -autosize | Out-File iops.txt |
This file contains 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
# This hosts file is brought to you by Dan Pollock and can be found at | |
# http://someonewhocares.org/hosts/ | |
# You are free to copy and distribute this file for non-commercial uses, | |
# as long the original URL and attribution is included. | |
# | |
# See below for acknowledgements. | |
# Please forward any additions, corrections or comments by email to | |
# [email protected] |
This file contains 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
################################################################################ | |
## SMB Backup Space Credentials | |
################################################################################ | |
$DriveName = "BackupSpace" | |
$UserName = "u123456" | |
$SecretPass = ConvertTo-SecureString "My Super Secret Password" -AsPlainText -Force | |
# Creating Credential Object to use with PSDrive | |
$Creds = New-Object System.Management.Automation.PSCredential($UserName, $SecretPass) | |
# Using PSDrive to create the drive | |
New-PSDrive -Name $DriveName -Credential $Creds -Root "\\backup.space\backup\Veeam" -PSProvider FileSystem |
This file contains 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
# /etc/nsmb.conf - macOS 11.3 - 2021-04-29 | |
#------------------------------------------------------------------------------ | |
# SMB configuration for macOS 11.3 <-> Synology | |
#------------------------------------------------------------------------------ | |
# Additional information: | |
# ----------------------- | |
# https://support.apple.com/de-de/HT211927 | |
# https://support.apple.com/en-us/HT208209 | |
# https://apple.stackexchange.com/questions/309016/smb-share-deadlocks-since-high-sierra | |
# https://photographylife.com/afp-vs-nfs-vs-smb-performance |
This file contains 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
/* Bigger CSS Input Field */ | |
#user-specified-css-input { | |
height: 400px; | |
} | |
#sidebar { | |
width: 180px; | |
} | |
.channel-list-item.active .close-tooltip { |
This file contains 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
#!/bin/bash | |
################################################################################ | |
# DigitalOcean Droplet Firewall Script | |
#=============================================================================== | |
# This Firewall script is supposed to be used with DigitalOcean Droplets. It | |
# uses eth0 as external, and eth1 (if present) as internal network interface. | |
# It automatically detects IP addresses and blocks all traffic but SSH from a | |
# list of safe IP addresses. | |
# Two white lists can be defined, one for internal IPv4 IP addresses and one | |
# for public IPv4 addresses. |
OlderNewer