We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a27c2a commit 1759f5aCopy full SHA for 1759f5a
TOOL-New-DjoinFile/New-DjoinFile.ps1
@@ -1,5 +1,4 @@
1
-function New-DjoinFile
2
-{
+function New-DjoinFile {
3
<#
4
.SYNOPSIS
5
Function to generate a blob file accepted by djoin.exe tool (offline domain join)
@@ -41,10 +40,8 @@
41
40
[System.IO.FileInfo]$DestinationFile = "c:\temp\djoin.tmp"
42
)
43
44
- PROCESS
45
- {
46
- TRY
47
+ PROCESS {
+ TRY {
48
# Create a byte object
49
$bytechain = New-Object -TypeName byte[] -ArgumentList 2
50
# Add the first two character for Unicode Encoding
@@ -66,8 +63,7 @@
66
63
# Close the file Stream
67
64
$FileStream.Close()
68
65
}
69
- CATCH
70
+ CATCH {
71
$Error[0]
72
73
0 commit comments