RandyInMarin

Results 18 comments of RandyInMarin

Hi Chrissy. I tested it in PowerShell and it works there. I checked the SqlServer and DBATools module versions available. ``` Get-Module -ListAvailable SqlServer, DBATools ``` The results were different....

Okay, I see neither DBATools or SqlServer loaded on the new terminal. ``` ModuleType Version PreRelease Name ExportedCommands ---------- ------- ---------- ---- ---------------- Manifest 7.0.0.0 Microsoft.PowerShell.Management {Add-Content, Clear-Content, Clear-Item,… Manifest...

@potatoqualitee I updated my allcommands.ps1 with the SqlServer.XEvent\Read-SqlXEvent change. It still failed. However, once I imported the dll, it started to work. As a test, I ran the following in...

@potatoqualitee @wsmelton Hi, modules might not be loaded automatically, but I do see assemblies loaded. I think the culprit is intellisense. Perhaps it would be better to automatically load modules...

I put "import-dbatools" into my $profile. It seems to work. I think it's still a race between PowerShell and Intellisence. I suppose I could close all my files before closing...

@potatoqualitee I'm a DBA, not a .net developer, so I do not understand fully the ramifications of private vs shared assemblies. It does seem that the concept of private does...

I suppose Set-StrictMode -off would work as well. In that case, set oldversions if any version is installed? if ($installedVersion.Count -gt 0) { $olderVersions = @($installedVersion | Where-Object { [version]$_.Version...

This is the same in 7.1.3. I worked around this by including the following at the start of the script block. ``` -Parallel { $DebugPreference = $using:DebugPreference # bug work...

@jaslawinMs Whatif being set to false is scary. Let's see what files would be deleted using WhatIf. Hum, that's a lot of large audit files. I guess I better buy...

Simple demo ``` $DebugPreference = 'Stop' $VerbosePreference = 'Stop' $ProgressPreference = 'Stop' $InformationPreference = 'Stop' $WarningPreference = 'Stop' $ErrorActionPreference = 'Stop' $WhatIfPreference = $true $DebugPreference $VerbosePreference $ProgressPreference $InformationPreference $WarningPreference $ErrorActionPreference...