ConvertTo CosmosDbTokenDateString - PlagueHO/CosmosDB GitHub Wiki
Convert a DateTime object into the format required for use in a CosmosDB Authorization Token and request header.
ConvertTo-CosmosDbTokenDateString [-Date] <DateTime> [<CommonParameters>]
This cmdlet converts a DateTime object into the format required by the Authorization Token and in the request header.
PS C:\> $dttoken = ConvertTo-CosmosDbTokenDateString -Date (Get-Date)
Generate date string for use in a CosmosDB token.
This is the DateTime object to convert.
Type: DateTime
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).