Merge pull request #471 from silversword411/develop
script library addition
This commit is contained in:
commit
589ff46ea5
|
@ -483,6 +483,16 @@
|
|||
"category": "TRMM (Win):Network",
|
||||
"default_timeout": "90"
|
||||
},
|
||||
{
|
||||
"guid": "0caa33bc-89ca-47e0-ad4a-04626ae6384d",
|
||||
"filename": "Win_Network_TCP_Reset_Stack.bat",
|
||||
"submittedBy": "https://github.com/silversword411",
|
||||
"name": "Network - Reset tcp using netsh",
|
||||
"description": "resets tcp stack using netsh",
|
||||
"shell": "cmd",
|
||||
"category": "TRMM (Win):Network",
|
||||
"default_timeout": "120"
|
||||
},
|
||||
{
|
||||
"guid": "6ce5682a-49db-4c0b-9417-609cf905ac43",
|
||||
"filename": "Win_Win10_Change_Key_and_Activate.ps1",
|
||||
|
@ -602,6 +612,16 @@
|
|||
"shell": "powershell",
|
||||
"category": "TRMM (Win):Other"
|
||||
},
|
||||
{
|
||||
"guid": "e371f1c6-0dd9-44de-824c-a17e1ca4c4ab",
|
||||
"filename": "Win_Outlook_SentItems_To_Delegated_Folders.ps1",
|
||||
"submittedBy": "https://github.com/dinger1986",
|
||||
"name": "Outlook - Delegated folders set for all profiles",
|
||||
"description": "Uses RunAsUser to setup sent items for the currently logged on user on delegated folders to go into the delegated folders sent for all.",
|
||||
"shell": "powershell",
|
||||
"category": "TRMM (Win):Office",
|
||||
"default_timeout": "90"
|
||||
},
|
||||
{
|
||||
"guid": "17040742-184a-4251-8f7b-4a1b0a1f02d1",
|
||||
"filename": "Win_File_Copy_Misc.ps1",
|
||||
|
@ -622,4 +642,4 @@
|
|||
"category": "TRMM (Win):Misc>Reference",
|
||||
"default_timeout": "1"
|
||||
}
|
||||
]
|
||||
]
|
|
@ -69,7 +69,7 @@ Category or Function - What It Does
|
|||
|
||||
- If they pull data from elsewhere, create comment notes at the top with references for others to audit/validate
|
||||
|
||||
- Good folder locations
|
||||
- Good folder locations to use for standardized things:
|
||||
```
|
||||
c:\ProgramData\TacticalRMM\
|
||||
c:\ProgramData\TacticalRMM\scripts
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
<#
|
||||
.Synopsis
|
||||
Outlook - Delegated folders set for all profiles
|
||||
.DESCRIPTION
|
||||
Uses RunAsUser to setup sent items for the currently logged on user on delegated folders to go into the delegated folders sent for all.
|
||||
Applies to Office 2016 and later, modify reg key for older versions of office.
|
||||
https://docs.microsoft.com/en-us/outlook/troubleshoot/email-management/email-remains-in-the-outbox-when-you-use-the-deleg
|
||||
.NOTES
|
||||
v1.0
|
||||
Submitted by: https://github.com/dinger1986
|
||||
#>
|
||||
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
|
||||
$regpath = HKCU:\Software\Microsoft\Office\16.0\Outlook\Preferences
|
||||
$regname = DelegateSentItemsStyle
|
||||
$regvalue = 1
|
||||
$regproperty = Dword
|
||||
|
||||
|
||||
If (!(test-path '%ProgramData%\Tactical RMM\temp')) {
|
||||
New-Item -ItemType Directory -Force -Path '%ProgramData%\Tactical RMM\temp'
|
||||
}
|
||||
|
||||
If (!(test-path C:\TEMP\curpsxpolicy.txt)) {
|
||||
$curexpolicy = Get-ExecutionPolicy
|
||||
|
||||
(
|
||||
echo $curexpolicy
|
||||
)>"%ProgramData%\Tactical RMM\temp\curpsxpolicy.txt"
|
||||
}
|
||||
|
||||
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
|
||||
|
||||
if (Get-PackageProvider -Name NuGet) {
|
||||
Write-Output "NuGet Already Added"
|
||||
}
|
||||
else {
|
||||
Write-Host "Installing NuGet"
|
||||
Install-PackageProvider -Name NuGet -Force
|
||||
}
|
||||
|
||||
if (Get-Module -ListAvailable -Name RunAsUser) {
|
||||
Write-Output "RunAsUser Already Installed"
|
||||
}
|
||||
else {
|
||||
Write-Output "Installing RunAsUser"
|
||||
Install-Module -Name RunAsUser -Force
|
||||
}
|
||||
|
||||
Invoke-AsCurrentUser -scriptblock {
|
||||
New-ItemProperty -Path "$regpath" -Name "$regname" -Value "$regvalue" -PropertyType "$regproperty"
|
||||
}
|
||||
|
||||
Write-Output "Successfully changed Sent Items for Delegated folders"
|
||||
|
||||
$curpsxpol = Get-Content -Path "%ProgramData%\Tactical RMM\temp\curpsxpolicy.txt";
|
||||
|
||||
Set-ExecutionPolicy -ExecutionPolicy $curpsxpol
|
||||
|
||||
del "%ProgramData%\Tactical RMM\temp\curpsxpolicy.txt"
|
Loading…
Reference in New Issue