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 is a script I've set up in PDQ Deploy. Be sure to run this as administrator. | |
:: Also, not my best work... but it does work. | |
:: Replace servername and hiddenshare$ with your own UNC path info | |
set host=%COMPUTERNAME% | |
copy "\\servername\hiddenshare$\Log4JResults\Log4jScanner.exe" "%userprofile%\AppData\Roaming\Log4jScanner.exe" | |
"%userprofile%\AppData\Roaming\Log4jScanner.exe" > "\\servername\hiddenshare$\Log4JResults\Results\%host%.txt" | |
del "%userprofile%\AppData\Roaming\Log4jScanner.exe" |
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-RDUserSession -ConnectionBroker "server.fqdn.example.com" | Export-Csv -Path c:\temp\connections.csv -NoTypeInformation |
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
#Turn off IMAP and POP for future mailboxes | |
Get-CASMailboxPlan -Filter {ImapEnabled -eq "true" -or PopEnabled -eq "true" } | set-CASMailboxPlan -PopEnabled $false | |
#Turn it off on all existing mailboxes | |
Get-CASMailbox -Filter {ImapEnabled -eq "true" -or PopEnabled -eq "true" } | Select-Object @{n = "Identity"; e = {$_.primarysmtpaddress}} | Set-CASMailbox -ImapEnabled $false -PopEnabled $false |
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
Connect-AzureAD | |
Get-AzureADUser -ObjectId "example.user@contoso.com" |
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 -SearchBase "OU=Users,DC=internal,DC=example,DC=co,DC=uk" -Filter * -Properties nTSecurityDescriptor | ?{ $_.nTSecurityDescriptor.AreAccessRulesProtected -eq "True" } |
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
# View the existing Calendar permissions on the Break Room mailbox | |
Get-MailboxFolderPermission -Identity breakroom@example.co.uk:\Calendar | |
# Add John Smith to the Break Room mailbox's calendar, as Reviewer | |
Add-MailboxFolderPermission -Identity breakroom@example.co.uk:\Calendar -User john.smith@example.co.uk -AccessRights Reviewer | |
# You can change existing access to the Break Room calendar, with the Set commandlet | |
Set-MailboxFolderPermission -Identity breakroom@example.co.uk:\Calendar -User john.smith@example.co.uk -AccessRights Editor | |
# When you are done, use the Remove commandlet |
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
// Functions to change the app icon depending upon light or dark mode | |
function updateIconLightMode() { | |
chrome.browserAction.setIcon({ | |
path : { | |
"32": "assets/appicons/32.png", | |
"24": "assets/appicons/24.png", | |
"16": "assets/appicons/16.png" | |
} | |
}); |
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 'title -ne 0' -Properties givenName,sn,title,mail,sAMAccountName |select-object givenName,sn,title,mail,sAMAccountName | convertto-csv -Delimiter "`t" -NoTypeInformation | Select-Object -Skip 1 | % { $_ -replace '"', ""} | out-file "EmployeeExport.csv" -fo -en ascii |
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
# First, create a new DKIM Signing config for your custom domain | |
New-DkimSigningConfig -DomainName novelica.co.uk -Enabled $true | |
# Next, output the necessary CNAME records you need to create | |
Get-DkimSigningConfig -Identity novelica.co.uk | Format-List Selector1CNAME, Selector2CNAME | |
# Once the CNAME records are in your DNS, enable DKIM signing |
NewerOlder