This file contains hidden or 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
| /* INSTRUCTIONS: | |
| NOTE: This only works for positions in the active | |
| montage specified in the scripts. If you navigate | |
| to another symbol auto-liquidate will not occur. So | |
| before moving to another symbol be sure to set a | |
| manual stop! | |
| 1. Create Montage Button Hokey as defined below. | |
| Best to create 3 or more - A, B, C with different risk |
This file contains hidden or 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 Start-Workout { | |
| param( | |
| [string]$Path = 'E:\OneDrive - IT Aid\Documents\Health\LetsGo.mp3', | |
| [int]$IntervalSec = 120, | |
| [int]$WarmupSec = 60, | |
| [int]$FfplayVolume = 100 | |
| ) | |
| if (-not (Test-Path $Path)) { throw "MP3 not found: $Path" } |
This file contains hidden or 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 Co-Sign Registry Key Status | |
| Created 01/14/19 By Mike L>#> | |
| #--------------------------------------------------------- | |
| Remove-Item -Path C:\Scripts\CoSign\Registry_Fix_Status.csv -ErrorAction Ignore | |
| Import-Csv .\Computers.csv | ForEach-Object { | |
| $Computer = $_."Computer" | |
| $OnlineStatus = Test-ComputerConnection $Computer | Select -ExpandProperty Online |
This file contains hidden or 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
| <# Import users from Deltek Export into AD groups | |
| Created 11/21/18 By Mike #> | |
| #--------------------------------------------------------- | |
| # Remove Existing Group Members | |
| $GroupName = "CustPMGroup-BayCity","CustPMGroup-Cleveland", ` | |
| "CustPMGroup-Cincinnati","CustPMGroup-Columbus", "CustPMGroup-Detroit", ` | |
| "CustPMGroup-GrandRapids","CustPMGroup-Indianapolis", ` | |
| "CustPMGroup-Kalamazoo","CustPMGroup-Lansing", ` |
This file contains hidden or 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
| <# Compare two text files and find what strings | |
| are in both or just in one or the other | |
| Created 10/18/19 By: Mike #> | |
| $File1 = Get-Content "clientinsccm.txt" | |
| $File2 = Get-Content "clientinportal.txt" | |
| $Lookup = @{ | |
| "=>" = "Present in File2" | |
| "<=" = "Present in File1" |
This file contains hidden or 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
| ## Import AD Group information from the .csv sheet: | |
| Import-Module ActiveDirectory | |
| Import-Csv ".\AD_Group_List.csv" | ForEach-Object { | |
| ## Define all variables from imported csv: | |
| $OldGroupName = $_."OldGroupName" | |
| $NewGroupName = $_."NewGroupName" | |
| $DisplayName = $_."DisplayName" | |
| $Mail = $_."Mail" | |
| $OldProxy = get-adgroup $OldGroupName -pr proxyaddresses | | |
| select -ExpandProperty proxyaddresses | ? {$_ -cmatch '^SMTP'} |
This file contains hidden or 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
| $taskpath = "\" | |
| $savefolder = "\\fileshare" | |
| $TaskServers = Get-Content "C:\Scripts\TaskBackup\TaskServers.txt" | |
| ForEach ($Computer in $TaskServers) { | |
| Get-ScheduledTask -CimSession $Computer -TaskPath $taskpath | | |
| Foreach-Object { $_ | Export-ScheduledTask | | |
| Out-File (Join-Path $savefolder "$Computer-$($_.TaskName).xml") } | |
| } |
This file contains hidden or 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-Credential | Export-CliXml -Path C:\IT\MyCredential.xml | |
| $UserCredential = Import-CliXml -Path C:\IT\MyCredential.xml | |
| $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection | |
| Import-PSSession $Session | |
| Connect-MsolService -Credential $UserCredential |
This file contains hidden or 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
| ##Delete AD Users from "Deleted User" OU | |
| $OU="OU=Deleted_User,OU=AAA_Deleted_Users,DC=aaa-inc,DC=net" | |
| $UsersToDelete = Get-ADUser -SearchBase $OU -Filter * | |
| ForEach($user in $UsersToDelete) { | |
| Remove-ADUser -Identity $user -Confirm:$false -WhatIf} |
This file contains hidden or 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 Users and Attributes | |
| $file = "C:\Scripts\AD_User_Info\AD_Users.csv" | |
| Get-AdUser -Filter * ` | |
| -Properties GivenName, SurName, EmailAddress, MobilePhone, DistinguishedName | Where MobilePhone | | |
| select GivenName, SurName, EmailAddress, MobilePhone, DistinguishedName | Sort-Object GivenName | | |
| export-csv C:\Scripts\AD_User_Info\AD_Users.csv -NoTypeInformation | |
| Send-MailMessage ` | |
| -to "mike@sss","tom@sss" ` | |
| -Subject "AD User List" ` | |
| -body "Attached is a CSV of current AD Users with Mobile #'s & their information." ` |
NewerOlder