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 | |
Find Account Lockout Source | |
.DESCRIPTION | |
Find Account Lockout Source | |
.NOTE | |
TechieShinish | |
.LINK | |
https://techieshinish.com/hyperv-health-report/ | |
#> |
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 | |
Find Account Lockout Source | |
.DESCRIPTION | |
Find Account Lockout Source | |
.NOTE | |
TechieShinish | |
.LINK | |
https://techieshinish.com/find-account-lockout-source/ | |
#> |
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 | |
Sign-off Disconnected Users from Local Machine | |
.DESCRIPTION | |
Sign-off Disconnected Users from Local Machine, Buffer time is set for 3 Hours. Users Disconnected 3 hours back will be Signed out. | |
.EXAMPLE | |
.\Remove-DiconnectedUsers | |
.EXAMPLE | |
.\Remove-DiconnectedUsers -Logfile "c:\Logs\DisconnectedUserLogs" | |
#> |
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
# Title : Installing Windows Feature - IIS (WebServer) using PowerShell | |
# -By Shinish.S | |
$IsInstalled = ((Get-WindowsFeature -Name Web-Server).installed) | |
if ($isinstalled -eq $false){ | |
Install-WindowsFeature Web-Server -IncludeManagementTools -IncludeAllSubFeature -Confirm:$false | |
Write-Output "Installation Complete" | |
} | |
else{ | |
Write-output "IIS Server (WebServer) is already installed" | |
} |
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
#Declarations | |
$testPath = 'C:\Scripts' | |
$csvInputFile = 'C:\Scripts\inputFile.csv' | |
$OutFilePath = 'C:\Scripts\csvOutFileSample.csv' | |
$inputFile = Import-Csv -Path $csvInputFile | |
#Variables | |
$VerbosePreference = 'Continue' | |
#function starts here |
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
#Declarations | |
$testPath = 'd:\Script' | |
$csvInputFile = 'D:\Script\Input.csv' | |
$OutFilePath = 'd:\Script\SID_Removal_Report.csv' | |
$inputFile = Import-Csv -Path $csvInputFile | |
$counter = 0 | |
$Results = @() | |
if (Test-Path $OutFilePath){ | |
Remove-Item $OutFilePath -Force | |
New-item $OutFilePath -ItemType File | out-null |
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
$VerbosePreference = "Continue" | |
$Computers = Get-Content "c:\scripts\Serverlist.txt" | |
foreach ($ComputerName in $Computers){ | |
Invoke-Command -ComputerName $ComputerName -ScriptBlock { | |
if (Test-Path 'C:\windows\CCM'){ | |
Write-Output "$env:ComputerName : Script is Running" | |
get-service ccmexec -ea SilentlyContinue | | |
Stop-Service -Force -Verbose | |
Remove-Item -Path "$($Env:WinDir)\CCM" -Force -Confirm:$false -Verbose | |
Remove-Item -Path "$($Env:WinDir)\CCMSetup" -Force -Confirm:$false -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
#Requires –Version 4 | |
$Params = @{ | |
head = @" | |
<Title>NIC Teaming Report -www.PowerShellHacks.com</Title> | |
<style> | |
body { background-color:#dbdad9; | |
font-family:Verdana; | |
font-size:10pt; } | |
td, th { border:0px solid black; | |
border-collapse:collapse; |
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
$Computers = (Get-ADComputer -Filter *).name | |
$Hashreport = @() | |
$HashObject = @() | |
$Prereport = @() | |
$Lastboottime = (get-date).AddDays(-30) | |
$Dir = 'C:\Scripts' | |
$logs = "C:\scripts\logs\ScriptRebootTracker.txt" | |
$csv = 'C:\scripts\Repo\ReportRebootTracker.csv' | |
$Exppath = 'C:\Scripts\Repo' | |
$Logpath = 'C:\Scripts\Logs' |
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
$Computers = (Get-ADComputer -Filter *).name | |
$Hashreport = @() | |
$HashObject = @() | |
$Prereport = @() | |
$Lastboottime = (get-date).AddDays(-30) | |
$Dir = 'C:\Scripts' | |
$logs = "C:\scripts\logs\ScriptRebootTracker.txt" | |
$csv = 'C:\scripts\Repo\ReportRebootTracker.csv' | |
$Exppath = 'C:\Scripts\Repo' | |
$Logpath = 'C:\Scripts\Logs' |
NewerOlder