PageSourceSearch

https://goc8ycli.netlify.app/assets/js/439c9a46.1b289b2d.js

js goc8ycli.netlify.app collected 2026-10-03 10:52:21 UTC 5,855 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkgo_c_8_y_cli=globalThis.webpackChunkgo_c_8_y_cli||[]).push([[10848],{82284(e,t,i){i.r(t),i.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>p,frontMatter:()=>a,metadata:()=>n,toc:()=>o});const n=JSON.parse('{"id":"cli/psc8y/Devices/Get-DeviceBootstrapCredential","title":"Get-DeviceBootstrapCredential","description":"SYNOPSIS","source":"@site/docs/cli/psc8y/Devices/Get-DeviceBootstrapCredential.md","sourceDirName":"cli/psc8y/Devices","slug":"/docs/cli/psc8y/Devices/get-devicebootstrapcredential","permalink":"/docs/docs/cli/psc8y/Devices/get-devicebootstrapcredential","draft":false,"unlisted":false,"editUrl":"https://github.com/reubenmiller/go-c8y-cli/edit/v2/docs/go-c8y-cli/docs/cli/psc8y/Devices/Get-DeviceBootstrapCredential.md","tags":[],"version":"current","frontMatter":{"category":"Devices","external help file":"PSc8y-help.xml","id":"Get-DeviceBootstrapCredential","Module Name":"PSc8y","online version":null,"schema":"2.0.0","slug":"/docs/cli/psc8y/Devices/get-devicebootstrapcredential","title":"Get-DeviceBootstrapCredential"},"sidebar":"cli","previous":{"title":"Get-DeviceAvailability","permalink":"/docs/docs/cli/psc8y/Devices/get-deviceavailability"},"next":{"title":"Get-DeviceCertificate","permalink":"/docs/docs/cli/psc8y/Devices/get-devicecertificate"}}');var r=i(74848),s=i(28453);const a={category:"Devices","external help file":"PSc8y-help.xml",id:"Get-DeviceBootstrapCredential","Module Name":"PSc8y","online version":null,schema:"2.0.0",slug:"/docs/cli/psc8y/Devices/get-devicebootstrapcredential",title:"Get-DeviceBootstrapCredential"},l=void 0,c={},o=[{value:"SYNOPSIS",id:"synopsis",level:2},{value:"SYNTAX",id:"syntax",level:2},{value:"DESCRIPTION",id:"description",level:2},{value:"EXAMPLES",id:"examples",level:2},{value:"EXAMPLE 1",id:"example-1",level:3},{value:"EXAMPLE 2",id:"example-2",level:3},{value:"PARAMETERS",id:"parameters",level:2},{value:"CommonParameters",id:"commonparameters",level:3},{value:"INPUTS",id:"inputs",level:2},{value:"OUTPUTS",id:"outputs",level:2},{value:"System.Management.Automation.PSCredential",id:"systemmanagementautomationpscredential",level:3},{value:"NOTES",id:"notes",level:2},{value:"RELATED LINKS",id:"related-links",level:2}];function d(e){const t={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h2,{id:"synopsis",children:"SYNOPSIS"}),"\n",(0,r.jsx)(t.p,{children:"Get the device bootstrap credential as a PowerShell credential object (for use in Rest requests)"}),"\n",(0,r.jsx)(t.h2,{id:"syntax",children:"SYNTAX"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{children:"Get-DeviceBootstrapCredential\n\t[<CommonParameters>]\n"})}),"\n",(0,r.jsx)(t.h2,{id:"description",children:"DESCRIPTION"}),"\n",(0,r.jsx)(t.p,{children:"The PSCredentials object also has two additional methods to make the usage of the credentials easier in"}),"\n",(0,r.jsx)(t.p,{children:"The device bootstrap credentials should be already set in the following environment variables"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-powershell",children:"$env:C8Y_DEVICEBOOTSTRAP_TENANT\n$env:C8Y_DEVICEBOOTSTRAP_USERNAME\n$env:C8Y_DEVICEBOOTSTRAP_PASSWORD\n"})}),"\n",(0,r.jsx)(t.p,{children:"Then the credentials can be retrieved using"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-powershell",children:'$Credential = Get-DeviceBootstrapCredential\n$Credential.GetPlainText()  # =\\> returns credentials in format "{username}/{password}"\n$Credential.GetBasicAuth()  # =\\> returns credentials in format "Basic {base64 encoded username/password}"\n'})}),"\n",(0,r.jsx)(t.p,{children:"The credentials can be obtained by contacting support.\nFor security reasons, do not use your tenant credentials."}),"\n",(0,r.jsx)(t.h2,{id:"examples",children:"EXAMPLES"}),"\n",(0,r.jsx)(t.h3,{id:"example-1",children:"EXAMPLE 1"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{children:"New-DeviceBootstrapCredential\n"})}
1),"\n",(0,r.jsx)(t.p,{children:"Get a credential object containing the devicebootstrap credentials"}),"\n",(0,r.jsx)(t.h3,{id:"example-2",children:"EXAMPLE 2"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{children:"$Cred = New-DeviceBootstrapCredential; $Cred.GetBasicAuth()\n"})}),"\n",(0,r.jsx)(t.p,{children:"Get device bootstrap credentials in the format of basic auth (for use in the 'Authorization' header)"}),"\n",(0,r.jsx)(t.h2,{id:"parameters",children:"PARAMETERS"}),"\n",(0,r.jsx)(t.h3,{id:"commonparameters",children:"CommonParameters"}),"\n",(0,r.jsxs)(t.p,{children:["This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see ",(0,r.jsx)(t.a,{href:"http://go.microsoft.com/fwlink/?LinkID=113216",children:"about_CommonParameters"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"inputs",children:"INPUTS"}),"\n",(0,r.jsx)(t.h2,{id:"outputs",children:"OUTPUTS"}),"\n",(0,r.jsx)(t.h3,{id:"systemmanagementautomationpscredential",children:"System.Management.Automation.PSCredential"}),"\n",(0,r.jsx)(t.h2,{id:"notes",children:"NOTES"}),"\n",(0,r.jsx)(t.h2,{id:"related-links",children:"RELATED LINKS"})]})}function p(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},28453(e,t,i){i.d(t,{R:()=>a,x:()=>l});var n=i(96540);const r={},s=n.createContext(r);function a(e){const t=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.