LogoLogo
TwitterLinkedInGitHubPowerShell Gallery
  • About
  • Events
  • Blog
    • 2022
      • 🆕OSD January Update
      • 🆕PSCloudScript Basics
    • 2021
      • Start-OOBEDeploy
      • OSDCloud
      • PowerShell Gallery in WinPE
      • BitLocker KeyProtectors
      • WindowsCapability -and WindowsPackage
      • Scheduled Tasks
        • Building a Task
        • Task Permissions
        • Task Trigger
        • Action a PowerShell File
        • Action a PS Encoded Script
        • Conclusion
          • Windows Activation and Edition Change
          • REG.exe and Multiple Actions
    • 2019
      • 2019-02
        • Offline Servicing vs Reference Image
      • 2019-04
        • Windows 10 Upgrade MultiLang (Uno)
      • 2019-06
        • Offline Servicing Windows 10 with CU for .NET 4.8
        • OSDBuilder and .NET CU KB4480056
      • 2019-09
        • Black Screen During Windows 10 Setup
      • 2019-11
        • I Hate OSDBuilder
    • 2018
      • WinPE 10 1809 WPF DLL Fix
      • Microsoft Update Releases
      • Create WinPE.wim from Boot.wim or WinRE.wim
      • Windows Setup: FAT32 USB with +4GB Install.wim
      • Windows 10 from ESD
      • Windows 10 1809 Appx Issues
      • Mount-WindowsImage -Optimize
  • Guides
    • Autopilot App Registration
    • PSCloudScript
      • PS Cmdlets
      • GitHub Gist
      • GitHub Git Repo
      • Content-Type | Azure Static Web App
      • Command Shortening
      • Azure Key Vault Secret
      • OSD PowerShell Module
      • PSCloudScript Examples
        • Autopilot
        • AutopilotOOBE
        • OSDCloud Live
        • WinPE PowerShell Gallery
        • OSDCloud WinPE and OOBE
    • go OSDCloud
      • Azure Function
      • Custom Domain
      • SSL Binding
      • Proxies
  • PowerShell
    • OSD
    • OSDCloud
    • OSDBuilder (Offline Servicing)
    • OSDSUS (Update Catalogs)
    • OSDUpdate (MS Updates)
    • OSDDrivers (Compact Drivers)
    • PShot
      • Release Notes
      • Usage
        • -Directory
        • $AutoPath
        • -Prefix
        • -Count
        • -Delay
        • -Clipboard
        • -Primary
        • The Object
      • Technical
        • Why a Module?
        • Resolution, Scale and DPI
Powered by GitBook
On this page
  • Get-GithubRawUrl
  • Get-GithubRawContent
  • ConvertTo-PSKeyVaultSecret
  • FromUriContent (ParameterSet)
  • FromClipboard (ParameterSet)
  • Sponsor
  1. Guides
  2. PSCloudScript

OSD PowerShell Module

PreviousAzure Key Vault SecretNextPSCloudScript Examples

Last updated 3 years ago

The OSD PowerShell Module contains some functions that can be helpful in working with a PSCloudScript

Install-Module OSD -Force

Get-GithubRawUrl

This function makes it easy to get the proper GitHub Raw URL for using with Invoke-RestMethod which can then be passed to Invoke-Expression

Get-GithubRawContent

This function will resolve a GitHub URL to the GitHub Raw Url if necessary and return the content which can easily be passed to Invoke-Expression

ConvertTo-PSKeyVaultSecret

Requires PowerShell Module OSD 22.1.18+

This function should make it easier to create an Azure Key Vault Secret. Make sure your PowerShell session is authenticated to Azure AD using an account with proper Azure Key Vault RBAC access

FromUriContent (ParameterSet)

In this example a provided URL content is saved as a Key Vault Secret. If the content is in a GutHub Repo or GitHub Gist, the Raw URL will be resolve automatically

ConvertTo-PSKeyVaultSecret -VaultName $VaultName -Name $SecretName -Uri $GitHubUri

One thing to mention is that a GitHub Gist with multiple files will be combined automatically into a single Azure Key Vault Secret

FromClipboard (ParameterSet)

You can simply Copy some text with Ctrl+C (which sets this in your Clipboard to Paste) and use the -Clipboard switch to convert the last item in your Clipboard as an Azure Key Vault Secret

ConvertTo-PSKeyVaultSecret -VaultName $VaultName -Name $SecretName -Clipboard

Sponsor

OSDeploy is sponsored by and their Systems Management Tools

Recast Software
HomeRecast Software
Sponsored by Recast Software
Logo