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
| # See Remove default Apps from Windows 10 https://thomas.vanhoutte.be/miniblog/delete-windows-10-apps/ | |
| # See Debloat Windows 10 https://github.com/W4RH4WK/Debloat-Windows-10 | |
| # Command line to list all packages: Get-AppxPackage -AllUsers | Select Name, PackageFullName | |
| Get-AppxPackage Microsoft.Windows.ParentalControls | Remove-AppxPackage | |
| Get-AppxPackage Windows.ContactSupport | Remove-AppxPackage | |
| Get-AppxPackage Microsoft.Xbox* | Remove-AppxPackage | |
| Get-AppxPackage microsoft.windowscommunicationsapps | Remove-AppxPackage # Mail and Calendar | |
| #Get-AppxPackage Microsoft.Windows.Photos | Remove-AppxPackage | |
| Get-AppxPackage Microsoft.WindowsCamera | Remove-AppxPackage |
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
| $creds = Get-Credential | |
| $serverListPath = "C:\tmp\PhysicalHosts.txt" | |
| Get-WmiObject win32_diskdrive -Credential $creds -Computer (Get-Content $serverListPath) | | |
| Where-Object MediaType -eq 'Fixed hard disk media' | | |
| Select-Object SystemName, Model, @{Name = 'Size(GB)'; Exp = { $_.Size / 1gb -as [int] } } | | |
| Export-CSV "C:\tmp\disks.csv" |
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
| # Check to see if the process is running | |
| $teamsProcess = Get-Process -Name "Teams" -ErrorAction SilentlyContinue | |
| if ($teamsProcess) { | |
| $response = Read-Host -Prompt "Teams is running. Kill it? (Y/N)" | |
| If ($response.ToLower() -eq "y") { | |
| $teamsProcess | Stop-Process | |
| } | |
| else{ | |
| exit; |
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 New-CWSyncServer { | |
| <# | |
| .DESCRIPTION | |
| Add SmartSync server to CaseWare Working Papers. | |
| .PARAMETER HostName | |
| Host name of SmartSync server. | |
| .PARAMETER Label | |
| Friendly name of SmartSync server as it will appear in CaseWare Working Papers. | |
| .EXAMPLE | |
| New-CWSyncServer site01.company.com |
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
| Remove-Item (Join-Path $env:APPDATA "\Microsoft\Teams\Blob_storage\") -Recurse -Force | |
| Remove-Item (Join-Path $env:APPDATA "\Microsoft\Teams\cache\") -Recurse -Force | |
| Remove-Item (Join-Path $env:APPDATA "\Microsoft\Teams\IndexedDB\") -Recurse -Force | |
| Remove-Item (Join-Path $env:APPDATA "\Microsoft\Teams\databases\") -Recurse -Force | |
| Remove-Item (Join-Path $env:APPDATA "\Microsoft\Teams\GPUCache\") -Recurse -Force | |
| Remove-Item (Join-Path $env:APPDATA "\Microsoft\Teams\Local Storage\") -Recurse -Force | |
| Remove-Item (Join-Path $env:APPDATA "\Microsoft\Teams\tmp\") -Recurse -Force |
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
| $creds = Get-Credential | |
| $DCs = Get-ADDomainController -Filter * | |
| foreach ($DC in $DCs) { | |
| Invoke-Command -Credential $creds -ComputerName $DC.HostName -ScriptBlock { | |
| & W32TM /resync /rediscover | |
| } | |
| } |
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
| $FolderPath = "ENTER PATH" | |
| $ExportPath = "ENTER EXPORT PATH" | |
| $FolderItems = Get-Item -Path $FolderPath -Force | |
| $Report = @() | |
| Foreach ($Folder in $FolderItems) { | |
| $Acl = Get-Acl -Path $Folder.FullName | |
| foreach ($Access in $acl.Access) { | |
| $Properties = |
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 Send-OutlookEmail { | |
| #REQUIRES -version 2.0 | |
| <# | |
| .SYNOPSIS | |
| Sends email using Microsoft Outlook. | |
| For examples type: | |
| Get-Help Send-OutlookEmail -examples | |
| .DESCRIPTION | |
| This Function uses the Outlook.Application COM object to build and |
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
| $serviceName = "NAME OF THE SERVICE" | |
| $p = Tasklist /svc /fi "SERVICES eq $serviceName" /fo csv | ConvertFrom-Csv | |
| Stop-Process -Id $p.PID -Force |
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 the string we want to search for | |
| $string = Read-Host -Prompt "What string do you want to search for?" | |
| Import-Module grouppolicy | |
| # Set the domain to search for GPOs | |
| $DomainName = $env:USERDNSDOMAIN | |
| # Find all GPOs in the current domain | |
| Write-Host "Finding all the GPOs in $DomainName" |