File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 91
91
# then put these calls into a loop over a list of XYZ-psm1 keys.
92
92
FetchAndImport- ModuleFromMetadata ' k8s-node-setup-psm1' ' k8s-node-setup.psm1'
93
93
94
+ Dump- DebugInfoToConsole
94
95
Set-PrerequisiteOptions
95
96
$kube_env = Fetch- KubeEnv
96
97
Disable-WindowsDefender
Original file line number Diff line number Diff line change @@ -128,6 +128,19 @@ function Add_GceMetadataServerRoute {
128
128
}
129
129
}
130
130
131
+ # Writes debugging information, such as Windows version and patch info, to the
132
+ # console.
133
+ function Dump-DebugInfoToConsole {
134
+ Try {
135
+ $version = " $ ( [System.Environment ]::OSVersion.Version | Out-String ) "
136
+ $hotfixes = " $ ( Get-Hotfix | Out-String ) "
137
+ $image = " $ ( Get-InstanceMetadata ' image' | Out-String ) "
138
+ Log- Output " Windows version:`n $version "
139
+ Log- Output " Installed hotfixes:`n $hotfixes "
140
+ Log- Output " GCE Windows image:`n $image "
141
+ } Catch { }
142
+ }
143
+
131
144
# Fetches the kube-env from the instance metadata.
132
145
#
133
146
# Returns: a PowerShell Hashtable object containing the key-value pairs from
You can’t perform that action at this time.
0 commit comments