ONTAP Discussions

ONTAP PowerShell commands run in debug mode.

DavidTatFMG
3,595 Views

All of my ONTAP PowerShell commands are, by default, running in debug mode. The commands all work, they are just prefaced with debug trace information. I'm running DataONTAP 9.8.0 & NetApp.ONTAP 9.13.1.2306. Sample output follows:

 

connect-nccontroller -Name johnnacm01 -Credential $(Get-Credential)

 

2023-09-01 13:30:57,060 INFO DataONTAP.C.PowerShell.SDK.ConnectNcController - Cmdlet invocation: connect-nccontroller -Name johnnacm01 -Credential $(Get-Credential)
2023-09-01 13:30:57,089 DEBUG NetApp.Ontapi.NaServer - Application name set to PowerShell Toolkit
2023-09-01 13:30:57,090 DEBUG DataONTAP.C.PowerShell.SDK.ConnectNcController - Trying HTTP/HTTPS
2023-09-01 13:30:57,090 DEBUG NetApp.Ontapi.NaServer - NaServer port changed to 443
2023-09-01 13:30:57,091 DEBUG NetApp.Ontapi.NaServer - NaServer Protocol changed to HTTPS
2023-09-01 13:30:57,091 DEBUG NetApp.Ontapi.NaServer - Proxy changed to
2023-09-01 13:30:57,091 DEBUG DataONTAP.C.PowerShell.SDK.ConnectNcController - Connecting to johnnacm01 via HTTPS
2023-09-01 13:30:57,093 DEBUG NetApp.Ontapi.NaServer - <netapp version='1.0' xmlns='http://www.netapp.com/filer/admin'><system-get-version /></netapp>

 

1 ACCEPTED SOLUTION

mbeattie
2,828 Views

Hi David,

 

Have you tried turning off debug logging?

 

Set-NaToolkitConfiguration -LogLevel OFF

PARAMETERS
    -LogLevel <String>
        The log level.  Possible values: DEBUG, ERROR, WARN, OFF.

 

Hope that helps

 

/Matt

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

View solution in original post

6 REPLIES 6

Christian_Ott
3,160 Views

what about the following variable? default is "SilentlyContinue"

 

PS C:\temp> $DebugPreference
SilentlyContinue
PS C:\temp>

DavidTatFMG
3,080 Views

Thanks for the reply, Christian...

 

PS C:\PowerShell> $DebugPreference
SilentlyContinue

Christian_Ott
3,044 Views

did that solve your problem? was that the right approach? If not, than I can't help you any further 😞

DavidTatFMG
2,902 Views

Hi Christian, unfortunately it did not. The odd thing is if I run the same ONTAP cmdlets from Powershell ISE they work fine, it's only when I run them from a Powershell window they run in debug mode.

 

mbeattie
2,829 Views

Hi David,

 

Have you tried turning off debug logging?

 

Set-NaToolkitConfiguration -LogLevel OFF

PARAMETERS
    -LogLevel <String>
        The log level.  Possible values: DEBUG, ERROR, WARN, OFF.

 

Hope that helps

 

/Matt

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

DavidTatFMG
2,812 Views

That did it, Matt! Thank you.

Public