ONTAP Discussions
ONTAP Discussions
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>
Solved! See The Solution
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
what about the following variable? default is "SilentlyContinue"
PS C:\temp> $DebugPreference
SilentlyContinue
PS C:\temp>
Thanks for the reply, Christian...
PS C:\PowerShell> $DebugPreference
SilentlyContinue
did that solve your problem? was that the right approach? If not, than I can't help you any further 😞
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.
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
That did it, Matt! Thank you.