A Repository of my random scripts and functions writen over the years, there is a wyde range of tools in this module, used by a SysAdmin and EUC Administrator.
Boxstarter scripts to setup a new windows machine.
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
iex ((New-Object System.Net.WebClient).DownloadString('https://boxstarter.org/bootstrapper.ps1'))
Get-Boxstarter -Force
Click link to run | Description |
---|---|
System Setup | Use PSToolKit to Install a new System. |
Warning
You will need a valid github userid and token to continue.
Run the following to update or install apps using the module: PSPackageMan (PS Gallary)
Invoke-RestMethod https://raw.githubusercontent.com/smitpi/PSToolKit/master/PSToolKit/Control_Scripts/Run-Install-Apps.ps1 | Invoke-Expression
Run the following to update or install PS Modules using the module: PWSHModule (PS Gallary)
Invoke-RestMethod https://raw.githubusercontent.com/smitpi/PSToolKit/master/PSToolKit/Control_Scripts/Run-Install-Modules.ps1 | Invoke-Expression
Install this module.
Invoke-RestMethod https://raw.githubusercontent.com/smitpi/PSToolKit/master/PSToolKit/Control_Scripts/Run-Install-PSToolKit.ps1 | Invoke-Expression
Run this script to install from GitHub GitHub Repo
$CurrentLocation = Get-Item .
$ModuleDestination = (Join-Path (Get-Item (Join-Path (Get-Item $profile).Directory 'Modules')).FullName -ChildPath PSToolKit)
git clone --depth 1 https://github.com/smitpi/PSToolKit $ModuleDestination 2>&1 | Write-Host -ForegroundColor Yellow
Set-Location $ModuleDestination
git filter-branch --prune-empty --subdirectory-filter Output HEAD 2>&1 | Write-Host -ForegroundColor Yellow
Set-Location $CurrentLocation
Or from the created Powershell Script:
Set-ExecutionPolicy Bypass -Scope Process -Force
(New-Object System.Net.WebClient).DownloadFile('https://bit.ly/35sEu2b', "$($env:tmp)\Start-PSToolkitSystemInitialize.ps1")
Import-Module (Get-Item "$($env:tmp)\Start-PSToolkitSystemInitialize.ps1") -Force; Start-PSToolkitSystemInitialize
Then import the module into your session
Import-Module PSToolKit -Verbose -Force
Get-Command -Module PSToolKit
Get-Help about_PSToolKit
Documentation can be found at: Github_Pages
Add-ChocolateyPrivateRepo
-- Add a private repository to Chocolatey.Backup-ElevatedShortcut
-- Exports the RunAss shortcuts, to a zip fileBackup-PowerShellProfile
-- Creates a zip file from the ps profile directoriesCompare-ADMembership
-- Compare two users AD group membershipsConnect-VMWareCluster
-- Connect to a vSphere cluster to perform other commands or scriptsDisable-WebEncoding
-- decode a URLEdit-SSHConfigFile
-- Creates and modifies the ssh config file in their profile.Enable-RemoteHostPSRemoting
-- enable ps remote remotelyEnable-WebEncoding
-- encode a URLExport-ESXTemplate
-- Export all VM Templates from vSphere to local disk.Find-ChocolateyApp
-- Search the online repo for softwareFind-OnlineModule
-- Creates reports based on PSGallery.Find-OnlineScript
-- Creates reports based on PSGallery. Filtered by scriptsGet-CitrixClientVersion
-- Report on the CItrix workspace versions the users are using.Get-CitrixPolicy
-- Export Citrix PoliciesGet-CommandFiltered
-- Finds commands on the system and sort it according to moduleGet-DotNetVersions
-- List all the installed versions of .net.Get-FolderSize
-- Gets folder sizes using COM and with a fallback to robocopy.exe with the logging optionGet-FQDN
-- Get FQDN for a device, and checks if it is onlineGet-FullADUserDetail
-- Extract user details from the domainGet-MyPSGalleryReport
-- Gallery reportGet-MyPSGalleryStat
-- Show stats about my published modules.Get-NestedADGroupMember
-- Extract users from an AD group recursive, 4 levels deep.Get-ProcessPerformance
-- Gets the top 10 processes by CPU %Get-PropertiesToCSV
-- Get member data of an object. Use it to create other PSObjects.Get-PSObject
-- Show all Object Methods and Properties.Get-RDSSessionReport
-- Reports on Connects and Disconnects on a RDS Farm.Get-ServerInventory
-- Connect to remote host and collect server details.Get-SoftwareAudit
-- Connects to a remote hosts and collect installed software detailsGet-SystemInfo
-- Get system details of a remote deviceGet-SystemUptime
-- Calculates the uptime of a systemGet-WinEventLogExtract
-- Extract Event logs of a server list, and create html / excel reportImport-CitrixSiteConfigFile
-- Import the Citrix config file, and created a variable with the detailsImport-XamlConfigFile
-- Import the wpf xaml file and create variables from objectsInstall-AppsFromPSPackageMan
-- Uses the module PSPackageMan to install apps from a GitHub Gist File.Install-BGInfo
-- Install and auto runs bginfo at start up.Install-ChocolateyClient
-- Downloads and installs the Chocolatey client.Install-ChocolateyServer
-- This will download, install and setup a new Chocolatey Repo ServerInstall-LocalPSRepository
-- Short desCreates a repository for offline installations.Install-ModulesFromPWSHModule
-- Uses the module PWSHModulePS to install PS Modules from a GitHub Gist File.Install-MSUpdate
-- Perform windows updateInstall-NFSClient
-- Install NFS Client for windowsInstall-PowerShell7x
-- Install ps7Install-RSAT
-- Install Remote Admin ToolsInstall-VMWareTool
-- Install vmware tools from chocolatetyNew-CitrixSiteConfigFile
-- A config file with Citrix server details and URLs. To be used in scripts.New-ElevatedShortcut
-- Creates a shortcut to a script or exe that runs as admin, without UNCNew-GodModeFolder
-- Creates a God Mode FolderNew-GoogleSearch
-- Start a new browser tab with search string.New-MSEdgeWebApp
-- Creates a new webapp to a URL, and save the shortcut on your system.New-PSGenericList
-- Creates a .net list objectNew-PSModule
-- Creates a new PowerShell module.New-PSProfile
-- Creates new profile files in the documents folderNew-PSReportingScript
-- Script template for scripts to create reportsNew-PSScript
-- Creates a new PowerShell script. With PowerShell Script InfoNew-SuggestedInfraName
-- Generates a list of usernames and server names, that can be used as test / demo data.Publish-ModuleToLocalRepo
-- Checks for required modules and upload all to your local repo.Remove-CIMUserProfile
-- Uses CimInstance to remove a user profileRemove-FaultyProfileList
-- Fixes Profilelist in the registry. To fix user logon with temp profile.Remove-HiddenDevice
-- Removes ghost devices from your systemRemove-UserProfile
-- Connects to a server and renames a user profile folder, and delete the key from Profilelist in the registryReset-FileOwnership
-- Reset the ownership of a directory and add full control to the folder.Reset-Module
-- Removes and force import a module.Reset-PSGallery
-- Reset gallery to default settingsResolve-SID
-- Resolves the SidRestore-ElevatedShortcut
-- Restore the RunAss shortcuts, from a zip fileSearch-Script
-- Search for a string in a directory of ps1 scripts.Set-FolderCustomIcon
-- Will change the icon of a folder to a custom selected iconSet-PSProjectFile
-- Creates and modify needed files for a PS project from existing module files.Set-PSToolKitSystemSetting
-- Set multiple settings on desktop or serverSet-ScheduledRestart
-- Create a scheduled task to reboot a server.Set-SharedPSProfile
-- Redirects PowerShell and WindowsPowerShell profile folder to another path.Set-StaticIP
-- Set static IP on deviceSet-TempFolder
-- Set all the temp environmental variables to c:\tempSet-UserDesktopWallpaper
-- Change the wallpaper for the user.Set-VSCodeExplorerSortOrder
-- Change the sort order in VSCode explorerSet-WindowsAutoLogin
-- Enable autologin on a device.Show-ComputerManagement
-- Opens the Computer Management of the system or remote systemShow-ModulePathList
-- Show installed module list grouped by install path.Show-MyPSGalleryModule
-- Show version numbers ext. about my modules.Show-PSToolKit
-- Show details of the commands in this module.Start-DomainControllerReplication
-- Start replication between Domain Controllers.Start-PowerShellAsAdmin
-- Starts a porwershell session as an administratorStart-PSProfile
-- My PS Profile for all sessions.Start-PSRoboCopy
-- My wrapper for default robocopy switchesStart-PSScriptAnalyzer
-- Run and report ScriptAnalyzer outputStart-PSToolkitSystemInitialize
-- Initialize a blank machine.Test-CitrixCloudConnector
-- Perform basic connection tests to Citrix cloud.Test-CitrixVDAPort
-- Test connection between DDC and VDITest-IsFileOpen
-- Checks if a file is openTest-PSPendingReboot
-- This script tests various registry values to see if the local computer is pending a reboot.Test-PSRemote
-- Test PSb Remote to a device.Test-SystemOnline
-- Does basic checks for connecting to a remote deviceUpdate-ListOfDDC
-- Update list of ListOfDDCs in the registryUpdate-LocalHelp
-- Downloads and saves help files locallyUpdate-MyModulesFromGitHub
-- Updates my modulesUpdate-PSDefaultParameter
-- Updates the $PSDefaultParameterValues variableUpdate-PSModuleInfo
-- Update PowerShell module manifest fileWrite-Ascii
-- Create Ascii ArtWrite-PSMessage
-- Writes the given into to screenWrite-PSReports
-- Creates a excel or html reportWrite-PSToolKitLog
-- Create a log for scripts