skip to Main Content

Azure – Error converting to IMicrosoftGraphPasswordCredential

I'm trying to create new Azure Active Directory application, using this PowerShell command: $SecurePassword=ConvertTo-SecureString {password} -asplaintext -force New-AzADApplication -DisplayName {Display name} -HomePage {Home page URL} -IdentifierUris {Application identifier} -Password $SecurePassword But I get an error that says Cannot convert value…

VIEW QUESTION

Powershell Replace – Special characters – Nginx

I need to replace location ~* "^/(888888-localhost/client)(.*)$" { proxy_pass https://localhost:32583; by location ~* "^/(888888-localhost/client)(.*)$" { proxy_pass https://localhost:$proxy; I'm trying to achieve this with the following code with no success Get-ChildItem 'C:nginxconfnginx.conf' | ForEach { (Get-Content $_) | ForEach {$_ -Replace…

VIEW QUESTION

Azure – Optimize PowerShell code to avoid calling the cmdlet multiple times inside calculated properties?

I am looking to optimize the code below to avoid calling the same command twice under the calculated properties. https://learn.microsoft.com/en-us/powershell/module/az.compute/get-azvm https://learn.microsoft.com/en-us/powershell/module/az.compute/get-azvmsize Get-AzVM | Select-Object-Object Name, @{ l = 'osdiskingb'; e = { ($_.StorageProfile.OsDisk.DiskSizeGB) } }, ` @{ l = 'memory';…

VIEW QUESTION

Create a new AzureAD user and add to distribution list

I'm running a script to add a new user to Azure AD $AzureADConnection = Connect-AzureAD $AdminEmail = $AzureADConnection.Account.Id Connect-ExchangeOnline -UserPrincipalName $AdminEmail -ShowProgress $false $ADUserParameters = @{ DisplayName = $DisplayName GivenName = $FirstName SurName = $LastName UserPrincipalName = $UserPrincipalName MailNickName =…

VIEW QUESTION
Back To Top
Search