- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2015 03:23 PM
I am working on a Exchange integration using Orchestration. we have a custom powershell script
Output is showing as below
WARNING: The names of some imported commands from the module 'Exchange' include
unapproved verbs that might make them less discoverable. To find the commands
with unapproved verbs, run the Import-Module command again with the Verbose
parameter. For a list of approved verbs, type Get-Verb.
Deshpande, Amruta
1. - How do I get rid of the WARNING message
2. How do I parse only last line ignoring warning message
Thank you
Solved! Go to Solution.
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-06-2015 11:12 AM
Hi Varsha,
If you are importing exchange module, then your synyax would be
import-module -moduleName - DisableNameChecking
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2015 07:41 PM
Hi Varsha,
You can suppress the warning method by using below powershell command.
Import-Module -DisableNameChecking
This command will hide the warning message being displayed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-06-2015 09:52 AM
Hello Deepak,
Thank you for the response.
Where exactly I need to include this import statement in powershell script
1. In the beginning of the script ?
or
2. Use it in command we are executing ?
I included in the beginning of script and it is throwing below error
*** Cannot process command because of one or more missing mandatory parameters
If you can share some sample commands , that will be helpful
Thanks
Varsha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-06-2015 10:04 AM
You do it at the start of your script.
For instance, I import the Active Directory module like this:
if (-not(Get-Module -Name 'ActiveDirectory')) {
Import-Module ActiveDirectory
}
That tests if the module is loaded and if not, load it.
You can parse your output like this:
In the Sensor script of your powreshell activity place something like this: workflow.scratchpad.results = activity.output;
Now it's stored in a scratchpad and you can parse it with javascript.
i.e. look for an error:'
if (workflow.scratchpad.results.indexOf("** ERROR: Unable to retrieve user") > 0) {
// error...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-06-2015 11:12 AM
Hi Varsha,
If you are importing exchange module, then your synyax would be
import-module -moduleName - DisableNameChecking