All Questions

Tagged with
Filter by
Sorted by
Tagged with
-1 votes
1 answer
170 views

Error trying to join Azure storage account to domain

I'm running into an error running Powershell (v5.1) cmdlet Join-AzStorageAccount to join an Azure storage account to my domain. I just did this successfully with a storage account, but when I try to ...
phillipank's user avatar
0 votes
0 answers
95 views

Powershell Linux - Unable to install Module in Azure Ubuntu

I'm trying to install the AZ module in the Ubuntu powershell of an Azure Linux server. However, the powersheel could not find the PSGallery repository. I suspect the DNS record retrieved by the server ...
Nash A's user avatar
  • 1
0 votes
1 answer
198 views

Azure Powershell script to clone NSG rules across subscriptions in the same Tenant

I need some help with a powershell script clone NSG rules from a particular NSG in 1 subscription to a NSG in another subscription. I have a script that accomplishes this if both NSG's are in the same ...
shaolinmaster827's user avatar
0 votes
0 answers
147 views

Assign specific Exchange Role to App-only authentication with Exchange Online Powershell

I need to use the following cmdlets from ExchangeOnline Powershell module with an unattended connection. Get-QuarantineMessage Preview-QuarantineMessage Release-QuarantineMessage Export-...
Brice's user avatar
  • 212
0 votes
1 answer
152 views

Custom script extension for drive letter override in Azure VM creation

I am able to run the below script within the VM without any error gwmi win32_pagefilesetting $pf=gwmi win32_pagefilesetting $pf.Delete() Restart-Computer –Force Get-Partition -DriveLetter "D"...
mysanj's user avatar
  • 1
1 vote
1 answer
966 views

replace with regular expression in azure devops

I want to take this buildVariable Build.SourceVersion which will equal for example: 0gc58d92d905d62415b8866g3f48f17416da426s And replace from digit [7] till line end with empty string 0gc58d92 I ...
Shnbook's user avatar
  • 11
1 vote
1 answer
875 views

Storage Spaces with Azure Disk: how can we extend virtual disks?

