{"id":1769,"date":"2015-11-25T04:05:52","date_gmt":"2015-11-25T04:05:52","guid":{"rendered":"http:\/\/pariswells.com\/blog\/?p=1769"},"modified":"2015-11-25T04:05:52","modified_gmt":"2015-11-25T04:05:52","slug":"365-useful-commands-for-powershell-administration","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/random\/365-useful-commands-for-powershell-administration","title":{"rendered":"365 Useful Commands for Powershell Administration"},"content":{"rendered":"<div><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-thumbnail wp-image-1770 img-responsive\" src=\"http:\/\/pariswells.com\/blog\/wp-content\/uploads\/2015\/11\/Office-365-New1-150x150.jpg\" alt=\"Office-365-New[1]\" width=\"150\" height=\"150\" \/>Add Permissions<\/strong><\/div><div>\u00a0<\/div><p style=\"font-family: 'Segoe UI', Arial, sans-serif; background-color: #ffffff; border: 0px; margin: 0px 0px 8px; padding: 0px; vertical-align: baseline; font-size: 15px; line-height: 1.7em; color: #333333;\"><tt style=\"font-family: 'Courier New', Courier, monospace !important; background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; line-height: 21px; overflow: auto;\">$LiveCred = Get-Credential<\/tt><\/p><p style=\"font-family: 'Segoe UI', Arial, sans-serif; background-color: #ffffff; border: 0px; margin: 0px 0px 8px; padding: 0px; vertical-align: baseline; font-size: 15px; line-height: 1.7em; color: #333333; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;\"><span style=\"background-color: transparent; font-family: 'Courier New', Courier, monospace; line-height: 21px;\">$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https:\/\/ps.outlook.com\/powershell\/ -Credential $LiveCred -Authentication Basic \u2013AllowRedirection<\/span><\/p><p style=\"font-family: 'Segoe UI', Arial, sans-serif; background-color: #ffffff; border: 0px; margin: 0px 0px 8px; padding: 0px; vertical-align: baseline; font-size: 15px; line-height: 1.7em; color: #333333; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;\"><tt style=\"font-family: 'Courier New', Courier, monospace !important; background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; font-size: 15px; line-height: 21px; overflow: auto; background-position: initial initial; background-repeat: initial initial;\">Import-PSSession $Session<\/tt><\/p><div><tt style=\"font-family: 'Courier New', Courier, monospace !important; background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; font-size: 15px; line-height: 21px; overflow: auto; background-position: initial initial; background-repeat: initial initial;\"><a>\/\/Add<\/a>\u00a0to Outlook<\/tt><\/div><div><tt style=\"font-family: 'Courier New', Courier, monospace !important; background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; font-size: 15px; line-height: 21px; overflow: auto; background-position: initial initial; background-repeat: initial initial;\">UserA to B<\/tt><\/div><div><tt style=\"font-family: 'Courier New', Courier, monospace !important; background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; font-size: 15px; line-height: 21px; overflow: auto; background-position: initial initial; background-repeat: initial initial;\">Add-MailboxPermission -identity UserB@domain.com -user UserA@domain.com -AccessRights FullAccess<\/tt><\/div><div><tt style=\"font-family: 'Courier New', Courier, monospace !important; background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; font-size: 15px; line-height: 21px; overflow: auto; background-position: initial initial; background-repeat: initial initial;\">\u00a0<\/tt><\/div><div><tt style=\"font-family: 'Courier New', Courier, monospace !important; background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; font-size: 15px; line-height: 21px; overflow: auto; background-position: initial initial; background-repeat: initial initial;\"><a>\/\/Don't<\/a>\u00a0add to Outlook<\/tt><\/div><div><tt style=\"font-family: 'Courier New', Courier, monospace !important; background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; font-size: 15px; line-height: 21px; overflow: auto; background-position: initial initial; background-repeat: initial initial;\">Add-MailboxPermission -Identity &lt;Mailbox ID1&gt; -User &lt;Mailbox ID2&gt;-AccessRights FullAccess -AutoMapping:$false<\/tt><\/div><div><tt style=\"font-family: 'Courier New', Courier, monospace !important; background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; font-size: 15px; line-height: 21px; overflow: auto; background-position: initial initial; background-repeat: initial initial;\">\u00a0<\/tt><\/div><div><span style=\"font-family: 'Courier New', Courier, monospace;\"><span style=\"font-size: 15px; line-height: 21px;\"><strong>\/\/Remove-MailboxPermission<\/strong><\/span><\/span><\/div><div>Remove-MailboxPermission<span style=\"font-family: 'Courier New', Courier, monospace; font-size: 15px; line-height: 21px;\">\u00a0-identity ian@jeppesenheaton.co.uk -user geraldine@jeppesenheaton.co.uk -AccessRights FullAccess<\/span><\/div><div><span style=\"font-family: 'Courier New', Courier, monospace; font-size: 15px; line-height: 21px;\">\u00a0<\/span><\/div><div><span style=\"font-family: 'Courier New', Courier, monospace; font-size: 15px; line-height: 21px;\"><strong><a>\/\/Viewmailbox<\/a>\u00a0Permission for Single Users\u00a0<\/strong><\/span><\/div><div>Get-MailboxPermission \u2013Identity \u201csimon\u201d | fl user, accessrights<\/div><div>\u00a0<\/div><div><strong><a>\/\/Export<\/a>\u00a0of All Permissions<\/strong><\/div><div><span style=\"font-family: 'Segoe UI', sans-serif; font-size: 10pt; background-color: #ffffff; text-align: left;\">Get-mailbox | Get-MailboxPermission | select-object FolderName,User,AccessRights,Identity, IsInherited,IsValid | export-csv -Path c:\\teste.csv<\/span><\/div><div><span style=\"font-family: 'Courier New', Courier, monospace; font-size: 15px; line-height: 21px;\">\u00a0<\/span><\/div><div><span style=\"font-family: 'Courier New', Courier, monospace; font-size: 15px; line-height: 21px;\"><strong><a>\/\/Add<\/a>\u00a0Distribution Group<\/strong><\/span><\/div><div>Add-DistributionGroupMember -Identity Support -Member James -BypassSecurityGroupManagerCheck<\/div><div>\u00a0<\/div><div>\u00a0<\/div><div><a>\/\/Password<\/a>\u00a0Never Expire<\/div><div><em style=\"background-color: #ffffff; border: 0px; font-size: 13px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: #333333; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 23px; text-align: left;\">Connect-MSOLService<\/em><\/div><div><span style=\"font-family: Tahoma; font-size: xx-small;\"><span style=\"font-size: 8pt;\">Get-MSOLUser | Set-MSOLUser -PasswordNeverExpires $true<\/span><\/span><\/div><div><span style=\"font-family: Tahoma; font-size: xx-small;\"><span style=\"font-size: 8pt;\">\u00a0<\/span><\/span><\/div><div><span style=\"font-family: Tahoma; font-size: xx-small;\"><span style=\"font-size: 8pt;\"><a>\/\/Remove<\/a>\u00a0Strong Password One User<\/span><\/span><\/div><div><span style=\"color: #43515b; font-family: calibri; font-size: 15px; background-color: white; font-weight: bold;\">Set-MsolUser -UserPrincipalName\u00a0<\/span><a style=\"color: #02aced; outline: none; text-decoration: initial; font-family: calibri; font-size: 15px; background-color: #ffffff;\" href=\"mailto:user1@abc.com\"><span style=\"background-color: white; color: #0066cc; text-decoration: underline; background-position: initial initial; background-repeat: initial initial;\">user1@abc.com<\/span><\/a><span style=\"color: #43515b; font-family: calibri; font-size: 15px; background-color: white; font-weight: bold;\">\u00a0-StrongPasswordRequired $False<\/span><\/div><div><span style=\"color: #43515b; font-family: calibri; font-size: 15px; background-color: white; font-weight: bold;\">\u00a0<\/span><\/div><div><span style=\"color: #43515b; font-family: calibri; font-size: 15px; background-color: white; font-weight: bold;\"><a>\/\/Remove<\/a>\u00a0for all Users<\/span><\/div><div><div><span style=\"font-size: 11px;\">Get-MSOLUser | Set-MSOLUser\u00a0<\/span><span style=\"background-color: #ffffff; color: #43515b; font-family: calibri; font-size: 15px; font-weight: bold;\">-StrongPasswordRequired $False<\/span><\/div><div><span style=\"background-color: #ffffff; color: #43515b; font-family: calibri; font-size: 15px; font-weight: bold;\">\u00a0<\/span><\/div><div><strong style=\"font-size: 13px; border: 0px; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; margin: 0px; outline: 0px; padding: 0px; color: #333333; line-height: 16px; background-color: #ffffff;\"><a href=\"mailto:Johnwang@contoso.com\">Johnwang@contoso.com<\/a>\u00a0-&gt;<\/strong><strong style=\"font-size: 13px; border: 0px; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; margin: 0px; outline: 0px; padding: 0px; color: #333333; line-height: 16px; background-color: #ffffff;\"><a href=\"mailto:Johnwang@contoso.com\">Johnwang<\/a><\/strong><a style=\"font-size: 11px;\" href=\"mailto:TailspinCRM@forwardto.com\">@forwardto.com<\/a><span style=\"font-size: 11px;\">\u00a0<\/span><\/div><div><span style=\"background-color: #ffffff; color: #43515b; font-family: calibri; font-size: 15px; font-weight: bold;\">\u00a0<\/span><\/div><div><span style=\"background-color: #ffffff; color: #43515b; font-family: calibri; font-size: 15px; font-weight: bold;\">\/\/ Forward to contact without Mailbox<\/span><\/div><div><span style=\"font-family: Tahoma; font-size: xx-small;\"><span style=\"font-size: 8pt;\">New-MailContact <strong>John<\/strong> \u2013ExternalEmailAddress<\/span><\/span>\u00a0<strong>Johnwang@forwardto.com<\/strong><\/div><div>$obj = Get-MailContact <strong>John<\/strong><strong><br \/><\/strong><div>$obj.EmailAddresses.Add(&#8220;smtp:<strong>Johnwang@contoso.com<\/strong>&#8220;)<\/div><\/div><div>Get-MailContact <strong>John<\/strong> | Set-MailContact -EmailAddresses $obj.EmailAddresses<\/div><div><strong style=\"border: 0px; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; margin: 0px; outline: 0px; padding: 0px; color: #333333; font-size: 13px; line-height: 16px; background-color: #ffffff;\">\u00a0<\/strong><\/div><div><strong style=\"border: 0px; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; margin: 0px; outline: 0px; padding: 0px; color: #333333; font-size: 13px; line-height: 16px; background-color: #ffffff;\">Send as distribution List<\/strong><\/div><div><span style=\"border: 0px; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; margin: 0px; outline: 0px; padding: 0px; color: #333333; font-size: 13px; line-height: 16px; background-color: #ffffff;\">Create Discribution List and add user to it<\/span><\/div><div><span style=\"border: 0px; margin: 0px; outline: 0px; padding: 0px; background-color: #ffffff;\"><span style=\"color: #333333; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;\"><span style=\"line-height: 16px;\">Set Account to\u00a0Receive\u00a0from outside\u00a0<\/span><\/span><\/span><\/div><\/div><div><span style=\"color: #010101; font-family: Calibri;\"><span style=\"font-size: 11pt;\">Add-RecipientPermission<\/span><\/span> <a href=\"mailto:newsletter@cogmotive.com\"><span style=\"color: #0000ff; font-family: Calibri;\"><span style=\"font-size: 11pt;\"><span style=\"text-decoration: underline;\">newsletter@cogmotive.com<\/span><\/span><\/span><\/a> <span style=\"color: #010101; font-family: Calibri;\"><span style=\"font-size: 11pt;\">-AccessRights SendAs -Trustee<\/span><\/span> <a href=\"mailto:alan@cogmotive.com\"><span style=\"color: #0000ff; font-family: Calibri;\"><span style=\"font-size: 11pt;\"><span style=\"text-decoration: underline;\">alan@cogmotive.com<\/span><\/span><\/span><\/a><\/div>","protected":false},"excerpt":{"rendered":"<p>Add Permissions\u00a0$LiveCred = Get-Credential$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https:\/\/ps.outlook.com\/powershell\/ -Credential $LiveCred -Authentication Basic \u2013AllowRedirectionImport-PSSession $Session\/\/Add\u00a0to OutlookUserA to BAdd-MailboxPermission -identity UserB@domain.com -user UserA@domain.com -AccessRights FullAccess\u00a0\/\/Don&#8217;t\u00a0add to OutlookAdd-MailboxPermission [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[1206,1207,1133,1163,1205,571,1208,576,1164],"class_list":["post-1769","post","type-post","status-publish","format-standard","hentry","category-random","tag-1206","tag-add-permissions","tag-commands","tag-forward","tag-office","tag-office-365","tag-password-expire","tag-powershell","tag-remove"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"description\" content=\"Add Permissions $LiveCred = Get-Credential$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https:\/\/ps.outlook.com\/powershell\/ -Credential $LiveCred -Authentication Basic \u2013AllowRedirectionImport-PSSession $Session\/\/Add to OutlookUserA to BAdd-MailboxPermission -identity UserB@domain.com -user UserA@domain.com -AccessRights FullAccess \/\/Don&#039;t add to OutlookAdd-MailboxPermission -Identity -User -AccessRights FullAccess -AutoMapping:$false \/\/Remove-MailboxPermissionRemove-MailboxPermission -identity ian@jeppesenheaton.co.uk -user geraldine@jeppesenheaton.co.uk -AccessRights FullAccess \/\/Viewmailbox Permission for Single Users Get-MailboxPermission \u2013Identity \u201csimon\u201d | fl user, accessrights \/\/Export of All PermissionsGet-mailbox | Get-MailboxPermission | select-object\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"paris\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/pariswells.com\/blog\/random\/365-useful-commands-for-powershell-administration\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Welcome to Pariswells.com |\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"365 Useful Commands for Powershell Administration | Welcome to Pariswells.com\" \/>\n\t\t<meta property=\"og:description\" content=\"Add Permissions $LiveCred = Get-Credential$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https:\/\/ps.outlook.com\/powershell\/ -Credential $LiveCred -Authentication Basic \u2013AllowRedirectionImport-PSSession $Session\/\/Add to OutlookUserA to BAdd-MailboxPermission -identity UserB@domain.com -user UserA@domain.com -AccessRights FullAccess \/\/Don&#039;t add to OutlookAdd-MailboxPermission -Identity -User -AccessRights FullAccess -AutoMapping:$false \/\/Remove-MailboxPermissionRemove-MailboxPermission -identity ian@jeppesenheaton.co.uk -user geraldine@jeppesenheaton.co.uk -AccessRights FullAccess \/\/Viewmailbox Permission for Single Users Get-MailboxPermission \u2013Identity \u201csimon\u201d | fl user, accessrights \/\/Export of All PermissionsGet-mailbox | Get-MailboxPermission | select-object\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/pariswells.com\/blog\/random\/365-useful-commands-for-powershell-administration\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2015-11-25T04:05:52+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2015-11-25T04:05:52+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"365 Useful Commands for Powershell Administration | Welcome to Pariswells.com\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Add Permissions $LiveCred = Get-Credential$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https:\/\/ps.outlook.com\/powershell\/ -Credential $LiveCred -Authentication Basic \u2013AllowRedirectionImport-PSSession $Session\/\/Add to OutlookUserA to BAdd-MailboxPermission -identity UserB@domain.com -user UserA@domain.com -AccessRights FullAccess \/\/Don&#039;t add to OutlookAdd-MailboxPermission -Identity -User -AccessRights FullAccess -AutoMapping:$false \/\/Remove-MailboxPermissionRemove-MailboxPermission -identity ian@jeppesenheaton.co.uk -user geraldine@jeppesenheaton.co.uk -AccessRights FullAccess \/\/Viewmailbox Permission for Single Users Get-MailboxPermission \u2013Identity \u201csimon\u201d | fl user, accessrights \/\/Export of All PermissionsGet-mailbox | Get-MailboxPermission | select-object\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/random\\\/365-useful-commands-for-powershell-administration#article\",\"name\":\"365 Useful Commands for Powershell Administration | Welcome to Pariswells.com\",\"headline\":\"365 Useful Commands for Powershell Administration\",\"author\":{\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/author\\\/paris#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/11\\\/Office-365-New1.jpg\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/random\\\/365-useful-commands-for-powershell-administration\\\/#articleImage\",\"width\":1888,\"height\":654},\"datePublished\":\"2015-11-25T04:05:52+00:00\",\"dateModified\":\"2015-11-25T04:05:52+00:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/random\\\/365-useful-commands-for-powershell-administration#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/random\\\/365-useful-commands-for-powershell-administration#webpage\"},\"articleSection\":\"Random, 365, add permissions, commands, forward, office, Office 365, password expire, powershell, remove\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/random\\\/365-useful-commands-for-powershell-administration#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/pariswells.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/category\\\/random#listItem\",\"name\":\"Random\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/category\\\/random#listItem\",\"position\":2,\"name\":\"Random\",\"item\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/category\\\/random\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/random\\\/365-useful-commands-for-powershell-administration#listItem\",\"name\":\"365 Useful Commands for Powershell Administration\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/random\\\/365-useful-commands-for-powershell-administration#listItem\",\"position\":3,\"name\":\"365 Useful Commands for Powershell Administration\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/category\\\/random#listItem\",\"name\":\"Random\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/#organization\",\"name\":\"Welcome to Pariswells.com\",\"url\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/author\\\/paris#author\",\"url\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/author\\\/paris\",\"name\":\"paris\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/random\\\/365-useful-commands-for-powershell-administration#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/93b8ee3f592ac401167f870452bd82d43de80152cd3524e2853403658ada9984?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"paris\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/random\\\/365-useful-commands-for-powershell-administration#webpage\",\"url\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/random\\\/365-useful-commands-for-powershell-administration\",\"name\":\"365 Useful Commands for Powershell Administration | Welcome to Pariswells.com\",\"description\":\"Add Permissions $LiveCred = Get-Credential$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https:\\\/\\\/ps.outlook.com\\\/powershell\\\/ -Credential $LiveCred -Authentication Basic \\u2013AllowRedirectionImport-PSSession $Session\\\/\\\/Add to OutlookUserA to BAdd-MailboxPermission -identity UserB@domain.com -user UserA@domain.com -AccessRights FullAccess \\\/\\\/Don't add to OutlookAdd-MailboxPermission -Identity -User -AccessRights FullAccess -AutoMapping:$false \\\/\\\/Remove-MailboxPermissionRemove-MailboxPermission -identity ian@jeppesenheaton.co.uk -user geraldine@jeppesenheaton.co.uk -AccessRights FullAccess \\\/\\\/Viewmailbox Permission for Single Users Get-MailboxPermission \\u2013Identity \\u201csimon\\u201d | fl user, accessrights \\\/\\\/Export of All PermissionsGet-mailbox | Get-MailboxPermission | select-object\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/random\\\/365-useful-commands-for-powershell-administration#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/author\\\/paris#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/author\\\/paris#author\"},\"datePublished\":\"2015-11-25T04:05:52+00:00\",\"dateModified\":\"2015-11-25T04:05:52+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/\",\"name\":\"Welcome to Pariswells.com\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"365 Useful Commands for Powershell Administration | Welcome to Pariswells.com","description":"Add Permissions $LiveCred = Get-Credential$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https:\/\/ps.outlook.com\/powershell\/ -Credential $LiveCred -Authentication Basic \u2013AllowRedirectionImport-PSSession $Session\/\/Add to OutlookUserA to BAdd-MailboxPermission -identity UserB@domain.com -user UserA@domain.com -AccessRights FullAccess \/\/Don't add to OutlookAdd-MailboxPermission -Identity -User -AccessRights FullAccess -AutoMapping:$false \/\/Remove-MailboxPermissionRemove-MailboxPermission -identity ian@jeppesenheaton.co.uk -user geraldine@jeppesenheaton.co.uk -AccessRights FullAccess \/\/Viewmailbox Permission for Single Users Get-MailboxPermission \u2013Identity \u201csimon\u201d | fl user, accessrights \/\/Export of All PermissionsGet-mailbox | Get-MailboxPermission | select-object","canonical_url":"https:\/\/pariswells.com\/blog\/random\/365-useful-commands-for-powershell-administration","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/pariswells.com\/blog\/random\/365-useful-commands-for-powershell-administration#article","name":"365 Useful Commands for Powershell Administration | Welcome to Pariswells.com","headline":"365 Useful Commands for Powershell Administration","author":{"@id":"https:\/\/pariswells.com\/blog\/author\/paris#author"},"publisher":{"@id":"https:\/\/pariswells.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2015\/11\/Office-365-New1.jpg","@id":"https:\/\/pariswells.com\/blog\/random\/365-useful-commands-for-powershell-administration\/#articleImage","width":1888,"height":654},"datePublished":"2015-11-25T04:05:52+00:00","dateModified":"2015-11-25T04:05:52+00:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/pariswells.com\/blog\/random\/365-useful-commands-for-powershell-administration#webpage"},"isPartOf":{"@id":"https:\/\/pariswells.com\/blog\/random\/365-useful-commands-for-powershell-administration#webpage"},"articleSection":"Random, 365, add permissions, commands, forward, office, Office 365, password expire, powershell, remove"},{"@type":"BreadcrumbList","@id":"https:\/\/pariswells.com\/blog\/random\/365-useful-commands-for-powershell-administration#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/pariswells.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/pariswells.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/pariswells.com\/blog\/category\/random#listItem","name":"Random"}},{"@type":"ListItem","@id":"https:\/\/pariswells.com\/blog\/category\/random#listItem","position":2,"name":"Random","item":"https:\/\/pariswells.com\/blog\/category\/random","nextItem":{"@type":"ListItem","@id":"https:\/\/pariswells.com\/blog\/random\/365-useful-commands-for-powershell-administration#listItem","name":"365 Useful Commands for Powershell Administration"},"previousItem":{"@type":"ListItem","@id":"https:\/\/pariswells.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/pariswells.com\/blog\/random\/365-useful-commands-for-powershell-administration#listItem","position":3,"name":"365 Useful Commands for Powershell Administration","previousItem":{"@type":"ListItem","@id":"https:\/\/pariswells.com\/blog\/category\/random#listItem","name":"Random"}}]},{"@type":"Organization","@id":"https:\/\/pariswells.com\/blog\/#organization","name":"Welcome to Pariswells.com","url":"https:\/\/pariswells.com\/blog\/"},{"@type":"Person","@id":"https:\/\/pariswells.com\/blog\/author\/paris#author","url":"https:\/\/pariswells.com\/blog\/author\/paris","name":"paris","image":{"@type":"ImageObject","@id":"https:\/\/pariswells.com\/blog\/random\/365-useful-commands-for-powershell-administration#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/93b8ee3f592ac401167f870452bd82d43de80152cd3524e2853403658ada9984?s=96&d=mm&r=g","width":96,"height":96,"caption":"paris"}},{"@type":"WebPage","@id":"https:\/\/pariswells.com\/blog\/random\/365-useful-commands-for-powershell-administration#webpage","url":"https:\/\/pariswells.com\/blog\/random\/365-useful-commands-for-powershell-administration","name":"365 Useful Commands for Powershell Administration | Welcome to Pariswells.com","description":"Add Permissions $LiveCred = Get-Credential$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https:\/\/ps.outlook.com\/powershell\/ -Credential $LiveCred -Authentication Basic \u2013AllowRedirectionImport-PSSession $Session\/\/Add to OutlookUserA to BAdd-MailboxPermission -identity UserB@domain.com -user UserA@domain.com -AccessRights FullAccess \/\/Don't add to OutlookAdd-MailboxPermission -Identity -User -AccessRights FullAccess -AutoMapping:$false \/\/Remove-MailboxPermissionRemove-MailboxPermission -identity ian@jeppesenheaton.co.uk -user geraldine@jeppesenheaton.co.uk -AccessRights FullAccess \/\/Viewmailbox Permission for Single Users Get-MailboxPermission \u2013Identity \u201csimon\u201d | fl user, accessrights \/\/Export of All PermissionsGet-mailbox | Get-MailboxPermission | select-object","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/pariswells.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/pariswells.com\/blog\/random\/365-useful-commands-for-powershell-administration#breadcrumblist"},"author":{"@id":"https:\/\/pariswells.com\/blog\/author\/paris#author"},"creator":{"@id":"https:\/\/pariswells.com\/blog\/author\/paris#author"},"datePublished":"2015-11-25T04:05:52+00:00","dateModified":"2015-11-25T04:05:52+00:00"},{"@type":"WebSite","@id":"https:\/\/pariswells.com\/blog\/#website","url":"https:\/\/pariswells.com\/blog\/","name":"Welcome to Pariswells.com","inLanguage":"en-US","publisher":{"@id":"https:\/\/pariswells.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Welcome to Pariswells.com |","og:type":"article","og:title":"365 Useful Commands for Powershell Administration | Welcome to Pariswells.com","og:description":"Add Permissions $LiveCred = Get-Credential$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https:\/\/ps.outlook.com\/powershell\/ -Credential $LiveCred -Authentication Basic \u2013AllowRedirectionImport-PSSession $Session\/\/Add to OutlookUserA to BAdd-MailboxPermission -identity UserB@domain.com -user UserA@domain.com -AccessRights FullAccess \/\/Don't add to OutlookAdd-MailboxPermission -Identity -User -AccessRights FullAccess -AutoMapping:$false \/\/Remove-MailboxPermissionRemove-MailboxPermission -identity ian@jeppesenheaton.co.uk -user geraldine@jeppesenheaton.co.uk -AccessRights FullAccess \/\/Viewmailbox Permission for Single Users Get-MailboxPermission \u2013Identity \u201csimon\u201d | fl user, accessrights \/\/Export of All PermissionsGet-mailbox | Get-MailboxPermission | select-object","og:url":"https:\/\/pariswells.com\/blog\/random\/365-useful-commands-for-powershell-administration","article:published_time":"2015-11-25T04:05:52+00:00","article:modified_time":"2015-11-25T04:05:52+00:00","twitter:card":"summary","twitter:title":"365 Useful Commands for Powershell Administration | Welcome to Pariswells.com","twitter:description":"Add Permissions $LiveCred = Get-Credential$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https:\/\/ps.outlook.com\/powershell\/ -Credential $LiveCred -Authentication Basic \u2013AllowRedirectionImport-PSSession $Session\/\/Add to OutlookUserA to BAdd-MailboxPermission -identity UserB@domain.com -user UserA@domain.com -AccessRights FullAccess \/\/Don't add to OutlookAdd-MailboxPermission -Identity -User -AccessRights FullAccess -AutoMapping:$false \/\/Remove-MailboxPermissionRemove-MailboxPermission -identity ian@jeppesenheaton.co.uk -user geraldine@jeppesenheaton.co.uk -AccessRights FullAccess \/\/Viewmailbox Permission for Single Users Get-MailboxPermission \u2013Identity \u201csimon\u201d | fl user, accessrights \/\/Export of All PermissionsGet-mailbox | Get-MailboxPermission | select-object"},"aioseo_meta_data":{"post_id":"1769","title":null,"description":null,"keywords":null,"keyphrases":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2020-12-21 05:35:48","updated":"2022-09-17 09:49:02","primary_term":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/pariswells.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/pariswells.com\/blog\/category\/random\" title=\"Random\">Random<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t365 Useful Commands for Powershell Administration\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/pariswells.com\/blog"},{"label":"Random","link":"https:\/\/pariswells.com\/blog\/category\/random"},{"label":"365 Useful Commands for Powershell Administration","link":"https:\/\/pariswells.com\/blog\/random\/365-useful-commands-for-powershell-administration"}],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/1769","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/comments?post=1769"}],"version-history":[{"count":1,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/1769\/revisions"}],"predecessor-version":[{"id":1771,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/1769\/revisions\/1771"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=1769"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=1769"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=1769"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}