Skip to content

Instantly share code, notes, and snippets.

View alexverboon's full-sized avatar

Alex Verboon alexverboon

View GitHub Profile
@alexverboon
alexverboon / Get-UserProfileSize.ps1
Created September 9, 2019 17:28
Get-UserProfileSize
<#
.Synopsis
Get-UserProfileSize
.DESCRIPTION
Get-UserProfileSize retrieves the profile size information of each locally stored profile. The command retrieves the
size of the profile Document and Desktop folder and the full profile size but excluding the AppData\local folder
.EXAMPLE
Get-UserProfileSize -OutPutLocation C:\Temp -Verbose
@alexverboon
alexverboon / Test-EnvPathHealth.ps1
Created November 2, 2019 12:32
Test-EnvPathHealth
function Test-EnvPathHealth
{
<#
.Synopsis
Test-EnvPathHealth
.DESCRIPTION
Test-EnvPathHealth tests if the paths defined within the %PATH% environment variable
exist.
.PARAMETER Writable
@alexverboon
alexverboon / Get-ADSysVolPolicyFolders.ps1
Created November 19, 2019 21:34
Get-ADSysVolPolicyFolders
function Get-ADSysVolPolicyFolders
{
<#
.Synopsis
Verify-ADSysVolPolicyFolders
.DESCRIPTION
Get-ADSysVolPolicyFolders retrieves all the folders within the SYSVOL\Policies folder and checks
whether it belongs to an existing Group Policy object.
Use this script to identify orphan group policy content folders that can be removed.
@alexverboon
alexverboon / GpoDump.ps1
Created December 4, 2019 19:39
GPODump
# Prepare Folder Structure"
If (-not (Test-Path -Path "C:\TEMP\GPO" -PathType Container ))
{
New-Item -Path "C:\TEMP\GPO" -ItemType "Directory"
New-Item -Path "C:\TEMP\GPO\Backup" -ItemType "Directory"
New-Item -Path "C:\TEMP\GPO\Reports" -ItemType "Directory"
}
Else
{
@alexverboon
alexverboon / GPOCentralStoreContent
Created December 4, 2019 19:43
GPOCentralStoreContent
$GPStoreLocation = "\\contoso.com\sysvol\contoso.com\Policies\PolicyDefinitions"
Get-item -Path "$GPStoreLocation\*.*" | Sort-Object Name | Select-Object Name | Out-GridView
@alexverboon
alexverboon / GetEventlogIDs.ps1
Created December 10, 2019 18:33
Windows Event Log IDs
# Get all the possible events of an event log provider
(Get-WinEvent -ListProvider "Microsoft-Windows-SENSE").events | Select-Object ID,Description
@alexverboon
alexverboon / managenetbios.ps1
Last active December 14, 2019 16:48
NetBIOSConfiguration
Function Get-NetBiosDisabledStatus
{
<#
.Synopsis
Get-NetBiosDisabledStatus
.DESCRIPTION
Get-NetBiosDisabledStatus checks whether NetBIOS over TCP/IP is disabled
on all IP enabled network adapters.
When NETBIOS over TCP/IP is disabled on all IP enabled network adapters
Write-host "I was just downloaded"
Write-host "I was just downloaded"
Param(
$Param1
)
write-host "And executed with $Param1"
pause
# Check if Hawk is installed
If(!(Get-Module "Hawk"))
{
Install-Module -Name "Hawk" -scope CurrentUser
}
Else
{
Write-Output "Hawk Module is already installed"
}