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 | |
<# | |
Author : Nitish Kumar | |
Gets WSUS Inventory | |
version 1.0 | 18/07/2023 Initial version | |
The script is kept as much modular as possible so that functions can be modified or added without altering the entire script | |
It should be run as administrator and preferably Enterprise Administrator to get complete data. Its advised to run in demonstration environment to be sure first | |
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 | |
MapDriveQueries.ps1 - Perform Active Directory assessment and generate a report. | |
.DESCRIPTION | |
This script find group policy preference queries for mapped drive | |
.NOTES | |
Not a general purpose script but was made for specific purpose, but in case more settings need to be picked from GPO preference then can be used as template | |
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 | |
#Requires -Modules ActiveDirectory, GroupPolicy, DnsServer | |
<# | |
Author : Nitish Kumar | |
Performs Active Directory Forest Assessment | |
version 1.0 | 06/06/2023 Initial version | |
version 1.1 | 15/06/2023 Covered most areas though error proofing and dependency over wsman still remains | |
version 1.2 | 16/06/2023 Number of small fixes included wrong calulations on empty groups | |
version 1.3 | 21/06/2023 PowerShell jobs for AD health checks and Domain Summary details, Also chosing least latency DC |
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 Test-ADHealth { | |
[CmdletBinding()] | |
Param( | |
[Parameter(ValueFromPipeline = $true, mandatory = $true)]$DomainName, | |
[Parameter(ValueFromPipeline = $true, mandatory = $true)][pscredential]$Credential | |
) | |
$Report = @() | |
$dcs = Get-ADDomainController -Filter * -Server $DomainName -Credential $Credential | |
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
$logpath = "c:\temp\logfile.txt" | |
function Write-Log { | |
[CmdletBinding()] | |
Param( | |
[Parameter(ValueFromPipeline = $true, mandatory = $true)]$logtext, | |
[Parameter(ValueFromPipeline = $true, mandatory = $true)]$logpath | |
) | |
$Stamp = (Get-Date).toString("yyyy/MM/dd HH:mm:ss") |
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
Import-module ActiveDirectory | |
if ((Get-Module -ListAvailable -Name DFSN) -AND (Get-Module -ListAvailable -Name DFSR)) { | |
Import-Module DFSN | |
Import-Module DFSR | |
} | |
else { | |
Exit | |
Write-Output "Either of DFSN or DFSR is not available" | |
} |
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 | |
<# | |
Author : Nitish Kumar | |
Performs Remote patching | |
version 1.0 | 25/06/2023 Initial version | |
The script is kept as much modular as possible so that functions can be modified or added without altering the entire script | |
Disclaimer: This script is designed for illustration purposes only and the author do not claim to be responsible for any issues if caused by the script in production usages. Do due dilligence before running in the production environment |
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 | |
#Requires -Modules ActiveDirectory, GroupPolicy, DnsServer | |
<# | |
Author : Nitish Kumar | |
Performs Active Directory Forest Assessment | |
version 1.0 | 06/06/2023 Initial version | |
version 1.1 | 15/06/2023 Covered most areas though error proofing and dependency over wsman still remains | |
version 1.2 | 16/06/2023 Number of small fixes included wrong calulations on empty groups | |
version 1.3 | 21/06/2023 PowerShell jobs for AD health checks and Domain Summary details, Also chosing least latency DC |
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
Add-Type -AssemblyName System.Windows.Forms | |
Add-Type -AssemblyName System.Windows.Forms.DataVisualization | |
function New-SplashFromImage{ | |
[CmdletBinding()] | |
Param( | |
[Parameter(ValueFromPipeline = $true,mandatory=$true)][String]$imageFilePath | |
) | |
Add-Type -AssemblyName System.Windows.Forms |
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
#!/bin/bash | |
# Author : Nitish Kumar | |
# Download and Install Prometheus, Grafana and Node Exporter | |
# version 1.0 | 24/10/2022 Initial version | |
# version 1.1 | 25/10/2022 Removed sudo from inside the script, added remove-services function | |
PROMETHEUS_VERSION=$(curl -s https://raw.githubusercontent.com/prometheus/prometheus/master/VERSION) | |
NODE_VERSION=$(curl -s https://raw.githubusercontent.com/prometheus/node_exporter/master/VERSION) |