postanote's answer contains effective solutions, but it's worth analyzing the problem.
Firstly, simply casting your string to [datetime] is enough, because your input string is directly recognized according to the rules of the invariant culture that PowerShell applies in this case, irrespective of the current culture (the invariant culture is meant to be culture-neutral and is based on the US-English culture):
PS> [datetime] "5/29/2019 8:46:47 PM"
Wednesday, May 29, 2019 8:46:47 PM
Behind the scenes, PowerShell translates this into the following call:
[datetime]::Parse("5/29/2019 8:46:47 PM", [cultureinfo]::InvariantCulture)
By contrast, Get-Date is sensitive to the current culture:
# Works, but only in cultures that use AM / PM and place the month *first* in
# dates, notably, US-English.
PS> Get-Date -Date "5/29/2019 8:46:47 PM"
Wednesday, May 29, 2019 8:46:47 PM
The above would fail in cultures such as fr-FR (French (France)), where it is the day that comes first.
This unfortunate discrepancy in data-type-conversion behavior between casts and cmdlet parameters is a longstanding bug documented in this GitHub issue; for backward-compatibility reasons, however, it won't be fixed.
As for what you tried:
As Lee_Daily points out, your problem is that that your format string, 'MM dd yyyy HH:mm:ss' doesn't match the input date string, "5/29/2019 8:46:47 PM":
HH represents the hour of the day in 24-hour format, whereas your input uses 12-hour format.
The PM in your input is not represented in the format string; use tt to generically represent the AM / PM specifier.
You're using spaces to separate the date components, whereas the input string uses /
Your format string specifies a double-digit month component (MM; e.g., 05), whereas the input has only a single digit (5).
Therefore, you should have used the following:
PS> [datetime]::ParseExact('5/29/2019 8:46:47 PM','M/d/yyyy h:mm:ss tt', [cultureinfo]::InvariantCulture)
Wednesday, May 29, 2019 8:46:47 PM
Note the use of [cultureinfo]::InvariantCulture instead of $null, as the latter would default to the current culture, which means that call may fail in cultures that use localized AM / PM designators (for instance, in the Vietnamese culture (vi-VN), the designators are SA / CH).
Of course, you could have used an appropriate specific culture such as en-US (English (United States)) as well (or assume that your code will never run with any other culture active).
As an aside, note that even / and : in format strings aren't literals: they represent the culture-specific date and time separators, respectively.
To treat them as literals, you'd have to use embedded quoting; e.g., / would be quoted as '/', '"/" or \/
To demonstrate the non-literal interpretation:
PS> [datetime]::ParseExact('6.2019','M/yyyy', [cultureinfo] 'de-DE')
Saturday, June 1, 2019 12:00:00 AM
Note how / matched the culture-appropriate date separator, ..
While the culture-appropriate separators are always used on output formatting, during parsing - as a courtesy - the literal interpretation of / and : is used as a fallback mechanism:
# Works too - "/" is also recognized as a literal.
PS> [datetime]::ParseExact('6/2019','M/yyyy', [cultureinfo] 'de-DE')
Saturday, June 1, 2019 12:00:00 AM
tt] AND to switch fromHH24 hour format tohh12 hour format AND to use the same delimiters.