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
| #Downloads Microsoft-Win32-Content-Prep-Tool | |
| #Returns the pathto the exe. | |
| function get-Win32CPT { | |
| remove-Win32CPT | |
| $repo = "microsoft/Microsoft-Win32-Content-Prep-Tool" | |
| $releasesUri = "https://api.github.com/repos/$repo/releases/latest" | |
| $downloadUri = (Invoke-RestMethod -Method GET -Uri $releasesUri).zipball_url | |
| $pathZip = Join-Path -Path $([System.IO.Path]::GetTempPath()) -ChildPath $("Microsoft-Win32-Content-Prep-Tool-" + $(Split-Path -Path $downloadUri -Leaf) + ".zip") | |
| $extractPath = Join-Path -Path $([System.IO.Path]::GetTempPath()) -ChildPath $("Microsoft-Win32-Content-Prep-Tool-" + $(Split-Path -Path $downloadUri -Leaf)) | |
| Invoke-WebRequest -Uri $downloadUri -Out $pathZip |
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
| ##### | |
| # https://docs.microsoft.com/en-us/exchange/troubleshoot/shared-mailboxes/sent-mail-is-not-saved | |
| ##### | |
| Get-Mailbox -Filter {IsShared -eq "True" -and UserPrincipalName -notlike "DiscoverySearchMailbox{*"} | foreach { set-mailbox $_.UserPrincipalName -MessageCopyForSentAsEnabled $True ; set-mailbox $_.UserPrincipalName -MessageCopyForSendOnBehalfEnabled $True } |
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 import-MerakiNetworkToUnifi { | |
| [CmdletBinding(DefaultParameterSetName='SiteName')] | |
| Param( | |
| [Parameter(Mandatory = $true, ParameterSetName = 'SiteName')] | |
| [string]$SiteName, | |
| [Parameter(Mandatory = $true, ParameterSetName = 'UnifiController')] | |
| [string]$UnifiController, | |
| [string]$Domain | |
| ) |
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 EnableRDP { | |
| Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -name "fDenyTSConnections" -value 0 | |
| Enable-NetFirewallRule -DisplayGroup "Remote Desktop" | |
| } |
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
| Connect-MsolService | |
| $people = "<sam1>,<sam2>" | |
| $domain = "<@website.com>" | |
| foreach($person in $people){ | |
| $tmpPass = Set-MsolUserPassword -UserPrincipalName $($person + $domain) | |
| Set-ADAccountPassword -Identity $person -Reset -NewPassword (ConvertTo-SecureString -AsPlainText $tmpPass -Force) | |
| Add-ADGroupMember -Identity "E2" -Members $person | |
| Write-Host $person "---Password---" $tmpPass | |
| } |