NSFW Gear – Corning’s Photonic Circuits

Filed in NSFW Gear

Next-gen smartphones could have sensors built into display glass (GizMag)

Corning, the company behind Gorilla Glass, radiation shielding glass, and hyperspectral imaging, has been working with Polytechnique Montreal to etch photonic circuits directly into the surface of Gorilla Glass. These circuits can then be used as sensors to detect light and temperature changes. Eventually, the technology could be used to take a temperature, read fingerprints, or conceivably even take pictures, although that kind of application is probably a long way off yet.

The future is very cool and very creepy. Who needs security cameras when we can watch you through any glass surface?

See Gizmag and Optics Express for more info.

 
Click to view/hide

Remove permission from every folder in a mailbox with one command

Filed in Microsoft Exchange 2010, PowerShellTags: , ,

 

Here’s the third promised script for managing shared mailbox folder permissions. This one gets a list of all folders in a mailbox (SharedMailbox) and then removes all permissions for the specified user (John.Doe).

Remove_Perms SharedMailbox John.Doe

If a deleted account has permissions to a mailbox folder, it will still be listed in the ACL. If you run Get_Perms against that mailbox, you’ll see something like this:

[PS] C:\Windows\system32>Get_Perms.ps1 SharedMailbox
Root Folder Permissions
=======================

User                                       AccessRights
----                                       ------------
John Doe                                   {PublishingEditor}
NT User:S-1-5-21-11111-111111-111111-1111  {PublishingEditor}

 

You can’t call that deleted account by username, alias, or primary SMTP address. Remove_Perms.ps1 will check to see if the username exists or if the username begins with “NT User”. So you can just mark/copy that SID and paste it into the command line with quotes like this:

Remove_Perms SharedMailbox “NT User:S-1-5-21-………-……….-……….-…..”

Removing those outdated ACL entries will keep it clean and easy to read in the future.

# Filename: Remove_Perms.ps1
# Version: 2014.06.03; Jay Carper, http://exchangetips.us
# Purpose: Removes permissions to all folders in a mailbox for the given
# user name.
#
# Example:
# remove_perms SharedMailbox UserName
#
# Requires Exchange Management Shell
## Return an error if a mailbox and username are not entered.
Param(
[string]$Identity = $(throw “No value entered for the shared mailbox identity.”),
[String]$User = $(throw “No value entered for the user identity.”)
)# Run if the mailbox name is valid.
if (Get-Mailbox $Identity -ea SilentlyContinue) {
# Run if the username is valid or if it is formatted like a valid entry
# for a deleted or moved user account.
if ((Get-Mailbox $User -ea SilentlyContinue) -or ($User -like “NT User*”)) {
Write-Host ” “# Remove permissions on the mailbox root.
$Root = $Identity+”:\”
Remove-MailboxFolderPermission $Root -User $User -Confirm:$False# Remove permissions from all other applicable mailbox folders. Skips
# folders that could cause problems.
$MBFolders = (Get-MailboxFolderStatistics $Identity | ?{($_.FolderPath `
-ne “/Top of Information Store”) -and ($_.FolderPath -ne `
“/Recoverable Items”) -and ($_.FolderPath -ne “/Deletions”) -and `
($_.FolderPath -ne “/Purges”) -and ($_.FolderPath -ne “/Versions”)})
ForEach($Path in $MBFolders) {
$Folder = $Identity + “:” + $Path.FolderPath.Replace(“/”,”\”)
Remove-MailboxFolderPermission $Folder -User $User -Confirm:$False
}
Write-Host “Removed permissions for $User on mailbox $Identity.” `
-ForegroundColor Yellow
Write-Host ” ” -ForegroundColor Yellow
Write-Host “You may see errors for folders on which $User did not have permissions.” `
-ForegroundColor Yellow
Write-Host “Those errors are safe to ignore.” `
-ForegroundColor Yellow
}
# Display an error if the username isn’t valid.
else {Write-Host “Username $User not found.” -ForegroundColor Red}
}
# Display an error if the mailbox name isn’t valid.
else {Write-Host “Mailbox $Identity not found.” -ForegroundColor Red}
 
Click to view/hide

Grant permission to every folder in a mailbox with a single command

Filed in Microsoft Exchange 2010, PowerShellTags: , , ,

This is the second of three scripts I mentioned in my previous post. Running this command as shown here from the Exchange Management Shell:

Add_Perms SharedMailbox John.Doe

will get a list of all folders in a mailbox called SharedMailbox and then add Publishing Editor permissions for John.Doe to each of those folders.

The username can be entered as account name, primary SMTP address, alias, or name. Be sure to use quotes if there are any spaces.

 

# Filename: Add_Perms.ps1
# Version: 2014.06.03; Jay Carper, http://exchangetips.us
# Purpose: Adds permissions to all folders in a mailbox for the given
# user name.
#
# Example:
# add_perms SharedMailbox UserName
#
# Requires Exchange Management Shell
## Return an error if no mailbox or user name was entered.
Param(
[string]$Identity = $(throw “No value entered for the shared mailbox identity.”),
[String]$User = $(throw “No value entered for the user identity.”)
)# Run if the mailbox name is valid.
if (Get-Mailbox $Identity -ea SilentlyContinue) {
# Run if the username is valid.
if (Get-Mailbox $User -ea SilentlyContinue) {
Write-Host ” “
Write-Host “Errors are normal on folders where $User already has permissions” `
-ForegroundColor Yellow#Add permissions on the mailbox root.
$Root = $Identity+”:\”
Add-MailboxFolderPermission $Root -User $User -AccessRights PublishingEditor#Add permissions to all other applicable mailbox folders. Skips
#folders that usually cause errors or that don’t matter.
$MBFolders = (Get-MailboxFolderStatistics $Identity | ?{($_.FolderPath `
-ne “/Top of Information Store”) -and ($_.FolderPath -ne `
“/Recoverable Items”) -and ($_.FolderPath -ne “/Deletions”) `
-and ($_.FolderPath -ne “/Purges”) -and ($_.FolderPath -ne “/Versions”)})
ForEach($Path in $MBFolders) {
$Folder = $Identity + “:” + $Path.FolderPath.Replace(“/”,”\”)
Add-MailboxFolderPermission $Folder -User $User -AccessRights `
PublishingEditor
}
Write-Host “Added permissions for $User on mailbox $Identity.” `
-ForegroundColor Yellow
Write-Host ” ” -ForegroundColor Yellow
Write-Host “You may see errors for folders on which $User already had permissions.” `
-ForegroundColor Yellow
Write-Host “Those errors are safe to ignore.” `
-ForegroundColor Yellow
}
# Display an error if the username is not valid.
else {Write-Host “Username $User not found.” -ForegroundColor Red}
}
#Display an error if the mailbox is not valid.
else {Write-Host “Mailbox $Identity not found.” -ForegroundColor Red}

 

 
Click to view/hide
 
Click to view/hide