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
<# | |
.SYNOPSIS | |
Retrieves all logged on users from a local or remote system | |
.DESCRIPTION | |
RRetrieves all logged on users from a local or remote system. | |
This script/function parses the output from the 'qwinsta' command, and formats it into a proper PSObject | |
.INPUTS | |
System.String |
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
<# | |
.SYNOPSIS | |
This function will log off the specified user/session, based on session ID | |
.DESCRIPTION | |
This function will log off the specified user/session, based on session ID. | |
It was written to accept pipeline input from the Get-LoggedOnUser function, but it can also be run as a stand-alone function, if desired. | |
.PARAMETER ComputerName | |
Name of computer/s |
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
function Start-LogLyncAvailability { | |
[CmdletBinding( | |
SupportsShouldProcess = $false, | |
ConfirmImpact = "None", | |
DefaultParameterSetName = "")] | |
param ( | |
[Parameter( | |
Position = 0, | |
ValueFromPipeLine = $false, | |
Mandatory = $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
# No need for the code on the next line, just put the functions in this script; you run into scoping issues dot sourcing these functions, the way they are written | |
#. .\func1.ps1 | |
#region functions | |
function Start-LogLyncAvailability { | |
[CmdletBinding( | |
SupportsShouldProcess = $false, | |
ConfirmImpact = "None", | |
DefaultParameterSetName = "")] |
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
$queryItems = Get-Service | Select ServiceName,Status | |
foreach ($service in $queryItems) { | |
# clear on each iteration | |
$objSvc = @() | |
# create properties and assign values; in this example I am using strong types to define the type of value | |
# the property will return | |
$objSvc = [PSCustomObject] @{ | |
Service = [System.String]$service.ServiceName |
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
<# | |
HTML Server Disk Usage Report Script | |
Kevin Kirkpatrick | |
www.vmotioned.com | |
Created 7/31/2013 | |
This report, as currently written, is meant to create and save the HTML report in a location of your Choosing. | |
If attaching the HTML report is desired, edit the EMail settings attachemtn location variable and go to the | |
bottom of the script and un-comment the attachment options. | |
#> |
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
function Get-VMDetails { | |
<# | |
.SYNOPSIS | |
Returns more detailed statistics and configuration for a single or multiple VMs | |
.DESCRIPTION | |
Returns more detailed statistics and configuration for a single or multiple VMs | |
.PARAMETER Server | |
VI (vCenter) server name |
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 moved to the following repository: https://github.com/vScripter/vSphereNetworkInventory | |
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
function Get-VMHostVtepInterface { | |
<# | |
.SYNOPSIS | |
Gather VTEP interface inventory from all ESXi hosts | |
.DESCRIPTION | |
Gather VTEP interface inventory from all ESXi hosts. | |
This function was written with scale and speed in mind. It pull a host inventory using API calls and then unrolls API properties and | |
assigned them to a PSCustomObject. |
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
$vtepReportPath = "$Home\Desktop\ESXi_VTEP_Report.csv" | |
$vtepFinalReport = @() | |
Get-VMHostNetworkAdapter -VMKernel | Foreach-Object { | |
$vtepInterfaceQuery = $null | |
$vtepInterfaceQuery = $_.ExtensionData | Where-Object {$_.Spec.NetStackInstanceKey -eq 'vxlan'} | |
foreach ($vtep in $vtepInterfaceQuery) { |