File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33Param (
44 [Parameter (Mandatory = $true , HelpMessage = " UNC path to the network share. For example: '\\localhost\steeltoe_network_share'" )][string ]$NetworkAddress ,
5- [Parameter (Mandatory = $true )][string ]$UserName ,
6- [Parameter (Mandatory = $true )][string ]$Password ,
5+ [Parameter (Mandatory = $true )][string ]$UserName ,
6+ [Parameter (Mandatory = $true )][string ]$Password ,
77 [string ]$ServiceName = " credhub" ,
88 [string ]$ServicePlan = " default" ,
99 [string ]$ServiceInstanceName = " sampleNetworkShare"
@@ -19,6 +19,10 @@ $params = @{
1919}
2020$ParamJSON = $params | ConvertTo-Json - Compress
2121
22- Write-Host " cf create-service $ServiceName $ServicePlan $ServiceInstanceName -c $ParamJSON -t $ServiceInstanceName "
22+ # Create a redacted copy of the parameters for logging so the password is not exposed
23+ $redactedParams = $params.Clone ()
24+ $redactedParams [' password' ] = ' REDACTED'
25+ $ParamJSONRedacted = $redactedParams | ConvertTo-Json - Compress
2326
27+ Write-Host " cf create-service $ServiceName $ServicePlan $ServiceInstanceName -c $ParamJSONRedacted -t $ServiceInstanceName "
2428cf create- service $ServiceName $ServicePlan $ServiceInstanceName - c $ParamJSON - t $ServiceInstanceName
You can’t perform that action at this time.
0 commit comments