Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
69e45ce
Combined Functions
OgJAkFy8 Nov 22, 2019
354c891
Update README.md
OgJAkFy8 Nov 25, 2019
14ced5b
Update README.md
OgJAkFy8 Nov 25, 2019
634c920
Update README.md
OgJAkFy8 Nov 25, 2019
8f8a35a
Small changes for testing
Nov 25, 2019
4efd088
Merge branch 'CombineFunctions' of https://github.com/OgJAkFy8/PowerT…
Nov 25, 2019
f3697a4
Update README.md
OgJAkFy8 Nov 25, 2019
1fc1175
Set theme jekyll-theme-time-machine
OgJAkFy8 Nov 25, 2019
413d3fe
Merge pull request #1 from OgJAkFy8/CombineFunctions
OgJAkFy8 Nov 25, 2019
31e2d96
Set theme jekyll-theme-tactile
OgJAkFy8 Nov 25, 2019
dc3cc1c
Update README.md
OgJAkFy8 Nov 26, 2019
7abe149
Update README.md
OgJAkFy8 Nov 26, 2019
b8d4bc3
Merge pull request #2 from OgJAkFy8/TestDocs
OgJAkFy8 Nov 26, 2019
2e34d51
Merge pull request #3 from OgJAkFy8/CombineFunctions
OgJAkFy8 Nov 26, 2019
6745234
Uploaded Images
Nov 26, 2019
86855fb
Update .gitignore
Nov 26, 2019
65ba32b
Merge branch 'CombineFunctions'
Nov 26, 2019
27ffea7
Update PowerTool-Function.ps1
Nov 26, 2019
33d799c
Changes
Dec 6, 2019
159ce6d
Create READ.ME
OgJAkFy8 Feb 16, 2020
ab8c974
Update .gitignore
OgJAkFy8 Feb 16, 2020
1043c5a
Rename READ.ME to README.md
OgJAkFy8 Feb 16, 2020
2cba532
Update README.md
OgJAkFy8 Feb 16, 2020
4ee362b
Merge pull request #5 from OgJAkFy8/CombineFunctions
OgJAkFy8 Feb 17, 2020
54ca1a6
Update README.md
OgJAkFy8 Feb 17, 2020
11212b5
Update PowerTool.ps1
Feb 17, 2020
eccf6e3
Merge pull request #6 from OgJAkFy8/master
OgJAkFy8 Feb 17, 2020
ed889fd
Expanded alias in command
PsCustomObject Feb 29, 2020
50fc5b6
Added missing EOF new line
PsCustomObject Feb 29, 2020
f445423
Added dev commends
PsCustomObject Feb 29, 2020
b6b17c7
Added dev comments
PsCustomObject Feb 29, 2020
840abc5
Merge pull request #7 from OgJAkFy8/CombineFunctions
OgJAkFy8 Mar 5, 2020
8a6c8a6
Small changes for testing
Mar 6, 2020
b71e54b
Merge pull request #8 from OgJAkFy8/CombineFunctions
OgJAkFy8 Mar 13, 2021
31cdbc9
Update Get-InstalledSoftware.ps1
OgJAkFy8 Mar 13, 2021
24a00a6
Merge pull request #9 from OgJAkFy8/CombineFunctions
OgJAkFy8 Mar 13, 2021
01f64f0
Merge branch 'CombineFunctions'
OgJAkFy8 Mar 13, 2021
e51aadb
Merge branch 'master' of https://github.com/OgJAkFy8/PowerTool
OgJAkFy8 Mar 13, 2021
4955015
Update README.md
OgJAkFy8 Mar 13, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

# Created by https://www.gitignore.io/api/powershell

### PowerShell ###
# Exclude packaged modules
*.zip

# Exclude .NET assemblies from source
*.dll

# Exlude Images Folder
Images/*

# Exclude Logs Folder
Logs/*


# End of https://www.gitignore.io/api/powershell
57 changes: 57 additions & 0 deletions Functions/AdminTools.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#requires -Version 2.0
function Start-AdminTool
{

[CmdletBinding()]


param
(
[Parameter(Mandatory = $true,HelpMessage = 'Name of Tool from the AdminTool Splat')]
[Object]$Tool
)

$AdminTool = @{
Explorer = 'explorer.exe', 'File Explorer launched'
Service = 'services.msc', 'Services.msc launched'
Regedit = 'regedit', 'Regedit launched'
PowerShell = 'powershell', 'PowerShell launched'
CMD = 'cmd', 'CMD launched'
DeviceManager = 'devmgmt', 'Device Manager launched'
EventViewer = 'eventvwr', 'Event Viewer launched'
SystemSettings = 'sysdm.cpl', 'Advanced System Settings launched'
RemotePing = "ping.exe -ArgumentList '$hostname -n 300'", "Ping launched for $hostname"
}


Start-Process -FilePath $AdminTool.$Tool[0]
Edit-PTlog -Write -logString $AdminTool.$Tool[1]
}



<#
Broke while editing
Will fix later

function PT-RemoteExplorer
{
Invoke-Item -Path \\$hostname\c$\
,('File Explorer launched for {0}' -f $hostname)
PT-LineSpacer
}
#>


<#
Save for later


function PT-RemoteServices
{
& "$env:windir\system32\services.msc" /computer=$hostname
Write-PTlog -logString "Services.msc launched for $hostname"
PT-LineSpacer
}
#>

68 changes: 68 additions & 0 deletions Functions/Edit-PtLog.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#requires -Version 2.0

function Edit-PTlog
{
[cmdletbinding(DefaultParameterSetName = 'Write')]
Param(
[Parameter(Mandatory = $true,
ParameterSetName = 'Clear')]
[Switch]$Clear,

[Parameter(Mandatory = $true,
ParameterSetName = 'Write')]
[Switch]$Write,

[Parameter(Mandatory = $true,
ParameterSetName = 'Write')]
[Object]$logString,

[Parameter(Mandatory = $true,
ParameterSetName = 'Copy')]
[Switch]$Copy
)

$Script:PtLine = '-' * 109

# Clear PowerTool Log
if($Clear)
{
$txbLogging.clear()
}

if($Write)
{
# Add log to PowerTool log screen

$now = Get-Date -Format g
$txbLogging.Appendtext("$now - $logString`r")
$txbLogging.Appendtext("$PtLine`r`n")
}

#TODO: Use $PsBoundParameters rather than if
if($Copy)
{
function Copy-PTClipboard
{
# Function to copy text to clipboard
# Used with CopyLogs function - DO NOT DELETE

param([Parameter(Mandatory = $true)][string]$text)
Add-Type -AssemblyName System.Windows.Forms
$TextBox = New-Object -TypeName System.Windows.Forms.TextBox
$TextBox.Multiline = $true
$TextBox.Text = $text
$TextBox.SelectAll()
$TextBox.Copy()
}

$text = $txbLogging.Text
#$text = $txb_logs.Text
Copy-PTClipboard -text $text
}

function PT-LineSpacer
{
# Add linespacer to logs - for formatting only
Return
}
}
Loading