$Clustername = "The_Cluster"
Set-Alias Start-PowerShell64 "$env:windir\sysnative\WindowsPowerShell\v1.0\powershell.exe"
# Create run string, to be able to parse argument
$runThis = "Start-PowerShell64 {Get-ClusterNode -Cluster " + $Clustername + "}"
$Outdata = Invoke-Expression $runThis
Author Archives: Henrik
Check if string contains numeric value in PowerShell
if($teststring -match "^\d+$")
{
Write-host "It's a number"
}
Get all Active Directory DC’s via Powershell
$allDCs = (Get-ADForest).Domains | %{ Get-ADDomainController -Filter * -Server $_ }
Install AD RSAT tools from Powershell on Windows Server
Add-WindowsFeature -Name "RSAT-AD-PowerShell" –IncludeAllSubFeature
How to find the ports that a linux machine listen on
sudo netstat -tulpn | grep LISTEN

Power BI Azure Data Lake Storage Gen2 with Gateway setup

Add Azure Active Directory user to Azure SQL
First of all, you need to add an Azure Active Administrator to the SQL

In SQL studio to add user/groups:
CREATE USER [Team_xyz] FROM EXTERNAL PROVIDER; EXEC sp_addrolemember db_owner, [Team_xyz];
Windows Bandwidth test tool
NTttcp Utility – https://github.com/microsoft/ntttcp/releases/download/v5.35/NTttcp.exe
Below are my normal settings I use. Default port is 5001.
That can be changed with the -p parameter
Receiver settings: NTttcp.exe -r -m 16,*,10.20.30.40
16 threads run on any core, receiving on IP: 10.20.30.40
Sender settings: NTttcp.exe -s -m 16,*,10.20.30.40 -t 30
16 threads run on any core, sending to IP: 10.20.30.40, for 30 seconds.

Query law for Azure firewall
How to query the Log Analytics workspace for Azure firewall log for network rules.
Remeber to enable diagnostic settings on the firewall first
AzureDiagnostics | where Category == "AzureFirewallNetworkRule" | sort by TimeGenerated desc | where TimeGenerated > ago(30m)
Find uptime for Windows Server
At a command prompt type:
net stats work
This will display statistics for the Workstation service. This service starts with the computer, so the uptime for this should be the same
