Trying to add a Network Security Group to a Log Analytics Workspace, getting the following error. This used to work in version 5.0.0 but no longer works with 5.0.1.
Set-AzureRmDiagnosticSetting -ResourceId $NsgFrontendSubnet.Id -WorkspaceId $LogAnalyticsWorkspace.ResourceId -Enabled $true -Categories 'NetworkSecurityGroupEvent','NetworkSecurityGroupRuleCounter'
Set-AzureRmDiagnosticSetting : Exception type: ErrorResponseException,
Message: The diagnostic setting 'service' doesn't exist., Code: ResourceNotFound, Status code:NotFound, Reason
phrase: Not Found At PAT0056-NetworkSecurityGroupNew:764 char:764
+
+ CategoryInfo : CloseError: (:) [Set-AzureRmDiagnosticSetting], PSInvalidOperationException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Insights.Diagnostics.SetAzureRmDiagnosticSettingCommand
This seems to be a known bug reported on GitHub: https://github.com/Azure/azure-powershell/issues/6833
Only way to get around it is to revert to AzureRm.Insights 5.0.0
Related
I would like to export depot to iso in PowerCLI. Adding depot, adding packages, changing acceptance level, export to offline bundle have been done. But export to ISO doesn't work.
I did "export-esximageprofile -imageprofile Community -exporttoiso -filepath 'ESXi-6.5-Custom_r8168_al.iso' -nosignaturecheck -Force". But I received error like this:
export-esximageprofile : Error retrieving file for VIB 'VMW_bootbank_shim-vmklinux-9-2-3-0_6.5.0-0.0.4564106': ('vib20/shim-vmklinux-9-2-3-0/VMW_bootbank_shim-vmklinux-9-2-3-0_6.5.0-0.0.4564106.vib', "Unable to open VIB archive in streaming mode: '_SharedFile' object
has no attribute 'writing'").
At line:1 char:1
export-esximageprofile -imageprofile Community -exporttoiso -filepath ...
CategoryInfo : NotSpecified: (:) [Export-EsxImageProfile], FaultException
FullyQualifiedErrorId : System.ServiceModel.FaultException,VMware.ImageBuilder.Commands.ExportProfile
What is wrong? How can I resolve this problem?
Every time I Attempted to create a migration I am presented with the below error in Package Manager Console:
PM> Add-migration Initial
Build started...
Build succeeded.
Add-migration : Exception calling "Start" with "1" argument(s): "The specified executable is not a valid application for this OS platform."
At line:1 char:1
Add-migration Initial
+ CategoryInfo : NotSpecified: (:) [Add-Migration], MethodInvocationException
+ FullyQualifiedErrorId : Win32Exception,Add-Migration
adding -verbose gives me no further info.
Anyone got any idea on some of the common fixes for this?
Thanks
I have this ASP.NET Core project.
and the connection string that points to my SQL database.
"ConnectionStrings": {
"DefaultConnection": "Data Source=localhost;Initial Catalog=RestaurantDatabase;Integrated Security=True;Trusted_Connection=True;MultipleActiveResultSets=true"}
I need to initialize the database, thus run migration script. I've tried with update-database but that did not work.
What is the first step when initializing database from code?
UPDATE:
PM> dotnet ef migrations add InitialCreate
dotnet : No executable found matching command "dotnet-ef"
At line:1 char:1
+ dotnet ef migrations add InitialCreate
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (No executable f...and "dotnet-ef":String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
PM> Install-Package Microsoft.EntityFrameworkCore.Tools
CACHE https://api.nuget.org/v3/registration3-gz-semver2/microsoft.entityframeworkcore.tools/index.json
Restoring packages for E:\xxxx\Restaurant-App\src\Server\Restaurant.Server.Api\Restaurant.Server.Api.csproj...
Install-Package : NU1605: Detected package downgrade: Microsoft.EntityFrameworkCore.Design from 2.0.2 to 2.0.1. Reference the package directly from the project to select a
different version.
Restaurant.Server.Api -> Microsoft.EntityFrameworkCore.Tools 2.0.2 -> Microsoft.EntityFrameworkCore.Design (>= 2.0.2)
Restaurant.Server.Api -> Microsoft.EntityFrameworkCore.Design (>= 2.0.1)
At line:1 char:1
+ Install-Package Microsoft.EntityFrameworkCore.Tools
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
Install-Package : Package restore failed. Rolling back package changes for 'Restaurant.Server.Api'.
At line:1 char:1
+ Install-Package Microsoft.EntityFrameworkCore.Tools
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
PM> Add-Migration myMigration
Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
User profile is available. Using 'C:\xxxx\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
infoinfo: IdentityServer4.Startup[0]
You are using the in-memory version of the persisted grant store. This will store consent decisions, authorization codes, refresh and reference tokens in memory only. If you are using any of those features in production, you want to switch to a different store implementation.
: IdentityServer4.Startup[0]
You are using the in-memory version of the persisted grant store. This will store consent decisions, authorization codes, refresh and reference tokens in memory only. If you are using any of those features in production, you want to switch to a different store implementation.
dbug: IdentityServer4.Startup[0]
Using Bearer as default scheme for authentication
Nuget packages
The script in question is this -> https://github.com/Jurabek/Restaurant-App
NOTE:
the Restaurant.Server.Api.csproj configured by DotNet command line not with Package Manager and also you don't need to create the initial migration.
you need to go to the src\Server\Restaurant.Server.Api>
run that commands with command line dotnet restore
and dotnet ef-database update
You have to first generate Migration by running Add-Migration YourMigrarionName from Package Manager console in Visual Studio and then run Update-Database to run the Migration on DB.
I'm new to the Package Manager Console. I have managed to install the KVM and am trying to create a migration in my ASP.NET 5 app.
When I run "k ef" I get the following exception:
k.cmd : System.ArgumentNullException: Value cannot be null.
At line:1 char:2
+ k <<<< ef
+ CategoryInfo : NotSpecified: (System.Argument...cannot be null.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Parameter name: appEnv
at Microsoft.Data.Entity.Utilities.Check.NotNull[T](T value, String parameterName)
at Microsoft.Data.Entity.Commands.Program..ctor(IServiceProvider serviceProvider, IApplic
ationEnvironment appEnv, ILibraryManager libraryManager)
I'm in the correct folder, and I have run kpm restore. I'm at a loss.
Switching dependency for EntityFramework.Commands from 7.0.0-* to 7.0.0-beta3 made it work.
After connecting to windows azure through powershells I am executing hive query just to show the tables. But I am getting following error.
Invoke-Hive : The remote server returned an error: (403) Forbidden.
At line:1 char:13
+ $response = Invoke-Hive -Query #"
+ ~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Invoke-AzureHDInsightHiveJob], StorageException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Storage.StorageException,Microsoft.WindowsAzure.Management.HDInsi
ght.Cmdlet.PSCmdlets.InvokeHiveCmdlet
Could you please guide me what to do ? I am using windows 7 OS Home premium , service pack 1
I am able to resolve this issue. This issue is related with system clock (laptop clock). I had to re-set my laptop clock as per my current time zone then I re-login through powershell to execute hive query and that went fine.