Skip to content

CloudSkills/azure-automation-runbooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

azure-automation-runbooks

These Runbooks expect that you've created a Service Principal and have added the following items to shared resources:

  • SPCreds (credential resource for the service principal)
  • TenantId (variable resource for tenant id)

Here's a PowerShell function you can use to quickly create a service principal

function New-Sp {
  param($Name, $Password)

  $spParams = @{ 
    StartDate = Get-Date
    EndDate = Get-Date -Year 2030
    Password = $Password
  }

  $cred= New-Object Microsoft.Azure.Commands.ActiveDirectory.PSADPasswordCredential -Property $spParams
  $sp = New-AzAdServicePrincipal -DisplayName $Name -PasswordCredential $cred

  Write-Output $sp
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published