🕵️♂️
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
#obatined from: https://gallery.technet.microsoft.com/scriptcenter/Convert-SubnetMask-80401493 | |
<# | |
.SYNOPSIS | |
Converts between PrefixLength and subnet mask. | |
.DESCRIPTION | |
This script converts between PrefixLength and subnet mask parameters, these parameters define the size of a subnet for IPv4 addresses. | |
This script assumes valid subnet mask input and does not support scenarios such as non-contiguous subnet masks. | |
.INPUTS | |
None | |
.OUTPUTS |
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 | |
Get-Config function will pull in needed data from config file | |
.DESCRIPTION | |
Get-Config function will pull in needed data from config file. | |
#> | |
function Get-Config { | |
#specify the location of the config file | |
$csv = Import-Clixml -Path "C:\HypQC_Config.xml" | |
#Read the XML config file and load data into variables |
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
Invoke-Command $dedicatedserversession - filepath C:\path\test2.ps1 | |
Invoke-Command $nodes -ScriptBlock ${function:get-thename} |
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
@{Label=”Length”;Expression={'{0:N0}’ –F ($_.Length/1GB)}} | sort Length -Descending | ft -AutoSize |
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
$freeMemory = [math]::round($w32OSInfo.FreePhysicalMemory /1MB, 0) | |
$intSize = [math]::round($intSize / 1GB, 0) |
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 | |
Evaluates if local device is a member of a cluster or a standalone server | |
.DESCRIPTION | |
Evaluates several factors to determine if device is a member of a cluster or acting as a standalone server. The cluster service is evaluated, and if present the cluster nodes will be tested to determine if the local device is a member. If the cluster service is not running the cluster registry location is evaluated to determine if the server's cluster membership status. | |
.EXAMPLE | |
Test-IsACluster | |
Returns boolean if local device is part of a cluster | |
.OUTPUTS |
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
#------------------------------------------------------ | |
#check currently installed roles | |
Get-WindowsFeature | where {$_.installed -eq "True"} | |
#------------------------------------------------------ | |
#------------------------------------------------------ | |
#install the Hyper-V Role | |
Install-WindowsFeature Hyper-V -IncludeManagementTools -Restart -Verbose | |
#------------------------------------------------------ |
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-NetworkStatistics { | |
<# | |
.SYNOPSIS | |
Display current TCP/IP connections for local or remote system | |
.FUNCTIONALITY | |
Computers | |
.DESCRIPTION | |
Display current TCP/IP connections for local or remote system. Includes the process ID (PID) and process name for each connection. |
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-WmiObject -class Win32_Volume -computername localhost | where-object {$_.name -like "\\?\*"} | select-object Label,DriveLetter,DeviceID,SystemVolume,name,Capacity,Freespace | format-list | |
#also | |
mountvol.exe |
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
#ERASE ALL THIS AND PUT XAML BELOW between the @" "@ | |
$inputXML = @" | |
<Window x:Name="Diag_V" x:Class="MainWindow" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:local="clr-namespace:Diag_V" | |
mc:Ignorable="d" | |
Title="Diag-V" Height="350" Width="525"> |
OlderNewer