-
-
Notifications
You must be signed in to change notification settings - Fork 808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
missing cmdlets with powershell 7 #8768
Comments
what modules should be available? |
Once you import the module, all commands that are available to you can be found using: Get-Command -Module dbatools If you have issues running a command or receive an error that says a command is not available that should be you will need to troubleshoot why the module did not import into your session. You can use |
all i see are these: get-command -Module dbatools | select Name |
The module did not import correctly or was prevented from importing completely. |
thank you, i will investigate those last 2 comments |
so werid: PS C:\Program Files\PowerShell\Modules\dbatools\1.1.145> import-module -name dbatools -Verbose
PS C:\Program Files\PowerShell\Modules\dbatools\1.1.145> |
Delete the version and reinstall from the PowerShell Gallery |
I'm able to recreate the issue in ps5.1 when adding -verbose to the import command as mentioned above. Looks like AV maybe be blocking allcommands.ps1 looks like this file may be getting blocked: & C:\Program Files\WindowsPowerShell\Modules\dbatools\1.1.145\allcommands.ps1 |
What AV are you using? We have another issue for one that don't think the AV software is going to fix. |
too many: I can ask them which one blocked it if you want. |
I can already tell you it will be Carbon Black. Going to start tracking this in #8241 and I've pinned this issue so more users can be made aware. |
update: FYI a Carbon Black agent update plus reboot fixed this for 5.1 & pwsh 7 |
what version of CB fixed this for you? @danpousson |
Verified issue does not already exist?
I have searched and found no existing issue
What error did you receive?
most modules are not present:
example:
[no errorinvoke-dbaquery: The term 'invoke-dbaquery' is not recognized as a name of a cmdlet, function, script file, or executable program.](invoke-dbaquery: The term 'invoke-dbaquery' is not recognized as a name of a cmdlet, function, script file, or executable program.)
Steps to Reproduce
When I install dbatools on powershell 7, I only get these modules below:
get-command -Module dbatools | select Name
Attach-DbaDatabase
Detach-DbaDatabase
Get-DbaBuildReference
Get-DbaDbModule
Get-DbaRegisteredServer
Start-SqlMigration
Write-DbaDataTable
Select-DbaObject
Set-DbatoolsConfig
Is there a way to import all supported modules?
it looks like i see them [673 items] in: C:\Program Files\PowerShell\Modules\dbatools\1.1.145\functions
powershell install method: iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI"
dbatools versions tried: 1.1.141 - latest pre-release (i one by one removed and installed different versions)
Please confirm that you are running the most recent version of dbatools
yes: 1.1.145 (current version)
Other details or mentions
No response
What PowerShell host was used when producing this error
PowerShell Core (pwsh.exe)
PowerShell Host Version
Name Value
PSVersion 7.3.2
PSEdition Core
GitCommitId 7.3.2
OS Microsoft Windows 10.0.17763
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
SQL Server Edition and Build number
n/a
.NET Framework Version
.NET 7.0.2
The text was updated successfully, but these errors were encountered: