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-aduser -Filter * -Properties *) | | |
where {$_.ScriptPath -eq "BenefitsTrans.bat"} | | |
ForEach-Object { | |
Write-Host $_.Name | |
set-aduser $_.samaccountName -ScriptPath "BenefitsAdmin.bat" | |
Write-Host $_.Name $_.ScriptPath | |
} |
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 Global:Get-ObjectTypeInfo{ | |
param($objType) | |
$objTypeAsString=@() | |
if($objType -isnot [type]) { | |
If ($objType -is [string]) {$objTypeAsString=$objType} | |
Else{$objTypeAsString=($objType.GetType()).FullName} | |
} | |
Else{$objTypeAsString=$objType.FullName} |
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 global:Get-CompFolder{ | |
param($iFolderLoc) | |
$objCompFolder = [Ordered]@{ | |
'Location' = $iFolderLoc | |
'Folder' = Get-Item $iFolderLoc | |
'Tree' = Get-ChildItem $iFolderLoc -Recurse | | |
Add-Member -MemberType ScriptProperty -Name 'RelativeName' -Force -PassThru -Value { | |
$this.FullName -replace ('.*' + [regex]::escape($iFolderLoc)) | |
} |
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
<# Export-Icon | |
Extracts the icon from an executible (.EXE) file. | |
By default, this will extract the icon to the same folder and name as | |
the BaseName of the executible, with a ".ICO" extension. | |
Usage: | |
-SourceEXE | |
Mandatory. This must be a valid UNC. (you can pass any file, but | |
it will most likely only work with .EXE files) |
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
<# Open-OneNoteNotebook | |
Pass in the UNC path of a OneNote notebook folder, then this will add it to the | |
list of opened notebooks in OneNote. | |
Ex: | |
Open-OneNoteNotebook '\\consanto\public\KnowledgeBase\' | |
#> | |
If (-Not (Test-Path function:global:Open-OneNoteNotebook)) { |
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
<# Enable-RemotePS | |
Uses PSEXEC to enable WSMan on a remote computer. Also enables remote PS execution, then returns | |
information on that comptuter--whether those features are enabled (WSMan control & remote PS), | |
also returns all compatible versions of .NET installed on that computer and the current PS version. | |
Usage: | |
Enable-RemotePS 'computerName.domain.com' | |
'computer1','computer2','computer3' | Enable-RemotePS | |
#> |
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
<# | |
Verify contents between two tree structures and copy newer or missing files from the source to the destination | |
#> | |
function Global:Copy-Diff{ | |
param($SourcePath,$DestinationPath,[switch]$Informational,[switch]$Force) | |
# Variable setup... | |
# Verify paths & normalize path names |
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-VersionAsInt { | |
param($VersionInfo,[switch]$FileVersion) | |
$digits = 6 | |
If ($FileVersion){$iVersionNumber = $VersionInfo.FileVersion} | |
Else{$iVersionNumber = $VersionInfo.ProductVersion} | |
$rVersionInt = '' |
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
<# | |
This checks for non-current copies of SysAid & uninstalls them. | |
FILES: | |
Uninstall-SysAid.ps1 | |
This file. Must be run with execution policy bypassed: | |
powershell.exe -executionpolicy bypass -file .\Uninstall-SysAid.ps1 | |
SysAidAgentx64.msi | |
This is the "install" file. We're using it with uninstall | |
switches to remove existing copies of SysAid. |
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
# Remove registry entries | |
$null = New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT | |
# Remove registry entries | |
$oldRegKeys = ` | |
'HKLM:\SOFTWARE\Ilient', | |
'HKLM:\SOFTWARE\Wow6432Node\Ilient', | |
'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FC5E1D1D-6D3F-4844-A937-567D589F655E}' |
OlderNewer