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
| If (${env:ProgramFiles(x86)}) { | |
| $uninstallpaths = Get-ChildItem -Path ${env:ProgramFiles(x86)}, $env:ProgramFiles -Recurse -Filter uninstall.exe | Where-Object {$_.fullname -like "*teamv*"} | Select-Object -expandproperty fullname | |
| } | |
| Else {$uninstallpaths = Get-ChildItem -Path $env:ProgramFiles -Recurse -Filter uninstall.exe | Where-Object {$_.fullname -like "*teamv*"} | Select-Object -expandproperty fullname} | |
| If ($uninstallpaths) { | |
| foreach ($uninstallpath in $uninstallpaths) { | |
| Start-Process cmd -ArgumentList "/C `"$uninstallpath`" /S" -Wait | |
| } | |
| } |
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
| $NumDays = 0 | |
| $LogDir = ".\AD-Accounts.csv" | |
| $currentDate = [System.DateTime]::Now | |
| $currentDateUtc = $currentDate.ToUniversalTime() | |
| $lltstamplimit = $currentDateUtc.AddDays(- $NumDays) | |
| $lltIntLimit = $lltstampLimit.ToFileTime() | |
| $adobjroot = [adsi]'' | |
| $objstalesearcher = New-Object System.DirectoryServices.DirectorySearcher($adobjroot) | |
| $objstalesearcher.filter = "(&(objectCategory=person)(objectClass=user)(lastLogonTimeStamp<=" + $lltIntLimit + "))" |
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 Set-ComputerName { | |
| param( [switch]$help, | |
| [string]$CurrentPCName=$(read-host "Please specify the current name of the computer"), | |
| [string]$computerName=$(read-host "Please specify the new name of the computer")) | |
| $usage = "set-ComputerName -CurrentPCname CurrentName -computername AnewName" | |
| if ($help) {Write-Host $usage;break} | |
| $computer = Get-WmiObject Win32_ComputerSystem -CurrentPCname CurrentName -computername $currentPCName | |
| $computer.Rename($computerName) |
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
| FAULTING_IP: | |
| +8d8ee91ba0 | |
| 00000000`00000000 ?? ??? | |
| EXCEPTION_RECORD: ffffffffffffffff -- (.exr 0xffffffffffffffff) | |
| ExceptionAddress: 0000000000000000 | |
| ExceptionCode: 80000007 (Wake debugger) | |
| ExceptionFlags: 00000001 | |
| NumberParameters: 0 |
NewerOlder