2013-05-05 06:22 PM
I know this sounds simple but i am unsure how to trigger an AutoSupport from Powershell? I know i can do this by using SSH to the filer and using the cmd "options autosupport.doit" but find i can do everything else in PowerShell.
Any help is much appreciated.
Solved! SEE THE SOLUTION
2013-05-05 06:31 PM
Try Invoke-NaEmsAutosupportLog. Just be sure to leave -GenerateAutosupport set to false, lest you trigger an immediate ASUP phone home action (unless that's what you want).
2013-05-05 06:47 PM
Thanks for the feedback Clinton. I am trying to generate and immediate ASUP as i logged a technical support case. I tried doing a "get-help Invoke-NaEmsAutosupportLog" but the description is a little confusing to me and when i try to execute it requires a computer host name. Are you able to supply me with a command to just replicate a "options autosupport.doit" from the filer?
Thanks for your help.
2013-05-05 07:02 PM
I have the same question, its little confusing when I see the example below. Looks like it do not generate autosupport from the help description, can you please clarify this confusion?
This cmdlet is used by applications to log specific events occurring on a host system.
-------------- Example 1 --------------
C:\PS>Invoke-NaEmsAutosupportLog -ComputerName "host1" -EventId 100 -EventSource "powershell" -AppVersion "2.0"
-Category "test" -EventDescription "this is a test message." -LogLevel 6
2013-05-06 10:34 AM
Use the -GenerateAutosupport switch if you really want the filer to phone home now. But please do that very sparingly, as there is overhead on both ends when that happens.
2013-05-08 05:51 AM
Thanks for helping me understand. Please let me know if I got it.
From what you are saying, there is no way of directly replicating the Data ONTAP cmd "options autosupport.doit" to only send ASUP info from the filer yet. I could however write out the whole powershell cmd as listed below with the "-GenerateAutosupport" flag which will also send log data from the Windows Host "host1" and then send an ASUP with it?
C:\PS>Invoke-NaEmsAutosupportLog -ComputerName "host1" -EventId 100 -EventSource "powershell" -AppVersion "2.0" -Category "test" -EventDescription "this is a test message." -LogLevel 6 -GenerateAutosupport
I tried to run the cmd "Invoke-NaEmsAutosupportLog -GenerateAutosupport" directly but it then asked me to input all the info such as ComputerName:, EventId:, EventSource:, AppVersion:, Category:, EventDescription: and LogLevel: before the cmd would execute.