Microsoft Virtualization Discussions

How to trigger an AutoSupport from Powershell?

PADMANTECH

Hi All,

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.

Jason

1 ACCEPTED SOLUTION

beam

You may be able to use the Set-NaOption cmdlet:  Set-NaOption autosupport.doit

-Steven

View solution in original post

10 REPLIES 10

cknight

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).

RAVI_PALADUGU

Hi Clinton,

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

Thanks

Ravi

cknight

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.

PADMANTECH

Hi Clinton,

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.

beam

You may be able to use the Set-NaOption cmdlet:  Set-NaOption autosupport.doit

-Steven

View solution in original post

bsti

I get an error when I do that (but it still triggers the ASUP):

cknight

OK, so if you don't want to use Invoke-NaSsh, and Set-NaOption does trigger the ASUP, you can combine Set-NaOption with -ErrorAction SILENTLYCONTINUE.

Karhtik_Abhi

Get-NaOption autosupport.doit "Test"

bsti

I use Invoke-Nassh "options autosupport.doit test".  That works and doesn't generate an error.

PADMANTECH

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.

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public