We have on Azure several Windows Server 2019 virtual machines whose data disks are configured with Storage Spaces. How can we extend a virtual disk configured for simple redundancy (NumberOfDataCopies ...
aledeniz's user avatar
  • 213
1 vote
0 answers
319 views

Compliance search initialization for "task search1" failed with exception: Object reference not set to an instance of an object

I've a script to start a Search task on Content Search, of Compliance. If I use my own user account to login, I am able to run it, but if I use an unattended login through an App, like the one of App-...
marafado88's user avatar
2 votes
2 answers
806 views

Connect-IPPSSession with CertificateThumbPrint cmdlet showing sign in popup

I've set an application to be used by a script, to login on exchange online on an unattended way, following this tutorial. But when I try to login with it, I got the following outcome, there is a ...
marafado88's user avatar
0 votes
1 answer
76 views

Restart multiple Azure VMSS with time shedule with Powershell Script

I have multiple windows and Linux VMSS machines in azure, I need to recreate the pods, particularly with the windows machine after x days of creation. I need to implement it with help of Powershell ...
Bala's user avatar
  • 1
0 votes
4 answers
360 views

Is there a way to see Azure AD Connect version using Powershell without access to the local servers?

Is there a way to see the Azure AD Connect version using Powershell without access to the local servers that is running the Azure AD Connect client? Think of it as a simple environment with servers On-...
Andreas's user avatar
  • 309
-3 votes
1 answer
1k views

Need help creating a powershell script to update microsoft edge in Azure WVD enviroment (VM's )

OS : Windows 2019 Server Requirement steps: 1 - close all sessions in the WVD VM. 2 - launch Edge and open the About page 3 - close edge after a couple of mins and then update it a lot of time ...
VKNardas's user avatar
1 vote
1 answer
315 views

Powershell showing only 0 values for available cipher suite

I have multiple VMs within the azure cloud. All of them, except one, are unable to connect to certain services using SSL with the message Invoke-Webrequest : The request was aborted: Could not create ...
JBVBO's user avatar
  • 21
-2 votes
1 answer
63 views

How to change IP address of azure NIC, as soon as azure load-balancer's health probe detect instance unhealthy?

I have two machines in backendpool of azure LB, I would like to update network interface usign rest api as soon as health probe detects vm is unhealthy. is there any way to to recoginse that event ...
yogesh deshpande's user avatar
0 votes
1 answer
2k views

Tease out extensionAttribute5 with get-mguser

Trying to force myself to start using graph thru powershell since it looks like the AzureAD powershell commandlets are going the way of the dodo at some point. Wondering if there is a way to use get-...
CG Nobles's user avatar
1 vote
0 answers
1k views

Azure AD Kerberos decryption key rollover; new-azureADSSOAuthenticationContext; using token instead of pscredential

We do the 30 days kerberos decryption key rollover process automated by using an "encrypted" password stored within a text file to create the neccessary PSCredential object for the ...
John Ranger's user avatar
1 vote
0 answers
135 views

Azure VM Managed Disks Drive letters

I have a VM which has Windows OS Disk + More Managed Data Disks attached to it. Another azure VM has similar structure. I am trying to Automate Assign Drive Letter in another VM. I checked Get-Disk, ...
knowdotnet's user avatar
2 votes
2 answers
25k views

How to remove OneDrive via PowerShell

Just wondering if anyone can successfully uninstall OneDrive using PowerShell on Windows 10/11. The uninstall flag on the executable doesn't remove it even if processes are killed first. OneDriveSetup....
itocdw's user avatar
  • 21
0 votes
0 answers
187 views

Stop/Start Azure VMs Using Hybrid Runbook

I currently have runbooks that stop/start VMs on a schedule but recently the runbook to start vms is stopped because it takes too long to complete. The following message is thrown - "The job has ...
jrd1989's user avatar
  • 688
0 votes
1 answer
175 views

Manage Services within Azure VM from Automation Runbook

I'm looking to use Azure Runbooks (powershell) to automate the shutdown/startup process of a few Azure virtual machines. The VM's are running 3rd party reporting tools, some of which take a few ...
jrd1989's user avatar
  • 688
1 vote
1 answer
500 views

Dynamic Windows 10 AppLocker rules for user groups not working

I'm trying to make dynamic app blocking rules with AppLocker. The setup is that I have predefined AppLocker rules (for example, Allow windows user group 'Chrome' access 'chrome.exe' (not actual group ...
Edgar.A's user avatar
  • 13
0 votes
1 answer
1k views

remotely installing python and pip packages

I'm trying to install python with pip packages remotely on an Azure VM using powershell. The script deployed to the VM: Start-Process 'F:\python-3.9.5-amd64.exe'-ArgumentList ("/passive", &...
VLCboy's user avatar
  • 5
1 vote
1 answer
1k views

Azure Runbook Fails to Connect - "Confidential Client is not supported in Cross Cloud request."

I'm working in a Azure Gov tenant. I created an Azure Automation account so I could use it to scale down web apps on the weekend using a powershell runbook. I'm using the code below to authenticate ...
jrd1989's user avatar
  • 688
0 votes
1 answer
618 views

Powershell Copy-Item Fails When Azure File Share is Destination

I am using Powershell and trying to copy a file to an Azure File Share. The Script I am creating creates a Sql Server backup and copies the backup file to the Azure File Share. I want to do this from ...
Jeremiah Adams's user avatar
1 vote
1 answer
651 views

Unable to create custom activity log alert rule via ARM template, Powershell or automation account runbook

I am trying to create a custom activity log alert rule, but no matter which method I try, it results in errors as below or the ARM template does not create the conditions specified even though its ...
i2D's user avatar
  • 21
1 vote
2 answers
1k views

PowerShell remoting works with local IPs but not with the public IP on an Azure VM

Host is a single Windows Server 2019 running as Azure VM, no domain, no AD. To isolate the issue, I am trying to create New-PSSession to the host doing it locally, using its local PowerShell. My ...
g.pickardou's user avatar
0 votes
1 answer
3k views

How to get a list of groups and group memberships in Azure?

How can I get a list of all the groups and undergroups that a user is member of? Or how can I search for a specific undergroup? Nayone who knows of a command for this?
hello88's user avatar
  • 11
1 vote
2 answers
3k views

New VM Can't connect SSH port 22 - Permission Denied

I have a new Ubuntu 18 server in Azure. I am using PowerShell (with the 2018 SSH client already installed). I have tried Putty also. Both with PowerShell and Putty I typed in ssh username@ipaddress, ...
LoudCloudDragoon's user avatar
1 vote
1 answer
1k views

Get details of current Azure VM from inside the VM using PowerShell

Suppose I have a Virtual Machine provisioned in Azure running Windows Server 2016 standard Azure image. Without installing anything onto the VM, how can I retrieve the details of the current VM using ...
A X's user avatar
  • 469
1 vote
1 answer
651 views

Azure SQL bacpac Restore Over Existing Database

I want to restore a bacpac file over an existing Azure SQL database using PowerShell. Past with experience with restoring bacpac files in Azure requires creating a new database altogether when ...
jrd1989's user avatar
  • 688
0 votes
0 answers
165 views

Conditional access policy in Azure -> restrict normal users from using azure powershell

I'm looking for a solution(conditional access policy) or something else that will restrict normal users from accessing azure active directory power shell and execute msol (get-msolgroup) or azure ad ...
Aleksandar Pavlov's user avatar
0 votes
2 answers
2k views

Azure App Service Plan - Specify App Size with PowerShell

I'm trying to deploy an app service plan (ASP) in the premium tier using powershell. I can deploy the ASP successfully but the ASP defaults to P2v1 which is not what I want. I need the ASP to be set ...
jrd1989's user avatar
  • 688
0 votes
1 answer
767 views

Not able to connect to VM in Powershell on target machine task devops

i am new to devops, i have created a release pipeline containing task 'Powershell on target machine'. This task fails with below error : Unable to create pssession. Error: 'Connecting to remote server ...
Rajeev pandit's user avatar
1 vote
1 answer
4k views

enablevmaccess Provisioning Failed > Re-Install the VMAccessAgent

I'm a bit of a newb with Azure VM extensions. In a VM that I've inherited the management of, there is an extension that is not properly provisioned. The VM is running Windows Server 2016 and I just ...
The Mighty Will's user avatar
1 vote
1 answer
53 views

Local install of powershell instead of https://shell.azure.com?

I am trying to use Powershell to create VMs on Azure because I cannot find the necessary functionality on the portal (or get it to work). Is it possible to administrate Azure using a local instance of ...
Bruce Adams's user avatar
0 votes
1 answer
211 views

Editing $PROFILE in Azure Cloud Shell

I have setup Azure Cloud Shell, and put my profile script at default $PROFILE location, which appears to be /home/username/.config/PowerShell/Microsoft.PowerShell_profile.ps1 However I noticed that ...
Madushan's user avatar
  • 738
0 votes
1 answer
781 views

Connecting from Azure Automation to Office 365 PowerShell Endpoint fails half way through script

I have a script running under an Azure Automation account. The script connects to the Office 365 endpoint (https://outlook.office365.com/powershell-liveid/), and uses Set-Contact to update some ...
pauby's user avatar
  • 121
-1 votes
1 answer
437 views

Azure migrate assessment report

In the doc https://docs.microsoft.com/en-us/rest/api/migrate/ it has been mentioned that the REST APIs for the new version are not available yet. Is there any preview available? or any powershell ...
Ravi's user avatar
  • 1
0 votes
0 answers
212 views

Azure Sandboxes and local PowerShell: Unable to acquire token for tenant

I am currently working through the excellent Azure learning modules provided under docs.microsoft.com. Many of the learning modules require a sandbox. Each sandbox creates a new Directory called ...
Matthias Güntert's user avatar
0 votes
0 answers
56 views

Error when modifying classic Azure vnet

I'm trying to connect a classic Azure vnet to a new RM vnet. The end goal is to decommission the classic vnet, but I need to connect the two so I can get active directory servers going on the new vnet....
SeanH's user avatar
  • 101
1 vote
1 answer
350 views

Azure AD - App Registration - Creating a new scope

I'm looking for a way to create a new Azure Active Directory application registration via a PowerShell script. I can create the application using the following script: $appName = "CliApp" az ad app ...
Matt Ruwe's user avatar
  • 131
0 votes
2 answers
2k views

Powershell disable azure subscription

I'm very new to PowerShell, and I was wondering if it is possible to disable an azure subscription through Powershell, I can't find any documentation online. any working examples or referral to ...
DarkCloud's user avatar
1 vote
1 answer
972 views

Enabling MFA for AAD User with PowerShell 6.2

I'm working on a way to enable MFA for AAD / O365 users. I'm referring to this article from the MS docs: https://docs.microsoft.com/en-us/azure/active-directory/authentication/howto-mfa-userstates ...
Utegrad's user avatar
  • 145
0 votes
2 answers
865 views

How to change the access tier for all files within an Azure storage account

How can I change the access tier to "archive" for all files within an Azure Storage account?
Matt Ruwe's user avatar
  • 131
1 vote
0 answers
31 views

Sending powershell commands to Azure vm through CloudShell

Using Azure CloudShell I want to send PowerShell commands to a VM that I created. These would be, for example, to add windows features, change AD users, change IIS configuration etc. I know these can ...
aquaman's user avatar
  • 11
0 votes
1 answer
183 views

Users access on Resources, Resource Group, Subscription in Azure How to get through the Powershell

I have Subscription where lots of Resources and Resource group created, i want to list all user access and what type for access level user has like Owner contributor rider through the Powershell
Biren's user avatar
  • 31
1 vote
2 answers
470 views

Create Azure VM with Windows Firewall ports open?

I'm working on a Powershell script that will automate setting up an Azure VM, adding it to my Active Directory domain, and setting up a number of other settings. The idea is to be able to spin up and ...
Daniel Hutmacher's user avatar
0 votes
1 answer
260 views

New-AzureRMVM : Shared Access Signature (SAS) URI is not allowed for property 'osDisk.vhd.uri' with API version 2018-06-01 and higher

I have an Virtual Disk (vhd) in an Azure blobstore and wan't to create a new Virtual Machine within Azure. To get this done i created an powershell script with contains the following: #Global ...
Erik hoeven's user avatar
1 vote
1 answer
215 views

Add-AzVMDataDisk not attaching disk

I am attempting to attach an unmanaged blob, which is a copy of a snapshot of the os disk, to an existing VM as a data disk. The VM doesn't currently have any data disks. $vm = Get-AzVM -...
Austin France's user avatar
2 votes
1 answer
96 views

Using powershell to access values

I want to access value of "PrivateIpAddress" parameter which is inside "IpConfigurations". How can I do that? When I selected "IpConfigurations" ( command1 below), IPConfigurations->Name parameters ...
Rauf's user avatar
  • 249