Category Archives: Uncategorized
Share Permissions Export
Folder permissions export in Powershell, the export can be opened in Excel and the data can be sorted by column “IsInherited” equal to false.
$OutFile = “C:\temp\permissionsProdDev.csv”
$Header = “Folder Path,IdentityReference,AccessControlType,IsInherited,InheritanceFlags,PropagationFlags”
Del $OutFile
Add-Content -Value $Header -Path $OutFile
$RootPath = “\profile\ProdDev”
$Folders = dir $RootPath -recurse | where {$_.psiscontainer -eq $true}
foreach ($Folder in $Folders){
$ACLs = get-acl $Folder.fullname | ForEach-Object { $_.Access }
Foreach ($ACL in $ACLs){
$OutInfo = $Folder.Fullname + “,” + $ACL.IdentityReference + “,” + $ACL.AccessControlType + “,” + $ACL.IsInherited + “,” + $ACL.InheritanceFlags + “,” + $ACL.PropagationFlags
Add-Content -Value $OutInfo -Path $OutFile
}}
Folder Permissions
Run the below in powershell and change the share name and output file location
$FolderPath = dir -Directory -Path “\\EETDC01\Shared” -Recurse -Force
$Report = @()
Foreach ($Folder in $FolderPath) {
$Acl = Get-Acl -Path $Folder.FullName
foreach ($Access in $acl.Access)
{
$Properties = [ordered]@{‘FolderName’=$Folder.FullName;’AD
Group or
User’=$Access.IdentityReference;’Permissions’=$Access.FileSystemRights;’Inherited’=$Access.IsInherited}
$Report += New-Object -TypeName PSObject -Property $Properties
}
}
$Report | Export-Csv -path “e:\FolderPermissions.csv”
office 365 outlook fix
Boot issues
Automatic Driver finder
Device Doctor is a free Windows application that scans your computer hardware and checks to see if there are new driver updates available for your devices. It also locates drivers for “unidentified devices” in the Windows Device Manager
sophos tamper protection disable
- Boot the system into Safe Mode. This means you have to restart your device and as soon as you see the start screen, for example the windows logo, press the key F8.
- Click Start > Run and type regedit and then click OK.
- Go to the following location in the registry editor: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Sophos MCS Agent and set the REG_DWORD Start to 0x00000004
- Go to the following location in the registry editor: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Sophos Endpoint Defense\TamperProtection\Config and set the following REG_DWORD values SAVEnabled and SEDEnabled to 0
- Go to the following location in the registry editor: HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Sophos\SAVService\TamperProtection and set the REG_DWORD Enabled to 0
- Reboot the system in normal boot.
Enhanced Tamper Protection is now disabled and you should be able to access the system.
Exchange Powershell edit calendar permissions
Add-MailboxFolderPermission -Identity erossbryant@mckenzie-group.com.au:\calendar -User njones@mckenzie-group.com.au -AccessRights Owner
set-MailboxFolderPermission -Identity erossbryant@mckenzie-group.com.au:\calendar -User njones@mckenzie-group.com.au -AccessRights Owner
Get-MailboxFolderPermission -Identity erossbryant@mckenzie-group.com.au:\calendar |fl
login office365 powershell
to set execution
Set-ExecutionPolicy unrestricted
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
Import-PSSession $Session
Import-module Msonline
Connect-MsolService -Credential $Livecred
Reset Office 365 passwords bulk
From powershell after connecting
Import-Csv c:\windows\system32\password.csv|%{Set-MsolUserPassword -userPrincipalName $_.UserPrincipalName -NewPassword Welcome123$ -ForceChangePassword $false}