View BV-ZipUtility.ps1
<#
BV-ZipUtility.ps1
http://www.bryanvine.com/2017/03/powershell-script-7zipunzip-powershell.html
Author: Bryan Vine
Last updated: 03/27/2017
Description: This collection of functions can be used as a module or imported in other
modules to replace most of the functionality of 7zip.exe and unzip.exe.
View Music_powershell.cmd
goto ExecutePowershell
cls
#Powershell code block being
#LINK http://www.bryanvine.com/2016/02/powershell-quick-script-wrap-any.html
0..2 | %{
"Loop: $($_+1)"
[System.Console]::Beep(450, 110);[System.Console]::Beep(500, 110);[System.Console]::Beep(550, 110);[System.Console]::Beep(450, 110)
[System.Console]::Beep(675, 200);[System.Console]::Beep(675, 200);[System.Console]::Beep(600, 300);[System.Console]::Beep(450, 110)
[System.Console]::Beep(500, 110);[System.Console]::Beep(550, 110);[System.Console]::Beep(450, 110);[System.Console]::Beep(600, 200)
[System.Console]::Beep(600, 200);[System.Console]::Beep(550, 300);[System.Console]::Beep(525, 110);[System.Console]::Beep(450, 300)
View BV-SetUserPassword.ps1
#Requires -Version 2
Function Set-UserPassword{
<#
.SYNOPSIS
Remotely sets local user password
.DESCRIPTION
Uses the [ADSI] object type to remotely connect to SAM to set user object password.
.PARAMETER ComputerName
View BV_Get_LocalUsers.ps1
#Requires -Version 2
Function Get-LocalUsers{
<#
.SYNOPSIS
Remotely pulls local users and some properties
.DESCRIPTION
Uses the [ADSI] object type to remotely connect to SAM to query user objects for group membership, password expiration,etc
.PARAMETER ComputerName
View Get_ServerHDDinfoPSRemoting.ps1
#Requires -Version 3.0
Function Get-ServerHDDinfo{
<#
.SYNOPSIS
Gets all harddrive size info using Invoke-Command (PS Remoting)
.DESCRIPTION
Returns one object per drive: drive mount, label, total size, used size, used percent, free size.
.PARAMETER ComputerName
View Get_ServerHDDinfoWMI.ps1
#Requires -Version 2.0
Function Get-ServerHDDinfo{
<#
.SYNOPSIS
Gets all harddrive size info using WMI
.DESCRIPTION
Returns one object per drive: drive mount, label, total size, used size, used percent, free size.
WMI is slower than invoke-command so this is a fail back function for when PSRemoting isn't enabled.
View BV-Working_with_Parse.ps1
#Requires -Version 3.0
Function Get-Parse{
<#
.SYNOPSIS
Gets data from Parse.com's core DB.
.DESCRIPTION
Limitation: 10,000 entries per call. If your class is bigger, you'll need to break up your calls by objectIds.
View BV-Compare_Source_Files.ps1
#Requires -Version 2.0
Function Compare-SourceFiles {
<#
.SYNOPSIS
Compares two directories and calculates any differences in files between them using MD5 hash comparison.
.DESCRIPTION
Only looks at full file paths, empty directories aren't scanned.
.PARAMETER Source1
Full path (or UNC network share) to a directory to compare
View BV-Test_Ping-RDP
Function Test-PingRDP {
Param(
[String]$ServerList,
[String]$CSVOutput = ".\ServerStatus.csv"
)
$collection = @()
Get-Content $serverList | ForEach-Object{
$serverStatus = New-Object PSObject
View TestIP_RDP.ps1
Param(
[String] $Servers
)
$srvrs = gc $servers
$collection = @()
foreach ($srv in $srvrs){
$serverStatus = New-Object PSObject
$serverStatus |Add-Member NoteProperty ServerName $srv