powershell

How to remove Enhanced Key Usage using New-SelfSignedCertificate

情到浓时终转凉″ 提交于 2021-01-07 03:52:29
问题 After running the following command, the Extended Key Usage / Enhanced Key Usage is showing both client and server authorization, how do I remove this option for Root CAs and Intermediate CAs, as CAs should not have these options. What other parameters should be added into the New-SelfSignedCertificate to remove the option below? Client Authentication (1.3.6.1.5.5.7.3.2) Server Authentication (1.3.6.1.5.5.7.3.1) Windows 10 Power Shell v5 openssl 1.1.1 $RootCA = New-SelfSignedCertificate

Problem in Powershell with the --runtime command setting up Jenkins pipeline

安稳与你 提交于 2021-01-07 03:12:40
问题 I am trying to configure a Pipeline with Jenkins and deploying it to Azure. I am at the last step of a tutorial: https://docs.microsoft.com/en-us/azure/jenkins/tutorial-jenkins-deploy-web-app-azure-app-service This last step is as follows, i have to enter this in the Azure CLI: az group create --name yourWebAppAzureResourceGroupName --location region az appservice plan create --name appServicePlanName --resource-group rgname --is-linux az webapp create --name webAppName --resource-group

How can I send a batch variable to a powershell command

牧云@^-^@ 提交于 2021-01-07 03:02:59
问题 I don't know how to fix it... I'm trying to move random files from one folder to another but I want so I can determine the folders inside the batch file but when I run the batch file it doesn't work and if I change the %var% manual from editing the batch file it's working. I'm sorry if this is a simple question but I'm kinda new to batch and still learning. @echo off set /p var1=Enter first dir: set /p var2=Enter second dir: ::Var (Folder Directory) echo %var1% echo %var2% powershell -Command

how to use the cmdlet Select-Xml interactive prompt?

我是研究僧i 提交于 2021-01-07 02:53:38
问题 How is Select-Xml used as below: PS /home/nicholas/powershell> PS /home/nicholas/powershell> Select-Xml cmdlet Select-Xml at command pipeline position 1 Supply values for the following parameters: Xml[0]: ./bookstore.xml Xml[1]: XPath: /bookstore Select-Xml: Cannot bind parameter 'Xml'. Cannot convert the "./bookstore.xml" value of type "System.String" to type "System.Xml.XmlNode". PS /home/nicholas/powershell> by entering the parameters and Xpath through the REPL as above. Certainly: PS

Issue with installation of powercli in docker

五迷三道 提交于 2021-01-07 02:46:32
问题 I have installed PowerShell on php docker image and now trying to install VMWare PowerCLI I am getting the following error on line 44 ParserError: Line | 1 | Set-PowerCLIConfiguration -Scope User -ParticipateInCEIP -Confirm: | ~ | Parameter -Confirm: requires an argument. ERROR: Service 'app' failed to build: The command '/bin/sh -c pwsh -c "Set-PowerCLIConfiguration -Scope User -ParticipateInCEIP $false -Confirm:$false"' returned a non-zero code: 1 Line 44: RUN pwsh -c "Set

Issue with installation of powercli in docker

你说的曾经没有我的故事 提交于 2021-01-07 02:45:47
问题 I have installed PowerShell on php docker image and now trying to install VMWare PowerCLI I am getting the following error on line 44 ParserError: Line | 1 | Set-PowerCLIConfiguration -Scope User -ParticipateInCEIP -Confirm: | ~ | Parameter -Confirm: requires an argument. ERROR: Service 'app' failed to build: The command '/bin/sh -c pwsh -c "Set-PowerCLIConfiguration -Scope User -ParticipateInCEIP $false -Confirm:$false"' returned a non-zero code: 1 Line 44: RUN pwsh -c "Set

How to display server name and ping result only from powershell script in html web page

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-07 02:44:09
问题 I am trying to create the script for checking if the servers are online, which will be displayed as HTML web page using "ConvertTo-Html" property. I also applied some small CSS into it. Here is my code: $Header = @" <style> table { font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; border-collapse: collapse; width: 100%; } th { padding-top: 12px; padding-bottom: 12px; text-align: left; background-color: green; color: white; } </style> "@ $OS = Test-Connection -ComputerName Server1,

How to display server name and ping result only from powershell script in html web page

匆匆过客 提交于 2021-01-07 02:43:03
问题 I am trying to create the script for checking if the servers are online, which will be displayed as HTML web page using "ConvertTo-Html" property. I also applied some small CSS into it. Here is my code: $Header = @" <style> table { font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; border-collapse: collapse; width: 100%; } th { padding-top: 12px; padding-bottom: 12px; text-align: left; background-color: green; color: white; } </style> "@ $OS = Test-Connection -ComputerName Server1,

Is automating App Registration on Azure possible through ARM Template on the User's tenant?

时光怂恿深爱的人放手 提交于 2021-01-07 02:42:25
问题 I am trying to deploy a solution as a managed application through ARM Template. For the deployment to work, I need the Client Id and Client Secret of a registered Application along with the Tenant Id. In my previous scope, I was assuming that the user would have an existing App Registered but now I want to Automate the App registration process for the user and be able to register an application having O365 API Permissions in user's tenant. Below is the approach I were following earlier. So

check if a Deny permission already exists to a directory or not in PowerShell

强颜欢笑 提交于 2021-01-07 02:36:46
问题 I have been writing a script Workflow: Get list all of fixed disks ( except cdrom , floppy drive , usb drive) to check if a path exists or not in PowerShell to check if a Deny permission already exists to a directory or not in PowerShell Set deny permission for write access for users My question are : 1- After file exist control like below , also I want to check if a Deny permission already exists to a directory. ("$drive\usr\local\ssl") If(!(test-path $path)) { New-Item -ItemType Directory