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
<# | |
.Synopsis | |
Connect to ESX Hosts and Get Mgt IP and Test Connectivity if requested | |
.DESCRIPTION | |
.EXAMPLE | |
Get-VMHostManagementNetwork -VIServer 'vc.domain1.local' -VMHost 'ESX01.domain1.local' | |
.EXAMPLE | |
Get-VMHostManagementNetwork -VIServer 'vc2.domain1.local' | |
#> |
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
# Query VMWare for the List of All servers and compare with Veeam backups to see coverage | |
$Date = ((Get-Date -Format "yyyy-MM-dd_HHmm_K").Replace(":","-").Replace("+","-")).ToString() # _$($Date).csv" _$($Date).txt" # Date for use in Filenames with TZ | |
function Connect-VMWare{ | |
$Server = 'vcenter' | |
$VMCli = (Get-Module VMware.PowerCLI -ListAvailable).Name | |
if($VMCli -ne 'VMware.PowerCLI'){ |
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
<# | |
.Synopsis | |
Gets information of a port number | |
.DESCRIPTION | |
Function provides detailed information of port numbers, like - the service which use the port, Transport protocol and a small decsription. | |
.EXAMPLE | |
PS > Get-Port -Port 20,21,53 | |
Port Service Protocol Description | |
---- ------- -------- ----------- |
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
function Remove-PhishingEmail | |
{ | |
# "A maximum of 10 items per mailbox can be removed at one time" | |
# REF: https://docs.microsoft.com/en-us/microsoft-365/compliance/search-for-and-delete-messages-in-your-organization?view=o365-worldwide | |
#"Hard-deleted messages are marked for permanent removal from the mailbox and will be permanently removed the next time the mailbox is processed by the Managed Folder Assistant" REF: https://docs.microsoft.com/en-us/microsoft-365/compliance/search-for-and-delete-messages-in-your-organization?view=o365-worldwide | |
#"The goal is to process mailboxes at least once weekly. Experience is that MFA usually performs better than this and that you can expect to have mailboxes processed twice a week" REF: https://office365itpros.com/2018/12/10/reporting-the-managed-folder-assistant/ | |
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
#requires -Version 3.0 -Modules UpdateServices | |
<# | |
.SYNOPSIS | |
Accept License Agreements | |
.DESCRIPTION | |
Accept License Agreements for all Windows Server Update Services (WSUS) Updates | |
.PARAMETER Name |
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
function Get-ShutdownUser | |
{ | |
[CmdletBinding()] | |
Param | |
( | |
[Parameter(Mandatory=$false,ValueFromPipelineByPropertyName=$true)] | |
[bool]$ShowInfo = $false, | |
[Parameter(Mandatory=$false,ValueFromPipelineByPropertyName=$true)] | |
[string]$Computer |
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
function Get-UpTime | |
{ | |
(Get-CimInstance -ClassName Win32_OperatingSystem | Select LastBootUpTime).LastBootUpTime | |
} |
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
function Get-SQLServers | |
{ | |
function Connect-VMWare{ | |
#Requires -Modules 'VMware.PowerCLI' | |
$Server = 'vcenter.domain.local' | |
$VMCli = (Get-Module VMware.PowerCLI -ListAvailable).Name |
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
function Get-SQLInstancesPort | |
{ | |
param ([string]$Server) | |
# REF: https://docs.microsoft.com/en-us/answers/questions/486485/get-a-list-of-instances-and-and-port-numbers-runni.html | |
# $Server = 'SQL1' # TESTING | |
[system.reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo")|Out-Null |
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
function Get-WinRMServerFailures | |
{ | |
# Ping a Server and if it responds test WINRM | |
$Log = 'C:\SCRIPTS\WinRM\Servers_WinRMFailed.log' | |
Remove-Item $Log | |
$Servers = (Get-ADComputer -Filter * -Properties Name,OperatingSystem,Enabled | Where {($_.Enabled -eq $true) ` | |
-and ($_.OperatingSystem -like "Windows Server*")} | Sort Name).Name | |