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-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 |
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 Test-EnvPathHealth | |
{ | |
<# | |
.Synopsis | |
Test-EnvPathHealth | |
.DESCRIPTION | |
Test-EnvPathHealth tests if the paths defined within the %PATH% environment variable | |
exist. | |
.PARAMETER Writable |
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-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. |
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
# 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 | |
{ |
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
$GPStoreLocation = "\\contoso.com\sysvol\contoso.com\Policies\PolicyDefinitions" | |
Get-item -Path "$GPStoreLocation\*.*" | Sort-Object Name | Select-Object Name | Out-GridView |
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 all the possible events of an event log provider | |
(Get-WinEvent -ListProvider "Microsoft-Windows-SENSE").events | Select-Object ID,Description |
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-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 |
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
Write-host "I was just downloaded" |
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
Write-host "I was just downloaded" | |
Param( | |
$Param1 | |
) | |
write-host "And executed with $Param1" | |
pause |
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 if Hawk is installed | |
If(!(Get-Module "Hawk")) | |
{ | |
Install-Module -Name "Hawk" -scope CurrentUser | |
} | |
Else | |
{ | |
Write-Output "Hawk Module is already installed" | |
} |