Hi,
Thanks for your post.
It seems SharedMailboxPerm.ps1 cannot be found by PowerShell. Try using the full path of the file
Get-Help C:\Folder\SharedMailboxPerm.ps1
or adding the path to $env:PATH.
$env:PATH += C:\Folder
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am trying to implement comment based help in my scripts but randomly some of htem don't work. Here's an excert of one:
<#
.SYNOPSIS
This script will modify permissions ona shared mailbox
.DESCRIPTION
This script will modify the permissions on a Shared Mailbox.
1. It will require a connection to Exchange Online
2. It will require a list of mailboxes to Add or Delete
.PARAMETER SharedMailbox
Mandatory. The Email address of the Shared Mailbox
.PARAMETER Add
The list of mailboxes to grant full access and send as permissions.
In this format - "@dfo-mpo.gc.ca","@dfo-mpo.gc.ca"
.PARAMETER Remove
The list of mailbox to remove full access and send as permissions.
In this format - "@dfo-mpo.gc.ca","@dfo-mpo.gc.ca"
.EXAMPLE
PS C:\> SharedMailboxPer.ps1 -SharedMailbox "******@dfo-mpo.gc.a" -Add "******@dfo-mpo.gc.ca","******@dfo-mpo.gc.ca" -Remove "******@dfo-mpo.gc.ca
#>
[cmdletBinding()]
param (
[Parameter(Mandatory=$True)]
[String]$SharedMailbox,
$Add,
$Remove
)
When I try a get-help SharedMailboxPerm.ps1 i get the following error:
get-help : Get-Help could not find SharedMailboxPerm.ps1 in a help file in this session. To
download updated help topics type: "Update-Help". To get help online, search for the help
topic in the TechNet library at https:/go.microsoft.com/fwlink/?LinkID=107116.
At line:1 char:1
+ get-help SharedMailboxPerm.ps1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [Get-Help], HelpNotFoundException
+ FullyQualifiedErrorId : HelpNotFound,Microsoft.PowerShell.Commands.GetHelpCommand
The script is in the path (autocomplete works from the ISE) and it works for other scripts. I am at a loss for this one.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question. To protect privacy, user profiles for migrated questions are anonymized.
Hi,
Thanks for your post.
It seems SharedMailboxPerm.ps1 cannot be found by PowerShell. Try using the full path of the file
Get-Help C:\Folder\SharedMailboxPerm.ps1
or adding the path to $env:PATH.
$env:PATH += C:\Folder
Thanks, but I figured it out. I had an error in the script so it would parse it correctly. It must have been Second Monday... :)