08/24/2021 08:33:19 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1904955 Keywords=None Message=Started invocation of ScriptBlock ID: abfb964d-7dd6-4f93-a45a-c1e7ff9cddd4 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:19 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1904954 Keywords=None Message=Completed invocation of ScriptBlock ID: afc55686-5da9-48c5-a123-164668e2e91b Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:19 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1904953 Keywords=None Message=Completed invocation of ScriptBlock ID: 91457d17-2b24-4b61-8af3-8dbccf27f8d2 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:19 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1904952 Keywords=None Message=Started invocation of ScriptBlock ID: 91457d17-2b24-4b61-8af3-8dbccf27f8d2 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:19 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1904951 Keywords=None Message=Started invocation of ScriptBlock ID: afc55686-5da9-48c5-a123-164668e2e91b Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:19 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1904950 Keywords=None Message=Creating Scriptblock text (1 of 1): prompt ScriptBlock ID: afc55686-5da9-48c5-a123-164668e2e91b Path: 08/24/2021 08:33:19 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1904949 Keywords=None Message=Completed invocation of ScriptBlock ID: 821cd082-0efa-4358-ba61-71afe869923b Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:19 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1904948 Keywords=None Message=Started invocation of ScriptBlock ID: 821cd082-0efa-4358-ba61-71afe869923b Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:19 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1904947 Keywords=None Message=Completed invocation of ScriptBlock ID: 640ff3bb-5b60-42fd-9293-71e9711167c2 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:19 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1904946 Keywords=None Message=Started invocation of ScriptBlock ID: 640ff3bb-5b60-42fd-9293-71e9711167c2 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:19 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1904945 Keywords=None Message=Creating Scriptblock text (1 of 1): whoami ScriptBlock ID: 640ff3bb-5b60-42fd-9293-71e9711167c2 Path: 08/24/2021 08:33:19 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1904944 Keywords=None Message=Completed invocation of ScriptBlock ID: abfb964d-7dd6-4f93-a45a-c1e7ff9cddd4 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:26 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1904958 Keywords=None Message=Started invocation of ScriptBlock ID: 19db92da-7af1-4b77-9c5e-ccb329e382d9 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:26 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1904957 Keywords=None Message=Creating Scriptblock text (1 of 1): Get-HotFix ScriptBlock ID: 19db92da-7af1-4b77-9c5e-ccb329e382d9 Path: 08/24/2021 08:33:26 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1904956 Keywords=None Message=Completed invocation of ScriptBlock ID: abfb964d-7dd6-4f93-a45a-c1e7ff9cddd4 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905031 Keywords=None Message=Started invocation of ScriptBlock ID: abfb964d-7dd6-4f93-a45a-c1e7ff9cddd4 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905030 Keywords=None Message=Completed invocation of ScriptBlock ID: b08b53ef-c74d-4ece-b8f0-b530b1ed7eeb Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905029 Keywords=None Message=Completed invocation of ScriptBlock ID: 91457d17-2b24-4b61-8af3-8dbccf27f8d2 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905028 Keywords=None Message=Started invocation of ScriptBlock ID: 91457d17-2b24-4b61-8af3-8dbccf27f8d2 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905027 Keywords=None Message=Started invocation of ScriptBlock ID: b08b53ef-c74d-4ece-b8f0-b530b1ed7eeb Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905026 Keywords=None Message=Creating Scriptblock text (1 of 1): prompt ScriptBlock ID: b08b53ef-c74d-4ece-b8f0-b530b1ed7eeb Path: 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905025 Keywords=None Message=Completed invocation of ScriptBlock ID: 821cd082-0efa-4358-ba61-71afe869923b Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905024 Keywords=None Message=Started invocation of ScriptBlock ID: 821cd082-0efa-4358-ba61-71afe869923b Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905023 Keywords=None Message=Completed invocation of ScriptBlock ID: 19db92da-7af1-4b77-9c5e-ccb329e382d9 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905022 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905021 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905020 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905019 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905018 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905017 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905016 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905015 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905014 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905013 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905012 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905011 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905010 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905009 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905008 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905007 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905006 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905005 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905004 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905003 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905002 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905001 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905000 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1904999 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1904998 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1904997 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1904996 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1904995 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1904994 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1904993 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1904992 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1904991 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1904990 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1904989 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1904988 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1904987 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1904986 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1904985 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1904984 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1904983 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1904982 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1904981 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1904980 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1904979 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1904978 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1904977 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1904976 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1904975 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1904974 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1904973 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1904972 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1904971 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1904970 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1904969 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1904968 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1904967 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1904966 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1904965 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1904964 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1904963 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1904962 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1904961 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1904960 Keywords=None Message=Completed invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:30 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1904959 Keywords=None Message=Started invocation of ScriptBlock ID: e4130322-ca5a-4af5-810a-2cdd1a443372 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:49 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905053 Keywords=None Message=Started invocation of ScriptBlock ID: abfb964d-7dd6-4f93-a45a-c1e7ff9cddd4 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:49 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905052 Keywords=None Message=Completed invocation of ScriptBlock ID: 0a548560-dac3-4ddc-b320-5225cb97547c Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:49 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905051 Keywords=None Message=Completed invocation of ScriptBlock ID: 91457d17-2b24-4b61-8af3-8dbccf27f8d2 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:49 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905050 Keywords=None Message=Started invocation of ScriptBlock ID: 91457d17-2b24-4b61-8af3-8dbccf27f8d2 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:49 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905049 Keywords=None Message=Started invocation of ScriptBlock ID: 0a548560-dac3-4ddc-b320-5225cb97547c Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:49 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905048 Keywords=None Message=Creating Scriptblock text (1 of 1): prompt ScriptBlock ID: 0a548560-dac3-4ddc-b320-5225cb97547c Path: 08/24/2021 08:33:49 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905047 Keywords=None Message=Completed invocation of ScriptBlock ID: 821cd082-0efa-4358-ba61-71afe869923b Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:49 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905046 Keywords=None Message=Started invocation of ScriptBlock ID: 821cd082-0efa-4358-ba61-71afe869923b Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:49 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905045 Keywords=None Message=Completed invocation of ScriptBlock ID: 52a2a300-282e-4752-bac4-d167634b1657 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:49 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905044 Keywords=None Message=Completed invocation of ScriptBlock ID: fc297398-1ac8-4890-954a-fa85a2203034 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:49 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905043 Keywords=None Message=Completed invocation of ScriptBlock ID: 27232b17-5519-4a14-9ffa-ddfc32754218 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:49 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905042 Keywords=None Message=Started invocation of ScriptBlock ID: 27232b17-5519-4a14-9ffa-ddfc32754218 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:49 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905041 Keywords=None Message=Started invocation of ScriptBlock ID: fc297398-1ac8-4890-954a-fa85a2203034 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:49 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905040 Keywords=None Message=Completed invocation of ScriptBlock ID: baa8c471-e093-4546-85f4-f4e542c3ae39 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:49 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905039 Keywords=None Message=Started invocation of ScriptBlock ID: baa8c471-e093-4546-85f4-f4e542c3ae39 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:49 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905038 Keywords=None Message=Completed invocation of ScriptBlock ID: 33054370-8042-48ba-ab5b-01b2c8f4923d Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:49 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905037 Keywords=None Message=Started invocation of ScriptBlock ID: 33054370-8042-48ba-ab5b-01b2c8f4923d Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:49 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905036 Keywords=None Message=Completed invocation of ScriptBlock ID: 706dd9ba-9104-43dc-aaaa-b3c6ed6cbd21 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:49 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905035 Keywords=None Message=Started invocation of ScriptBlock ID: 706dd9ba-9104-43dc-aaaa-b3c6ed6cbd21 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:49 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905034 Keywords=None Message=Started invocation of ScriptBlock ID: 52a2a300-282e-4752-bac4-d167634b1657 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:49 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905033 Keywords=None Message=Creating Scriptblock text (1 of 1): Get-ACl ScriptBlock ID: 52a2a300-282e-4752-bac4-d167634b1657 Path: 08/24/2021 08:33:49 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905032 Keywords=None Message=Completed invocation of ScriptBlock ID: abfb964d-7dd6-4f93-a45a-c1e7ff9cddd4 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905116 Keywords=None Message=Completed invocation of ScriptBlock ID: e8b758e1-ba47-475c-874e-1179a097f4de Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905115 Keywords=None Message=Started invocation of ScriptBlock ID: e8b758e1-ba47-475c-874e-1179a097f4de Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905114 Keywords=None Message=Creating Scriptblock text (1 of 1): #requires -version 3.0 try { Microsoft.PowerShell.Core\Set-StrictMode -Off } catch { } $script:MyModule = $MyInvocation.MyCommand.ScriptBlock.Module $script:ClassName = 'ROOT/Microsoft/Windows/Storage/MSFT_ResiliencySetting' $script:ClassVersion = '' $script:ModuleVersion = '1.0.0.0' $script:ObjectModelWrapper = [Microsoft.PowerShell.Cmdletization.Cim.CimCmdletAdapter] $script:PrivateData = [System.Collections.Generic.Dictionary[string,string]]::new() Microsoft.PowerShell.Core\Export-ModuleMember -Function @() function __cmdletization_BindCommonParameters { param( $__cmdletization_objectModelWrapper, $myPSBoundParameters ) if ($myPSBoundParameters.ContainsKey('CimSession')) { $__cmdletization_objectModelWrapper.PSObject.Properties['CimSession'].Value = $myPSBoundParameters['CimSession'] } if ($myPSBoundParameters.ContainsKey('ThrottleLimit')) { $__cmdletization_objectModelWrapper.PSObject.Properties['ThrottleLimit'].Value = $myPSBoundParameters['ThrottleLimit'] } if ($myPSBoundParameters.ContainsKey('AsJob')) { $__cmdletization_objectModelWrapper.PSObject.Properties['AsJob'].Value = $myPSBoundParameters['AsJob'] } } function Get-ResiliencySetting { [CmdletBinding(DefaultParameterSetName='ByName', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_ResiliencySetting')] param( [Parameter(ParameterSetName='ByUniqueId', ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByName')] [ValidateNotNull()] [string[]] ${Name}, [Parameter(ParameterSetName='ByName', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StoragePool')] [ValidateNotNull()] [ciminstance] ${StoragePool}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Name') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Name}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('StoragePool') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StoragePool}, 'MSFT_StoragePoolToResiliencySetting', 'StoragePool', 'ResiliencySetting', 'SilentlyContinue') } $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder) } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP ResiliencySetting.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-ResiliencySetting' -Alias '*' function Set-ResiliencySetting { [CmdletBinding(DefaultParameterSetName='ByName', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_ResiliencySetting')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByName', Mandatory=$true)] [ValidateNotNull()] [string[]] ${Name}, [Parameter(ParameterSetName='ByName', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StoragePool')] [ValidateNotNull()] [ciminstance] ${StoragePool}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_ResiliencySetting')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [uint16] ${NumberOfDataCopiesDefault}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [uint16] ${PhysicalDiskRedundancyDefault}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [uint16] ${NumberOfColumnsDefault}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AutoNumberOfColumns}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [uint64] ${InterleaveDefault}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [uint16] ${NumberOfGroupsDefault}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Name') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Name}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('StoragePool') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StoragePool}, 'MSFT_StoragePoolToResiliencySetting', 'StoragePool', 'ResiliencySetting', 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NumberOfDataCopiesDefault')) { [object]$__cmdletization_value = ${NumberOfDataCopiesDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfDataCopiesDefault'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfDataCopiesDefault'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PhysicalDiskRedundancyDefault')) { [object]$__cmdletization_value = ${PhysicalDiskRedundancyDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDiskRedundancyDefault'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDiskRedundancyDefault'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NumberOfColumnsDefault')) { [object]$__cmdletization_value = ${NumberOfColumnsDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfColumnsDefault'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfColumnsDefault'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('AutoNumberOfColumns')) { [object]$__cmdletization_value = ${AutoNumberOfColumns} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AutoNumberOfColumns'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AutoNumberOfColumns'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('InterleaveDefault')) { [object]$__cmdletization_value = ${InterleaveDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InterleaveDefault'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InterleaveDefault'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NumberOfGroupsDefault')) { [object]$__cmdletization_value = ${NumberOfGroupsDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfGroupsDefault'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfGroupsDefault'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetDefaults', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP ResiliencySetting.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Set-ResiliencySetting' -Alias '*' ScriptBlock ID: e8b758e1-ba47-475c-874e-1179a097f4de Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905113 Keywords=None Message=Completed invocation of ScriptBlock ID: 087d396c-9a7b-4946-a2c3-d330e7cb6e68 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905112 Keywords=None Message=Started invocation of ScriptBlock ID: 087d396c-9a7b-4946-a2c3-d330e7cb6e68 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905111 Keywords=None Message=Creating Scriptblock text (1 of 1): #requires -version 3.0 try { Microsoft.PowerShell.Core\Set-StrictMode -Off } catch { } $script:MyModule = $MyInvocation.MyCommand.ScriptBlock.Module $script:ClassName = 'ROOT/Microsoft/Windows/Storage/MSFT_PhysicalDisk' $script:ClassVersion = '' $script:ModuleVersion = '1.0.0.0' $script:ObjectModelWrapper = [Microsoft.PowerShell.Cmdletization.Cim.CimCmdletAdapter] $script:PrivateData = [System.Collections.Generic.Dictionary[string,string]]::new() Microsoft.PowerShell.Core\Export-ModuleMember -Function @() function __cmdletization_BindCommonParameters { param( $__cmdletization_objectModelWrapper, $myPSBoundParameters ) if ($myPSBoundParameters.ContainsKey('CimSession')) { $__cmdletization_objectModelWrapper.PSObject.Properties['CimSession'].Value = $myPSBoundParameters['CimSession'] } if ($myPSBoundParameters.ContainsKey('ThrottleLimit')) { $__cmdletization_objectModelWrapper.PSObject.Properties['ThrottleLimit'].Value = $myPSBoundParameters['ThrottleLimit'] } if ($myPSBoundParameters.ContainsKey('AsJob')) { $__cmdletization_objectModelWrapper.PSObject.Properties['AsJob'].Value = $myPSBoundParameters['AsJob'] } } ScriptBlock ID: 087d396c-9a7b-4946-a2c3-d330e7cb6e68 Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905110 Keywords=None Message=Completed invocation of ScriptBlock ID: 496c01e3-5c77-47e1-ad27-52c842bcf6aa Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905109 Keywords=None Message=Started invocation of ScriptBlock ID: 496c01e3-5c77-47e1-ad27-52c842bcf6aa Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905108 Keywords=None Message=Creating Scriptblock text (3 of 3): Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('DiskId') -and (@('ById') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DiskId}) $__cmdletization_queryBuilder.FilterByProperty('DiskId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Offset') -and (@('ById') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Offset}) $__cmdletization_queryBuilder.FilterByProperty('Offset', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('DiskNumber') -and (@('ByNumber') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DiskNumber}) $__cmdletization_queryBuilder.FilterByProperty('DiskNumber', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('PartitionNumber') -and (@('ByNumber') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${PartitionNumber}) $__cmdletization_queryBuilder.FilterByProperty('PartitionNumber', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('DriveLetter') -and (@('ByDriveLetter') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DriveLetter}) $__cmdletization_queryBuilder.FilterByProperty('DriveLetter', $__cmdletization_values, $false, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ById', 'ByNumber', 'ByDriveLetter', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('AccessPath')) { [object]$__cmdletization_value = ${AccessPath} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AccessPath'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AccessPath'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('AssignDriveLetter')) { [object]$__cmdletization_value = ${AssignDriveLetter} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AssignDriveLetter'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AssignDriveLetter'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('AddAccessPath', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP Partition.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Add-PartitionAccessPath' -Alias '*' function Remove-PartitionAccessPath { [CmdletBinding(DefaultParameterSetName='ByUniqueId', SupportsShouldProcess=$true, ConfirmImpact='Medium', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Partition')] param( [Parameter(ParameterSetName='ById', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${DiskId}, [Parameter(ParameterSetName='ById', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [uint64[]] ${Offset}, [Parameter(ParameterSetName='ByNumber', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [uint32[]] ${DiskNumber}, [Parameter(ParameterSetName='ByNumber', Mandatory=$true, Position=1)] [Alias('Number')] [ValidateNotNull()] [uint32[]] ${PartitionNumber}, [Parameter(ParameterSetName='ByDriveLetter', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [char[]] ${DriveLetter}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Partition')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ById', Position=2)] [Parameter(ParameterSetName='ByNumber', Position=2)] [Parameter(ParameterSetName='ByDriveLetter', Position=2)] [Parameter(ParameterSetName='InputObject (cdxml)', Position=2)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${AccessPath}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('DiskId') -and (@('ById') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DiskId}) $__cmdletization_queryBuilder.FilterByProperty('DiskId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Offset') -and (@('ById') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Offset}) $__cmdletization_queryBuilder.FilterByProperty('Offset', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('DiskNumber') -and (@('ByNumber') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DiskNumber}) $__cmdletization_queryBuilder.FilterByProperty('DiskNumber', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('PartitionNumber') -and (@('ByNumber') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${PartitionNumber}) $__cmdletization_queryBuilder.FilterByProperty('PartitionNumber', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('DriveLetter') -and (@('ByDriveLetter') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DriveLetter}) $__cmdletization_queryBuilder.FilterByProperty('DriveLetter', $__cmdletization_values, $false, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ById', 'ByNumber', 'ByDriveLetter', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('AccessPath')) { [object]$__cmdletization_value = ${AccessPath} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AccessPath'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AccessPath'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('RemoveAccessPath', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP Partition.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Remove-PartitionAccessPath' -Alias '*' ScriptBlock ID: 496c01e3-5c77-47e1-ad27-52c842bcf6aa Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905107 Keywords=None Message=Creating Scriptblock text (2 of 3): ] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('DiskId') -and (@('ById') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DiskId}) $__cmdletization_queryBuilder.FilterByProperty('DiskId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Offset') -and (@('ById') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Offset}) $__cmdletization_queryBuilder.FilterByProperty('Offset', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('DiskNumber') -and (@('ByNumber') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DiskNumber}) $__cmdletization_queryBuilder.FilterByProperty('DiskNumber', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('PartitionNumber') -and (@('ByNumber') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${PartitionNumber}) $__cmdletization_queryBuilder.FilterByProperty('PartitionNumber', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('DriveLetter') -and (@('ByDriveLetter') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DriveLetter}) $__cmdletization_queryBuilder.FilterByProperty('DriveLetter', $__cmdletization_values, $false, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ById', 'ByNumber', 'ByDriveLetter', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Size')) { [object]$__cmdletization_value = ${Size} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Size'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Size'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Resize', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP Partition.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Resize-Partition' -Alias '*' function Get-PartitionSupportedSize { [CmdletBinding(DefaultParameterSetName='ByUniqueId', PositionalBinding=$false)] param( [Parameter(ParameterSetName='ById', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${DiskId}, [Parameter(ParameterSetName='ById', ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [uint64[]] ${Offset}, [Parameter(ParameterSetName='ByNumber', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [uint32[]] ${DiskNumber}, [Parameter(ParameterSetName='ByNumber', Position=1)] [Alias('Number')] [ValidateNotNull()] [uint32[]] ${PartitionNumber}, [Parameter(ParameterSetName='ByDriveLetter', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [char[]] ${DriveLetter}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Partition')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('DiskId') -and (@('ById') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DiskId}) $__cmdletization_queryBuilder.FilterByProperty('DiskId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Offset') -and (@('ById') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Offset}) $__cmdletization_queryBuilder.FilterByProperty('Offset', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('DiskNumber') -and (@('ByNumber') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DiskNumber}) $__cmdletization_queryBuilder.FilterByProperty('DiskNumber', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('PartitionNumber') -and (@('ByNumber') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${PartitionNumber}) $__cmdletization_queryBuilder.FilterByProperty('PartitionNumber', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('DriveLetter') -and (@('ByDriveLetter') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DriveLetter}) $__cmdletization_queryBuilder.FilterByProperty('DriveLetter', $__cmdletization_values, $false, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ById', 'ByNumber', 'ByDriveLetter', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'SizeMin'; ParameterType = 'System.UInt64'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'SizeMax'; ParameterType = 'System.UInt64'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('GetSupportedSize', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $false if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP Partition.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-PartitionSupportedSize' -Alias '*' function Add-PartitionAccessPath { [CmdletBinding(DefaultParameterSetName='ByUniqueId', SupportsShouldProcess=$true, ConfirmImpact='Low', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Partition')] param( [Parameter(ParameterSetName='ById', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${DiskId}, [Parameter(ParameterSetName='ById', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [uint64[]] ${Offset}, [Parameter(ParameterSetName='ByNumber', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [uint32[]] ${DiskNumber}, [Parameter(ParameterSetName='ByNumber', Mandatory=$true, Position=1)] [Alias('Number')] [ValidateNotNull()] [uint32[]] ${PartitionNumber}, [Parameter(ParameterSetName='ByDriveLetter', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [char[]] ${DriveLetter}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Partition')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ById', Position=2)] [Parameter(ParameterSetName='ByNumber', Position=2)] [Parameter(ParameterSetName='ByDriveLetter', Position=2)] [Parameter(ParameterSetName='InputObject (cdxml)', Position=2)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${AccessPath}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AssignDriveLetter}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } ScriptBlock ID: 496c01e3-5c77-47e1-ad27-52c842bcf6aa Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905106 Keywords=None Message=Creating Scriptblock text (1 of 3): #requires -version 3.0 try { Microsoft.PowerShell.Core\Set-StrictMode -Off } catch { } $script:MyModule = $MyInvocation.MyCommand.ScriptBlock.Module $script:ClassName = 'ROOT/Microsoft/Windows/Storage/MSFT_Partition' $script:ClassVersion = '' $script:ModuleVersion = '1.0.0.0' $script:ObjectModelWrapper = [Microsoft.PowerShell.Cmdletization.Cim.CimCmdletAdapter] $script:PrivateData = [System.Collections.Generic.Dictionary[string,string]]::new() Microsoft.PowerShell.Core\Export-ModuleMember -Function @() function __cmdletization_BindCommonParameters { param( $__cmdletization_objectModelWrapper, $myPSBoundParameters ) if ($myPSBoundParameters.ContainsKey('CimSession')) { $__cmdletization_objectModelWrapper.PSObject.Properties['CimSession'].Value = $myPSBoundParameters['CimSession'] } if ($myPSBoundParameters.ContainsKey('ThrottleLimit')) { $__cmdletization_objectModelWrapper.PSObject.Properties['ThrottleLimit'].Value = $myPSBoundParameters['ThrottleLimit'] } if ($myPSBoundParameters.ContainsKey('AsJob')) { $__cmdletization_objectModelWrapper.PSObject.Properties['AsJob'].Value = $myPSBoundParameters['AsJob'] } } function Get-Partition { [CmdletBinding(DefaultParameterSetName='ByUniqueId', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Partition')] param( [Parameter(ParameterSetName='ByUniqueId', ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ById', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('DiskPath')] [ValidateNotNull()] [string[]] ${DiskId}, [Parameter(ParameterSetName='ById', ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [uint64[]] ${Offset}, [Parameter(ParameterSetName='ByNumber', Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [uint32[]] ${DiskNumber}, [Parameter(ParameterSetName='ByNumber', Position=1)] [Alias('Number')] [ValidateNotNull()] [uint32[]] ${PartitionNumber}, [Parameter(ParameterSetName='ByDriveLetter', ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [char[]] ${DriveLetter}, [Parameter(ParameterSetName='ByDisk', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Disk')] [ValidateNotNull()] [ciminstance] ${Disk}, [Parameter(ParameterSetName='ByVolume', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Volume')] [ValidateNotNull()] [ciminstance] ${Volume}, [Parameter(ParameterSetName='ByStorageSubSystem', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageSubSystem')] [ValidateNotNull()] [ciminstance] ${StorageSubSystem}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='ByDisk')] [Parameter(ParameterSetName='ByVolume')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='ByDisk')] [Parameter(ParameterSetName='ByVolume')] [Parameter(ParameterSetName='ByStorageSubSystem')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='ByDisk')] [Parameter(ParameterSetName='ByVolume')] [Parameter(ParameterSetName='ByStorageSubSystem')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('DiskId') -and (@('ById') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DiskId}) $__cmdletization_queryBuilder.FilterByProperty('DiskId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Offset') -and (@('ById') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Offset}) $__cmdletization_queryBuilder.FilterByProperty('Offset', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('DiskNumber') -and (@('ByNumber') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DiskNumber}) $__cmdletization_queryBuilder.FilterByProperty('DiskNumber', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('PartitionNumber') -and (@('ByNumber') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${PartitionNumber}) $__cmdletization_queryBuilder.FilterByProperty('PartitionNumber', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('DriveLetter') -and (@('ByDriveLetter') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DriveLetter}) $__cmdletization_queryBuilder.FilterByProperty('DriveLetter', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('Disk') -and (@('ByDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${Disk}, 'MSFT_DiskToPartition', 'Disk', 'Partition', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('Volume') -and (@('ByVolume') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${Volume}, 'MSFT_PartitionToVolume', 'Volume', 'Partition', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('StorageSubSystem') -and (@('ByStorageSubSystem') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StorageSubSystem}, 'MSFT_StorageSubSystemToPartition', 'StorageSubSystem', 'Partition', 'SilentlyContinue') } $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder) } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP Partition.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-Partition' -Alias '*' function Remove-Partition { [CmdletBinding(DefaultParameterSetName='ByUniqueId', SupportsShouldProcess=$true, ConfirmImpact='High', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Partition')] param( [Parameter(ParameterSetName='ById', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${DiskId}, [Parameter(ParameterSetName='ById', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [uint64[]] ${Offset}, [Parameter(ParameterSetName='ByNumber', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [uint32[]] ${DiskNumber}, [Parameter(ParameterSetName='ByNumber', Mandatory=$true, Position=1)] [Alias('Number')] [ValidateNotNull()] [uint32[]] ${PartitionNumber}, [Parameter(ParameterSetName='ByDriveLetter', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [char[]] ${DriveLetter}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Partition')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('DiskId') -and (@('ById') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DiskId}) $__cmdletization_queryBuilder.FilterByProperty('DiskId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('Offset') -and (@('ById') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Offset}) $__cmdletization_queryBuilder.FilterByProperty('Offset', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('DiskNumber') -and (@('ByNumber') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DiskNumber}) $__cmdletization_queryBuilder.FilterByProperty('DiskNumber', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('PartitionNumber') -and (@('ByNumber') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${PartitionNumber}) $__cmdletization_queryBuilder.FilterByProperty('PartitionNumber', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('DriveLetter') -and (@('ByDriveLetter') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DriveLetter}) $__cmdletization_queryBuilder.FilterByProperty('DriveLetter', $__cmdletization_values, $false, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ById', 'ByNumber', 'ByDriveLetter', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('DeleteObject', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP Partition.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Remove-Partition' -Alias '*' function Resize-Partition { [CmdletBinding(DefaultParameterSetName='ByUniqueId', SupportsShouldProcess=$true, ConfirmImpact='Low', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Partition')] param( [Parameter(ParameterSetName='ById', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${DiskId}, [Parameter(ParameterSetName='ById', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [uint64[]] ${Offset}, [Parameter(ParameterSetName='ByNumber', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [uint32[]] ${DiskNumber}, [Parameter(ParameterSetName='ByNumber', Mandatory=$true, Position=1)] [Alias('Number')] [ValidateNotNull()] [uint32[]] ${PartitionNumber}, [Parameter(ParameterSetName='ByDriveLetter', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [char[]] ${DriveLetter}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Partition')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ById', Mandatory=$true, Position=2)] [Parameter(ParameterSetName='ByNumber', Mandatory=$true, Position=2)] [Parameter(ParameterSetName='ByDriveLetter', Mandatory=$true, Position=2)] [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, Position=2)] [uint64] ${Size}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ById') ScriptBlock ID: 496c01e3-5c77-47e1-ad27-52c842bcf6aa Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905105 Keywords=None Message=Completed invocation of ScriptBlock ID: 46260152-acc2-412f-8f23-8b107bc9ce12 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905104 Keywords=None Message=Started invocation of ScriptBlock ID: 46260152-acc2-412f-8f23-8b107bc9ce12 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905103 Keywords=None Message=Creating Scriptblock text (1 of 1): #requires -version 3.0 try { Microsoft.PowerShell.Core\Set-StrictMode -Off } catch { } $script:MyModule = $MyInvocation.MyCommand.ScriptBlock.Module $script:ClassName = 'ROOT/Microsoft/Windows/Storage/MSFT_OffloadDataTransferSetting' $script:ClassVersion = '' $script:ModuleVersion = '1.0.0.0' $script:ObjectModelWrapper = [Microsoft.PowerShell.Cmdletization.Cim.CimCmdletAdapter] $script:PrivateData = [System.Collections.Generic.Dictionary[string,string]]::new() Microsoft.PowerShell.Core\Export-ModuleMember -Function @() function __cmdletization_BindCommonParameters { param( $__cmdletization_objectModelWrapper, $myPSBoundParameters ) if ($myPSBoundParameters.ContainsKey('CimSession')) { $__cmdletization_objectModelWrapper.PSObject.Properties['CimSession'].Value = $myPSBoundParameters['CimSession'] } if ($myPSBoundParameters.ContainsKey('ThrottleLimit')) { $__cmdletization_objectModelWrapper.PSObject.Properties['ThrottleLimit'].Value = $myPSBoundParameters['ThrottleLimit'] } if ($myPSBoundParameters.ContainsKey('AsJob')) { $__cmdletization_objectModelWrapper.PSObject.Properties['AsJob'].Value = $myPSBoundParameters['AsJob'] } } function Get-OffloadDataTransferSetting { [CmdletBinding(DefaultParameterSetName='ByStorageSubSystem', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_OffloadDataTransferSetting')] param( [Parameter(ParameterSetName='ByStorageSubSystem', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageSubSystem')] [ValidateNotNull()] [ciminstance] ${StorageSubSystem}, [Parameter(ParameterSetName='ByStorageSubSystem')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByStorageSubSystem')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByStorageSubSystem')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('StorageSubSystem') -and (@('ByStorageSubSystem') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StorageSubSystem}, 'MSFT_StorageSubSystemToOffloadDataTransferSetting', 'StorageSubSystem', 'OffloadDataTransferSetting', 'SilentlyContinue') } $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder) } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP OffloadDataTransferSetting.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-OffloadDataTransferSetting' -Alias '*' ScriptBlock ID: 46260152-acc2-412f-8f23-8b107bc9ce12 Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905102 Keywords=None Message=Completed invocation of ScriptBlock ID: 27c6c8a4-82a0-4d23-90d0-5765ee91043d Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905101 Keywords=None Message=Started invocation of ScriptBlock ID: 27c6c8a4-82a0-4d23-90d0-5765ee91043d Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905100 Keywords=None Message=Creating Scriptblock text (5 of 5): zation_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('VirtualDiskNames')) { [object]$__cmdletization_value = ${VirtualDiskNames} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VirtualDiskNames'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VirtualDiskNames'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('RemoveVirtualDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP MaskingSet.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Remove-VirtualDiskFromMaskingSet' -Alias '*' ScriptBlock ID: 27c6c8a4-82a0-4d23-90d0-5765ee91043d Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905099 Keywords=None Message=Creating Scriptblock text (4 of 5): dletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'TargetPortAddresses'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'TargetPortAddresses'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('RemoveTargetPort', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP MaskingSet.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Remove-TargetPortFromMaskingSet' -Alias '*' function Add-VirtualDiskToMaskingSet { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', SupportsShouldProcess=$true, ConfirmImpact='Low', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_MaskingSet')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ValidateNotNull()] [string[]] ${MaskingSetUniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ValidateNotNull()] [string[]] ${MaskingSetFriendlyName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_MaskingSet')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string[]] ${VirtualDisknames}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [uint16[]] ${DeviceNumbers}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.MaskingSet.AddVirtualDisk.DeviceAccess[]] ${DeviceAccesses}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('MaskingSetUniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${MaskingSetUniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('MaskingSetFriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${MaskingSetFriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('VirtualDisknames')) { [object]$__cmdletization_value = ${VirtualDisknames} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VirtualDisknames'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VirtualDisknames'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('DeviceNumbers')) { [object]$__cmdletization_value = ${DeviceNumbers} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DeviceNumbers'; ParameterType = 'System.UInt16[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DeviceNumbers'; ParameterType = 'System.UInt16[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('DeviceAccesses')) { [object]$__cmdletization_value = ${DeviceAccesses} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DeviceAccesses'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.MaskingSet.AddVirtualDisk.DeviceAccess[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DeviceAccesses'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.MaskingSet.AddVirtualDisk.DeviceAccess[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('AddVirtualDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP MaskingSet.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Add-VirtualDiskToMaskingSet' -Alias '*' function Remove-VirtualDiskFromMaskingSet { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', SupportsShouldProcess=$true, ConfirmImpact='Medium', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_MaskingSet')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ValidateNotNull()] [string[]] ${MaskingSetUniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ValidateNotNull()] [string[]] ${MaskingSetFriendlyName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_MaskingSet')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string[]] ${VirtualDiskNames}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('MaskingSetUniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${MaskingSetUniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('MaskingSetFriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${MaskingSetFriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } $__cmdleti ScriptBlock ID: 27c6c8a4-82a0-4d23-90d0-5765ee91043d Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905098 Keywords=None Message=Creating Scriptblock text (3 of 5): ) } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('MaskingSetUniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${MaskingSetUniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('MaskingSetFriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${MaskingSetFriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('InitiatorIds')) { [object]$__cmdletization_value = ${InitiatorIds} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InitiatorIds'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InitiatorIds'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('RemoveInitiatorId', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP MaskingSet.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Remove-InitiatorIdFromMaskingSet' -Alias '*' function Add-TargetPortToMaskingSet { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', SupportsShouldProcess=$true, ConfirmImpact='Low', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_MaskingSet')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ValidateNotNull()] [string[]] ${MaskingSetUniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ValidateNotNull()] [string[]] ${MaskingSetFriendlyName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_MaskingSet')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string[]] ${TargetPortAddresses}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('MaskingSetUniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${MaskingSetUniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('MaskingSetFriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${MaskingSetFriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('TargetPortAddresses')) { [object]$__cmdletization_value = ${TargetPortAddresses} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'TargetPortAddresses'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'TargetPortAddresses'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('AddTargetPort', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP MaskingSet.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Add-TargetPortToMaskingSet' -Alias '*' function Remove-TargetPortFromMaskingSet { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', SupportsShouldProcess=$true, ConfirmImpact='Medium', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_MaskingSet')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ValidateNotNull()] [string[]] ${MaskingSetUniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ValidateNotNull()] [string[]] ${MaskingSetFriendlyName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_MaskingSet')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string[]] ${TargetPortAddresses}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('MaskingSetUniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${MaskingSetUniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('MaskingSetFriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${MaskingSetFriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('TargetPortAddresses')) { [object]$__cmdletization_value = ${TargetPortAddresses} $__cm ScriptBlock ID: 27c6c8a4-82a0-4d23-90d0-5765ee91043d Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905097 Keywords=None Message=Creating Scriptblock text (2 of 5): e='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NewFriendlyName')) { [object]$__cmdletization_value = ${NewFriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetFriendlyName', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP MaskingSet.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Rename-MaskingSet' -Alias '*' function Add-InitiatorIdToMaskingSet { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', SupportsShouldProcess=$true, ConfirmImpact='Low', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_MaskingSet')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ValidateNotNull()] [string[]] ${MaskingSetUniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ValidateNotNull()] [string[]] ${MaskingSetFriendlyName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_MaskingSet')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string[]] ${InitiatorIds}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.MaskingSet.HostType] ${HostType}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('MaskingSetUniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${MaskingSetUniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('MaskingSetFriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${MaskingSetFriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('InitiatorIds')) { [object]$__cmdletization_value = ${InitiatorIds} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InitiatorIds'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InitiatorIds'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('HostType')) { [object]$__cmdletization_value = ${HostType} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'HostType'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.MaskingSet.HostType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'HostType'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.MaskingSet.HostType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('AddInitiatorId', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP MaskingSet.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Add-InitiatorIdToMaskingSet' -Alias '*' function Remove-InitiatorIdFromMaskingSet { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', SupportsShouldProcess=$true, ConfirmImpact='Medium', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_MaskingSet')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ValidateNotNull()] [string[]] ${MaskingSetUniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ValidateNotNull()] [string[]] ${MaskingSetFriendlyName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_MaskingSet')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string[]] ${InitiatorIds}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters( ScriptBlock ID: 27c6c8a4-82a0-4d23-90d0-5765ee91043d Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905096 Keywords=None Message=Creating Scriptblock text (1 of 5): #requires -version 3.0 try { Microsoft.PowerShell.Core\Set-StrictMode -Off } catch { } $script:MyModule = $MyInvocation.MyCommand.ScriptBlock.Module $script:ClassName = 'ROOT/Microsoft/Windows/Storage/MSFT_MaskingSet' $script:ClassVersion = '' $script:ModuleVersion = '1.0.0.0' $script:ObjectModelWrapper = [Microsoft.PowerShell.Cmdletization.Cim.CimCmdletAdapter] $script:PrivateData = [System.Collections.Generic.Dictionary[string,string]]::new() Microsoft.PowerShell.Core\Export-ModuleMember -Function @() function __cmdletization_BindCommonParameters { param( $__cmdletization_objectModelWrapper, $myPSBoundParameters ) if ($myPSBoundParameters.ContainsKey('CimSession')) { $__cmdletization_objectModelWrapper.PSObject.Properties['CimSession'].Value = $myPSBoundParameters['CimSession'] } if ($myPSBoundParameters.ContainsKey('ThrottleLimit')) { $__cmdletization_objectModelWrapper.PSObject.Properties['ThrottleLimit'].Value = $myPSBoundParameters['ThrottleLimit'] } if ($myPSBoundParameters.ContainsKey('AsJob')) { $__cmdletization_objectModelWrapper.PSObject.Properties['AsJob'].Value = $myPSBoundParameters['AsJob'] } } function Get-MaskingSet { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_MaskingSet')] param( [Parameter(ParameterSetName='ByUniqueId', ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='ByFriendlyName', ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.MaskingSet.HostType[]] ${HostType}, [Parameter(ParameterSetName='ByTargetPort', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_TargetPort')] [ValidateNotNull()] [ciminstance] ${TargetPort}, [Parameter(ParameterSetName='ByInitiatorId', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_InitiatorId')] [ValidateNotNull()] [ciminstance] ${InitiatorId}, [Parameter(ParameterSetName='ByStorageSubSystem', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageSubSystem')] [ValidateNotNull()] [ciminstance] ${StorageSubSystem}, [Parameter(ParameterSetName='ByVirtualDisk', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_VirtualDisk')] [ValidateNotNull()] [ciminstance] ${VirtualDisk}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByTargetPort')] [Parameter(ParameterSetName='ByInitiatorId')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByVirtualDisk')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByTargetPort')] [Parameter(ParameterSetName='ByInitiatorId')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByVirtualDisk')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByTargetPort')] [Parameter(ParameterSetName='ByInitiatorId')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByVirtualDisk')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('HostType') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${HostType}) $__cmdletization_queryBuilder.FilterByProperty('HostType', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('TargetPort') -and (@('ByTargetPort') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${TargetPort}, 'MSFT_MaskingSetToTargetPort', 'TargetPort', 'MaskingSet', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('InitiatorId') -and (@('ByInitiatorId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${InitiatorId}, 'MSFT_MaskingSetToInitiatorId', 'InitiatorId', 'MaskingSet', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('StorageSubSystem') -and (@('ByStorageSubSystem') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StorageSubSystem}, 'MSFT_StorageSubSystemToMaskingSet', 'StorageSubSystem', 'MaskingSet', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('VirtualDisk') -and (@('ByVirtualDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${VirtualDisk}, 'MSFT_MaskingSetToVirtualDisk', 'VirtualDisk', 'MaskingSet', 'SilentlyContinue') } $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder) } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP MaskingSet.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-MaskingSet' -Alias '*' function Remove-MaskingSet { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', SupportsShouldProcess=$true, ConfirmImpact='High', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_MaskingSet')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_MaskingSet')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $false, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('DeleteObject', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP MaskingSet.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Remove-MaskingSet' -Alias '*' function Rename-MaskingSet { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', SupportsShouldProcess=$true, ConfirmImpact='Low', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_MaskingSet')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_MaskingSet')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true)] [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true)] [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${NewFriendlyName}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetNam ScriptBlock ID: 27c6c8a4-82a0-4d23-90d0-5765ee91043d Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905095 Keywords=None Message=Completed invocation of ScriptBlock ID: faa9415d-0ee0-4525-8e4e-b209bc7a90cc Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905094 Keywords=None Message=Started invocation of ScriptBlock ID: faa9415d-0ee0-4525-8e4e-b209bc7a90cc Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905093 Keywords=None Message=Creating Scriptblock text (1 of 1): #requires -version 3.0 try { Microsoft.PowerShell.Core\Set-StrictMode -Off } catch { } $script:MyModule = $MyInvocation.MyCommand.ScriptBlock.Module $script:ClassName = 'ROOT/Microsoft/Windows/Storage/MSFT_InitiatorPort' $script:ClassVersion = '' $script:ModuleVersion = '1.0.0.0' $script:ObjectModelWrapper = [Microsoft.PowerShell.Cmdletization.Cim.CimCmdletAdapter] $script:PrivateData = [System.Collections.Generic.Dictionary[string,string]]::new() Microsoft.PowerShell.Core\Export-ModuleMember -Function @() function __cmdletization_BindCommonParameters { param( $__cmdletization_objectModelWrapper, $myPSBoundParameters ) if ($myPSBoundParameters.ContainsKey('CimSession')) { $__cmdletization_objectModelWrapper.PSObject.Properties['CimSession'].Value = $myPSBoundParameters['CimSession'] } if ($myPSBoundParameters.ContainsKey('ThrottleLimit')) { $__cmdletization_objectModelWrapper.PSObject.Properties['ThrottleLimit'].Value = $myPSBoundParameters['ThrottleLimit'] } if ($myPSBoundParameters.ContainsKey('AsJob')) { $__cmdletization_objectModelWrapper.PSObject.Properties['AsJob'].Value = $myPSBoundParameters['AsJob'] } } function Get-InitiatorPort { [CmdletBinding(DefaultParameterSetName='ByNodeAddress', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_InitiatorPort')] param( [Parameter(ParameterSetName='ByObjectId', ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${ObjectId}, [Parameter(ParameterSetName='ByNodeAddress', Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${NodeAddress}, [Parameter(ParameterSetName='ByInstanceName', ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${InstanceName}, [Parameter(ParameterSetName='ByNodeAddress', ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByInstanceName', ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.InitiatorPort.ConnectionType[]] ${ConnectionType}, [Parameter(ParameterSetName='ByVirtualDisk', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_VirtualDisk')] [ValidateNotNull()] [ciminstance] ${VirtualDisk}, [Parameter(ParameterSetName='ByiSCSISession', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_iSCSISession')] [ValidateNotNull()] [ciminstance] ${iSCSISession}, [Parameter(ParameterSetName='ByiSCSIConnection', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_iSCSIConnection')] [ValidateNotNull()] [ciminstance] ${iSCSIConnection}, [Parameter(ParameterSetName='ByiSCSITarget', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_iSCSITarget')] [ValidateNotNull()] [ciminstance] ${iSCSITarget}, [Parameter(ParameterSetName='ByObjectId')] [Parameter(ParameterSetName='ByNodeAddress')] [Parameter(ParameterSetName='ByInstanceName')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByiSCSISession')] [Parameter(ParameterSetName='ByiSCSIConnection')] [Parameter(ParameterSetName='ByiSCSITarget')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByObjectId')] [Parameter(ParameterSetName='ByNodeAddress')] [Parameter(ParameterSetName='ByInstanceName')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByiSCSISession')] [Parameter(ParameterSetName='ByiSCSIConnection')] [Parameter(ParameterSetName='ByiSCSITarget')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByObjectId')] [Parameter(ParameterSetName='ByNodeAddress')] [Parameter(ParameterSetName='ByInstanceName')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByiSCSISession')] [Parameter(ParameterSetName='ByiSCSIConnection')] [Parameter(ParameterSetName='ByiSCSITarget')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('ObjectId') -and (@('ByObjectId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${ObjectId}) $__cmdletization_queryBuilder.FilterByProperty('ObjectId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('NodeAddress') -and (@('ByNodeAddress') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${NodeAddress}) $__cmdletization_queryBuilder.FilterByProperty('NodeAddress', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('InstanceName') -and (@('ByInstanceName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${InstanceName}) $__cmdletization_queryBuilder.FilterByProperty('InstanceName', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('ConnectionType') -and (@('ByNodeAddress', 'ByInstanceName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${ConnectionType}) $__cmdletization_queryBuilder.FilterByProperty('ConnectionType', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('VirtualDisk') -and (@('ByVirtualDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${VirtualDisk}, 'MSFT_VirtualDiskToInitiatorPort', 'VirtualDisk', 'InitiatorPort', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('iSCSISession') -and (@('ByiSCSISession') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${iSCSISession}, 'MSFT_InitiatorPortToiSCSISession', 'iSCSISession', 'InitiatorPort', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('iSCSIConnection') -and (@('ByiSCSIConnection') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${iSCSIConnection}, 'MSFT_InitiatorPortToiSCSIConnection', 'iSCSIConnection', 'InitiatorPort', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('iSCSITarget') -and (@('ByiSCSITarget') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${iSCSITarget}, 'MSFT_InitiatorPortToiSCSITarget', 'iSCSITarget', 'InitiatorPort', 'SilentlyContinue') } $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder) } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP InitiatorPort.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-InitiatorPort' -Alias '*' function Set-InitiatorPort { [CmdletBinding(DefaultParameterSetName='ByNodeAddress', SupportsShouldProcess=$true, ConfirmImpact='Medium', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_InitiatorPort')] param( [Parameter(ParameterSetName='ByObjectId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${ObjectId}, [Parameter(ParameterSetName='ByNodeAddress', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${NodeAddress}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_InitiatorPort')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByObjectId', Mandatory=$true)] [Parameter(ParameterSetName='ByNodeAddress', Mandatory=$true)] [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${NewNodeAddress}, [Parameter(ParameterSetName='ByObjectId')] [Parameter(ParameterSetName='ByNodeAddress')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByObjectId')] [Parameter(ParameterSetName='ByNodeAddress')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByObjectId')] [Parameter(ParameterSetName='ByNodeAddress')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByObjectId')] [Parameter(ParameterSetName='ByNodeAddress')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('ObjectId') -and (@('ByObjectId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${ObjectId}) $__cmdletization_queryBuilder.FilterByProperty('ObjectId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('NodeAddress') -and (@('ByNodeAddress') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${NodeAddress}) $__cmdletization_queryBuilder.FilterByProperty('NodeAddress', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByObjectId', 'ByNodeAddress', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NewNodeAddress')) { [object]$__cmdletization_value = ${NewNodeAddress} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NodeAddress'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NodeAddress'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetNodeAddress', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP InitiatorPort.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Set-InitiatorPort' -Alias '*' ScriptBlock ID: faa9415d-0ee0-4525-8e4e-b209bc7a90cc Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905092 Keywords=None Message=Completed invocation of ScriptBlock ID: cb074ca7-9b78-4871-920e-5d9a246e7115 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905091 Keywords=None Message=Started invocation of ScriptBlock ID: cb074ca7-9b78-4871-920e-5d9a246e7115 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905090 Keywords=None Message=Creating Scriptblock text (1 of 1): #requires -version 3.0 try { Microsoft.PowerShell.Core\Set-StrictMode -Off } catch { } $script:MyModule = $MyInvocation.MyCommand.ScriptBlock.Module $script:ClassName = 'ROOT/Microsoft/Windows/Storage/MSFT_InitiatorId' $script:ClassVersion = '' $script:ModuleVersion = '1.0.0.0' $script:ObjectModelWrapper = [Microsoft.PowerShell.Cmdletization.Cim.CimCmdletAdapter] $script:PrivateData = [System.Collections.Generic.Dictionary[string,string]]::new() Microsoft.PowerShell.Core\Export-ModuleMember -Function @() function __cmdletization_BindCommonParameters { param( $__cmdletization_objectModelWrapper, $myPSBoundParameters ) if ($myPSBoundParameters.ContainsKey('CimSession')) { $__cmdletization_objectModelWrapper.PSObject.Properties['CimSession'].Value = $myPSBoundParameters['CimSession'] } if ($myPSBoundParameters.ContainsKey('ThrottleLimit')) { $__cmdletization_objectModelWrapper.PSObject.Properties['ThrottleLimit'].Value = $myPSBoundParameters['ThrottleLimit'] } if ($myPSBoundParameters.ContainsKey('AsJob')) { $__cmdletization_objectModelWrapper.PSObject.Properties['AsJob'].Value = $myPSBoundParameters['AsJob'] } } function Get-InitiatorId { [CmdletBinding(DefaultParameterSetName='ByAddress', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_InitiatorId')] param( [Parameter(ParameterSetName='ByUniqueId', ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByAddress', Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ValidateNotNull()] [string[]] ${InitiatorAddress}, [Parameter(ParameterSetName='ByAddress', ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.InitiatorId.HostType[]] ${HostType}, [Parameter(ParameterSetName='ByMaskingSet', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_MaskingSet')] [ValidateNotNull()] [ciminstance] ${MaskingSet}, [Parameter(ParameterSetName='ByVirtualDisk', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_VirtualDisk')] [ValidateNotNull()] [ciminstance] ${VirtualDisk}, [Parameter(ParameterSetName='ByStorageSubSystem', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageSubSystem')] [ValidateNotNull()] [ciminstance] ${StorageSubSystem}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByAddress')] [Parameter(ParameterSetName='ByMaskingSet')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByAddress')] [Parameter(ParameterSetName='ByMaskingSet')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByStorageSubSystem')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByAddress')] [Parameter(ParameterSetName='ByMaskingSet')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByStorageSubSystem')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('InitiatorAddress') -and (@('ByAddress') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${InitiatorAddress}) $__cmdletization_queryBuilder.FilterByProperty('InitiatorAddress', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('HostType') -and (@('ByAddress') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${HostType}) $__cmdletization_queryBuilder.FilterByProperty('HostType', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('MaskingSet') -and (@('ByMaskingSet') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${MaskingSet}, 'MSFT_MaskingSetToInitiatorId', 'MaskingSet', 'InitiatorId', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('VirtualDisk') -and (@('ByVirtualDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${VirtualDisk}, 'MSFT_InitiatorIdToVirtualDisk', 'VirtualDisk', 'InitiatorId', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('StorageSubSystem') -and (@('ByStorageSubSystem') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StorageSubSystem}, 'MSFT_StorageSubSystemToInitiatorId', 'StorageSubSystem', 'InitiatorId', 'SilentlyContinue') } $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder) } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP InitiatorId.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-InitiatorId' -Alias '*' function Remove-InitiatorId { [CmdletBinding(DefaultParameterSetName='ByAddress', SupportsShouldProcess=$true, ConfirmImpact='Medium', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_InitiatorId')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByAddress', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ValidateNotNull()] [string[]] ${InitiatorAddress}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_InitiatorId')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByAddress')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByAddress')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByAddress')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByAddress')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('InitiatorAddress') -and (@('ByAddress') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${InitiatorAddress}) $__cmdletization_queryBuilder.FilterByProperty('InitiatorAddress', $__cmdletization_values, $false, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByAddress', 'InputObject (cdxml)') -contains $_ } { $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('DeleteObject', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP InitiatorId.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Remove-InitiatorId' -Alias '*' ScriptBlock ID: cb074ca7-9b78-4871-920e-5d9a246e7115 Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905089 Keywords=None Message=Completed invocation of ScriptBlock ID: 09c569a5-32a9-4ed6-86e0-8aa11f37eb29 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905088 Keywords=None Message=Started invocation of ScriptBlock ID: 09c569a5-32a9-4ed6-86e0-8aa11f37eb29 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905087 Keywords=None Message=Creating Scriptblock text (3 of 3): letization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Set', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByDesiredStorageTier') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FilePath')) { [object]$__cmdletization_value = ${FilePath} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FilePath'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FilePath'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('DesiredStorageTier')) { [object]$__cmdletization_value = ${DesiredStorageTier} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DesiredStorageTier'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DesiredStorageTier'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Set', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP FileStorageTier.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Set-FileStorageTier' -Alias '*' function Clear-FileStorageTier { [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='Medium', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Clear0', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [string] ${FilePath}, [Parameter(ParameterSetName='Clear0')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='Clear0')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='Clear0')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FilePath')) { [object]$__cmdletization_value = ${FilePath} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FilePath'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FilePath'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Clear', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP FileStorageTier.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Clear-FileStorageTier' -Alias '*' ScriptBlock ID: 09c569a5-32a9-4ed6-86e0-8aa11f37eb29 Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905086 Keywords=None Message=Creating Scriptblock text (2 of 3): defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Get', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByFilePath') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FilePath')) { [object]$__cmdletization_value = ${FilePath} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FilePath'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FilePath'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FileStorageTier'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Get', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP FileStorageTier.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-FileStorageTier' -Alias '*' function Set-FileStorageTier { [CmdletBinding(DefaultParameterSetName='ByDesiredStorageTierFriendlyName', SupportsShouldProcess=$true, ConfirmImpact='Medium', PositionalBinding=$false)] param( [Parameter(ParameterSetName='ByDesiredStorageTierUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByDesiredStorageTierFriendlyName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByDesiredStorageTier', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [string] ${FilePath}, [Parameter(ParameterSetName='ByDesiredStorageTierUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [string] ${DesiredStorageTierUniqueId}, [Parameter(ParameterSetName='ByDesiredStorageTierFriendlyName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [string] ${DesiredStorageTierFriendlyName}, [Parameter(ParameterSetName='ByDesiredStorageTier', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ciminstance] ${DesiredStorageTier}, [Parameter(ParameterSetName='ByDesiredStorageTierUniqueId')] [Parameter(ParameterSetName='ByDesiredStorageTierFriendlyName')] [Parameter(ParameterSetName='ByDesiredStorageTier')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByDesiredStorageTierUniqueId')] [Parameter(ParameterSetName='ByDesiredStorageTierFriendlyName')] [Parameter(ParameterSetName='ByDesiredStorageTier')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByDesiredStorageTierUniqueId')] [Parameter(ParameterSetName='ByDesiredStorageTierFriendlyName')] [Parameter(ParameterSetName='ByDesiredStorageTier')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByDesiredStorageTierUniqueId') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FilePath')) { [object]$__cmdletization_value = ${FilePath} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FilePath'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FilePath'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('DesiredStorageTierUniqueId')) { [object]$__cmdletization_value = ${DesiredStorageTierUniqueId} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DesiredStorageTierUniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DesiredStorageTierUniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Set', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByDesiredStorageTierFriendlyName') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FilePath')) { [object]$__cmdletization_value = ${FilePath} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FilePath'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FilePath'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('DesiredStorageTierFriendlyName')) { [object]$__cmdletization_value = ${DesiredStorageTierFriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DesiredStorageTierFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DesiredStorageTierFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmd ScriptBlock ID: 09c569a5-32a9-4ed6-86e0-8aa11f37eb29 Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905085 Keywords=None Message=Creating Scriptblock text (1 of 3): #requires -version 3.0 try { Microsoft.PowerShell.Core\Set-StrictMode -Off } catch { } $script:MyModule = $MyInvocation.MyCommand.ScriptBlock.Module $script:ClassName = 'ROOT/Microsoft/Windows/Storage/MSFT_FileStorageTier' $script:ClassVersion = '' $script:ModuleVersion = '1.0.0.0' $script:ObjectModelWrapper = [Microsoft.PowerShell.Cmdletization.Cim.CimCmdletAdapter] $script:PrivateData = [System.Collections.Generic.Dictionary[string,string]]::new() Microsoft.PowerShell.Core\Export-ModuleMember -Function @() function __cmdletization_BindCommonParameters { param( $__cmdletization_objectModelWrapper, $myPSBoundParameters ) if ($myPSBoundParameters.ContainsKey('CimSession')) { $__cmdletization_objectModelWrapper.PSObject.Properties['CimSession'].Value = $myPSBoundParameters['CimSession'] } if ($myPSBoundParameters.ContainsKey('ThrottleLimit')) { $__cmdletization_objectModelWrapper.PSObject.Properties['ThrottleLimit'].Value = $myPSBoundParameters['ThrottleLimit'] } if ($myPSBoundParameters.ContainsKey('AsJob')) { $__cmdletization_objectModelWrapper.PSObject.Properties['AsJob'].Value = $myPSBoundParameters['AsJob'] } } function Get-FileStorageTier { [CmdletBinding(DefaultParameterSetName='ByVolumeDriveLetter', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance[]])][OutputType([Microsoft.Management.Infrastructure.CimInstance[]])][OutputType([Microsoft.Management.Infrastructure.CimInstance[]])][OutputType([Microsoft.Management.Infrastructure.CimInstance[]])] param( [Parameter(ParameterSetName='ByVolumeDriveLetter', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [char] ${VolumeDriveLetter}, [Parameter(ParameterSetName='ByVolumePath', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [string] ${VolumePath}, [Parameter(ParameterSetName='ByVolume', Mandatory=$true, ValueFromPipeline=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ciminstance] ${Volume}, [Parameter(ParameterSetName='ByFilePath', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [string] ${FilePath}, [Parameter(ParameterSetName='ByVolumeDriveLetter')] [Parameter(ParameterSetName='ByVolumePath')] [Parameter(ParameterSetName='ByVolume')] [Parameter(ParameterSetName='ByFilePath')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByVolumeDriveLetter')] [Parameter(ParameterSetName='ByVolumePath')] [Parameter(ParameterSetName='ByVolume')] [Parameter(ParameterSetName='ByFilePath')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByVolumeDriveLetter')] [Parameter(ParameterSetName='ByVolumePath')] [Parameter(ParameterSetName='ByVolume')] [Parameter(ParameterSetName='ByFilePath')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByVolumeDriveLetter') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('VolumeDriveLetter')) { [object]$__cmdletization_value = ${VolumeDriveLetter} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VolumeDriveLetter'; ParameterType = 'System.Char'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VolumeDriveLetter'; ParameterType = 'System.Char'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FileStorageTier'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Get', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByVolumePath') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('VolumePath')) { [object]$__cmdletization_value = ${VolumePath} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VolumePath'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VolumePath'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FileStorageTier'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Get', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByVolume') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Volume')) { [object]$__cmdletization_value = ${Volume} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Volume'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Volume'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FileStorageTier'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_ ScriptBlock ID: 09c569a5-32a9-4ed6-86e0-8aa11f37eb29 Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905084 Keywords=None Message=Completed invocation of ScriptBlock ID: 66592e0d-0a5e-4867-87e2-414be1aa70a0 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905083 Keywords=None Message=Started invocation of ScriptBlock ID: 66592e0d-0a5e-4867-87e2-414be1aa70a0 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905082 Keywords=None Message=Creating Scriptblock text (3 of 3): Key('AccountName')) { [object]$__cmdletization_value = ${AccountName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AccountNames'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AccountNames'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('RevokeAccess', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP FileShare.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Revoke-FileShareAccess' -Alias '*' function Unblock-FileShareAccess { [CmdletBinding(DefaultParameterSetName='ByName', SupportsShouldProcess=$true, ConfirmImpact='Low', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_FileShare')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByName', Mandatory=$true)] [ValidateNotNull()] [string[]] ${Name}, [Parameter(ParameterSetName='ByName', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_FileServer')] [ValidateNotNull()] [ciminstance] ${FileServer}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_FileShare')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true)] [Parameter(ParameterSetName='ByName', Mandatory=$true)] [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true)] [ValidateNotNull()] [string[]] ${AccountName}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Name') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Name}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('FileServer') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${FileServer}, 'MSFT_FileServerToFileShare', 'FileServer', 'FileShare', 'SilentlyContinue') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('AccountName')) { [object]$__cmdletization_value = ${AccountName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AccountNames'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AccountNames'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('UnblockAccess', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP FileShare.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Unblock-FileShareAccess' -Alias '*' function Get-FileShareAccessControlEntry { [CmdletBinding(DefaultParameterSetName='ByName', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance[]])][OutputType('Microsoft.Management.Infrastructure.CimInstance#MSFT_FileShareAccessControlEntry[]')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByName', Mandatory=$true)] [ValidateNotNull()] [string[]] ${Name}, [Parameter(ParameterSetName='ByName', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_FileServer')] [ValidateNotNull()] [ciminstance] ${FileServer}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_FileShare')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Name') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Name}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('FileServer') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${FileServer}, 'MSFT_FileServerToFileShare', 'FileServer', 'FileShare', 'SilentlyContinue') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AccessControlEntries'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_FileShareAccessControlEntry[]' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('GetAccessControlEntries', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $false if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP FileShare.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-FileShareAccessControlEntry' -Alias '*' ScriptBlock ID: 66592e0d-0a5e-4867-87e2-414be1aa70a0 Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905081 Keywords=None Message=Creating Scriptblock text (2 of 3): tch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Name') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Name}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('FileServer') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${FileServer}, 'MSFT_FileServerToFileShare', 'FileServer', 'FileShare', 'SilentlyContinue') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('AccountName')) { [object]$__cmdletization_value = ${AccountName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AccountNames'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AccountNames'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('AccessRight')) { [object]$__cmdletization_value = ${AccessRight} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AccessRight'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.FileShare.AccessRight'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AccessRight'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.FileShare.AccessRight'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('GrantAccess', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP FileShare.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Grant-FileShareAccess' -Alias '*' function Block-FileShareAccess { [CmdletBinding(DefaultParameterSetName='ByName', SupportsShouldProcess=$true, ConfirmImpact='High', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_FileShare')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByName', Mandatory=$true)] [ValidateNotNull()] [string[]] ${Name}, [Parameter(ParameterSetName='ByName', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_FileServer')] [ValidateNotNull()] [ciminstance] ${FileServer}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_FileShare')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true)] [Parameter(ParameterSetName='ByName', Mandatory=$true)] [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true)] [ValidateNotNull()] [string[]] ${AccountName}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Name') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Name}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('FileServer') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${FileServer}, 'MSFT_FileServerToFileShare', 'FileServer', 'FileShare', 'SilentlyContinue') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('AccountName')) { [object]$__cmdletization_value = ${AccountName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AccountNames'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AccountNames'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('BlockAccess', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP FileShare.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Block-FileShareAccess' -Alias '*' function Revoke-FileShareAccess { [CmdletBinding(DefaultParameterSetName='ByName', SupportsShouldProcess=$true, ConfirmImpact='High', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_FileShare')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByName', Mandatory=$true)] [ValidateNotNull()] [string[]] ${Name}, [Parameter(ParameterSetName='ByName', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_FileServer')] [ValidateNotNull()] [ciminstance] ${FileServer}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_FileShare')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true)] [Parameter(ParameterSetName='ByName', Mandatory=$true)] [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true)] [ValidateNotNull()] [string[]] ${AccountName}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Name') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Name}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('FileServer') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${FileServer}, 'MSFT_FileServerToFileShare', 'FileServer', 'FileShare', 'SilentlyContinue') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.Contains ScriptBlock ID: 66592e0d-0a5e-4867-87e2-414be1aa70a0 Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905080 Keywords=None Message=Creating Scriptblock text (1 of 3): #requires -version 3.0 try { Microsoft.PowerShell.Core\Set-StrictMode -Off } catch { } $script:MyModule = $MyInvocation.MyCommand.ScriptBlock.Module $script:ClassName = 'ROOT/Microsoft/Windows/Storage/MSFT_FileShare' $script:ClassVersion = '' $script:ModuleVersion = '1.0.0.0' $script:ObjectModelWrapper = [Microsoft.PowerShell.Cmdletization.Cim.CimCmdletAdapter] $script:PrivateData = [System.Collections.Generic.Dictionary[string,string]]::new() Microsoft.PowerShell.Core\Export-ModuleMember -Function @() $script:PrivateData.Add('ClientSideShouldProcess', '') function __cmdletization_BindCommonParameters { param( $__cmdletization_objectModelWrapper, $myPSBoundParameters ) if ($myPSBoundParameters.ContainsKey('CimSession')) { $__cmdletization_objectModelWrapper.PSObject.Properties['CimSession'].Value = $myPSBoundParameters['CimSession'] } if ($myPSBoundParameters.ContainsKey('ThrottleLimit')) { $__cmdletization_objectModelWrapper.PSObject.Properties['ThrottleLimit'].Value = $myPSBoundParameters['ThrottleLimit'] } if ($myPSBoundParameters.ContainsKey('AsJob')) { $__cmdletization_objectModelWrapper.PSObject.Properties['AsJob'].Value = $myPSBoundParameters['AsJob'] } } function Get-FileShare { [CmdletBinding(DefaultParameterSetName='ByFileServer', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_FileShare')] param( [Parameter(ParameterSetName='ByUniqueId', ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByFileServer')] [Parameter(ParameterSetName='BySubsystem')] [Parameter(ParameterSetName='ByVolume')] [ValidateNotNull()] [string[]] ${Name}, [Parameter(ParameterSetName='ByFileServer')] [Parameter(ParameterSetName='BySubsystem')] [Parameter(ParameterSetName='ByVolume')] [ValidateNotNull()] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.FileShare.FileSharingProtocol[]] ${Protocol}, [Parameter(ParameterSetName='ByFileServer', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_FileServer')] [ValidateNotNull()] [ciminstance] ${FileServer}, [Parameter(ParameterSetName='BySubsystem', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageSubsystem')] [ValidateNotNull()] [ciminstance] ${Subsystem}, [Parameter(ParameterSetName='ByVolume', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Volume')] [ValidateNotNull()] [ciminstance] ${Volume}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFileServer')] [Parameter(ParameterSetName='BySubsystem')] [Parameter(ParameterSetName='ByVolume')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFileServer')] [Parameter(ParameterSetName='BySubsystem')] [Parameter(ParameterSetName='ByVolume')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFileServer')] [Parameter(ParameterSetName='BySubsystem')] [Parameter(ParameterSetName='ByVolume')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Name') -and (@('ByFileServer', 'BySubsystem', 'ByVolume') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Name}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Protocol') -and (@('ByFileServer', 'BySubsystem', 'ByVolume') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Protocol}) $__cmdletization_queryBuilder.FilterByProperty('FileSharingProtocol', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('FileServer') -and (@('ByFileServer') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${FileServer}, 'MSFT_FileServerToFileShare', 'FileServer', 'FileShare', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('Subsystem') -and (@('BySubsystem') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${Subsystem}, 'MSFT_StorageSubsystemToFileShare', 'StorageSubsystem', 'FileShare', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('Volume') -and (@('ByVolume') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${Volume}, 'MSFT_VolumeToFileShare', 'Volume', 'FileShare', 'SilentlyContinue') } $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder) } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP FileShare.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-FileShare' -Alias '*' function Remove-FileShare { [CmdletBinding(DefaultParameterSetName='ByName', SupportsShouldProcess=$true, ConfirmImpact='High', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_FileShare')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByName', Mandatory=$true)] [ValidateNotNull()] [string[]] ${Name}, [Parameter(ParameterSetName='ByName', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_FileServer')] [ValidateNotNull()] [ciminstance] ${FileServer}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_FileShare')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Name') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Name}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('FileServer') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${FileServer}, 'MSFT_FileServerToFileShare', 'FileServer', 'FileShare', 'SilentlyContinue') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('DeleteObject', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP FileShare.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Remove-FileShare' -Alias '*' function Grant-FileShareAccess { [CmdletBinding(DefaultParameterSetName='ByName', SupportsShouldProcess=$true, ConfirmImpact='Low', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_FileShare')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByName', Mandatory=$true)] [ValidateNotNull()] [string[]] ${Name}, [Parameter(ParameterSetName='ByName', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_FileServer')] [ValidateNotNull()] [ciminstance] ${FileServer}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_FileShare')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true)] [Parameter(ParameterSetName='ByName', Mandatory=$true)] [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true)] [ValidateNotNull()] [string[]] ${AccountName}, [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true)] [Parameter(ParameterSetName='ByName', Mandatory=$true)] [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true)] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.FileShare.AccessRight] ${AccessRight}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } ca ScriptBlock ID: 66592e0d-0a5e-4867-87e2-414be1aa70a0 Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905079 Keywords=None Message=Completed invocation of ScriptBlock ID: cd8661c3-5adb-4d85-8aef-d0c0302b85b3 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905078 Keywords=None Message=Started invocation of ScriptBlock ID: cd8661c3-5adb-4d85-8aef-d0c0302b85b3 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905077 Keywords=None Message=Creating Scriptblock text (2 of 2): verUniqueId}, [Parameter(ParameterSetName='ByName', Mandatory=$true)] [ValidateNotNull()] [string[]] ${FileServerFriendlyName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_FileServer')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true)] [Parameter(ParameterSetName='ByName', Mandatory=$true)] [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true)] [ValidateNotNull()] [string] ${Name}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [string] ${Description}, [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true)] [Parameter(ParameterSetName='ByName', Mandatory=$true)] [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Volume')] [ValidateNotNull()] [ciminstance] ${SourceVolume}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [string] ${RelativePathName}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [bool] ${ContinuouslyAvailable}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [bool] ${EncryptData}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.FileServer.FileSharingProtocol] ${Protocol}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('FileServerUniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FileServerUniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('FileServerFriendlyName') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FileServerFriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Name')) { [object]$__cmdletization_value = ${Name} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Name'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Name'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Description')) { [object]$__cmdletization_value = ${Description} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Description'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Description'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('SourceVolume')) { [object]$__cmdletization_value = ${SourceVolume} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'SourceVolume'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'SourceVolume'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_Volume' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('RelativePathName')) { [object]$__cmdletization_value = ${RelativePathName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VolumeRelativePath'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VolumeRelativePath'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ContinuouslyAvailable')) { [object]$__cmdletization_value = ${ContinuouslyAvailable} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ContinuouslyAvailable'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ContinuouslyAvailable'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('EncryptData')) { [object]$__cmdletization_value = ${EncryptData} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'EncryptData'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'EncryptData'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Protocol')) { [object]$__cmdletization_value = ${Protocol} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FileSharingProtocol'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.FileServer.FileSharingProtocol'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FileSharingProtocol'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.FileServer.FileSharingProtocol'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'CreatedFileShare'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('CreateFileShare', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $false if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP FileServer.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'New-FileShare' -Alias '*' ScriptBlock ID: cd8661c3-5adb-4d85-8aef-d0c0302b85b3 Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905076 Keywords=None Message=Creating Scriptblock text (1 of 2): #requires -version 3.0 try { Microsoft.PowerShell.Core\Set-StrictMode -Off } catch { } $script:MyModule = $MyInvocation.MyCommand.ScriptBlock.Module $script:ClassName = 'ROOT/Microsoft/Windows/Storage/MSFT_FileServer' $script:ClassVersion = '' $script:ModuleVersion = '1.0.0.0' $script:ObjectModelWrapper = [Microsoft.PowerShell.Cmdletization.Cim.CimCmdletAdapter] $script:PrivateData = [System.Collections.Generic.Dictionary[string,string]]::new() Microsoft.PowerShell.Core\Export-ModuleMember -Function @() $script:PrivateData.Add('ClientSideShouldProcess', '') function __cmdletization_BindCommonParameters { param( $__cmdletization_objectModelWrapper, $myPSBoundParameters ) if ($myPSBoundParameters.ContainsKey('CimSession')) { $__cmdletization_objectModelWrapper.PSObject.Properties['CimSession'].Value = $myPSBoundParameters['CimSession'] } if ($myPSBoundParameters.ContainsKey('ThrottleLimit')) { $__cmdletization_objectModelWrapper.PSObject.Properties['ThrottleLimit'].Value = $myPSBoundParameters['ThrottleLimit'] } if ($myPSBoundParameters.ContainsKey('AsJob')) { $__cmdletization_objectModelWrapper.PSObject.Properties['AsJob'].Value = $myPSBoundParameters['AsJob'] } } function Get-StorageFileServer { [CmdletBinding(DefaultParameterSetName='ByName', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_FileServer')] param( [Parameter(ParameterSetName='ByUniqueId', ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByName')] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='BySubsystem', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageSubsystem')] [ValidateNotNull()] [ciminstance] ${Subsystem}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='BySubsystem')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='BySubsystem')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='BySubsystem')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Subsystem') -and (@('BySubsystem') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${Subsystem}, 'MSFT_StorageSubsystemToFileServer', 'StorageSubsystem', 'FileServer', 'SilentlyContinue') } $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder) } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP FileServer.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-StorageFileServer' -Alias '*' function Remove-StorageFileServer { [CmdletBinding(DefaultParameterSetName='ByName', SupportsShouldProcess=$true, ConfirmImpact='High', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_FileServer')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByName')] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_FileServer')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('DeleteObject', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP FileServer.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Remove-StorageFileServer' -Alias '*' function Set-StorageFileServer { [CmdletBinding(DefaultParameterSetName='ByName', SupportsShouldProcess=$true, ConfirmImpact='Low', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_FileServer')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByName')] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_FileServer')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true)] [Parameter(ParameterSetName='ByName', Mandatory=$true)] [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true)] [ValidateNotNull()] [string] ${NewFriendlyName}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NewFriendlyName')) { [object]$__cmdletization_value = ${NewFriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetFriendlyName', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP FileServer.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Set-StorageFileServer' -Alias '*' function New-FileShare { [CmdletBinding(DefaultParameterSetName='ByName', SupportsShouldProcess=$true, ConfirmImpact='Low', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${FileSer ScriptBlock ID: cd8661c3-5adb-4d85-8aef-d0c0302b85b3 Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905075 Keywords=None Message=Completed invocation of ScriptBlock ID: b0da38b9-6445-4472-bb1b-dbfc744f8a30 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905074 Keywords=None Message=Started invocation of ScriptBlock ID: b0da38b9-6445-4472-bb1b-dbfc744f8a30 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905073 Keywords=None Message=Creating Scriptblock text (1 of 1): #requires -version 3.0 try { Microsoft.PowerShell.Core\Set-StrictMode -Off } catch { } $script:MyModule = $MyInvocation.MyCommand.ScriptBlock.Module $script:ClassName = 'ROOT/Microsoft/Windows/Storage/MSFT_FileIntegrity' $script:ClassVersion = '' $script:ModuleVersion = '1.0.0.0' $script:ObjectModelWrapper = [Microsoft.PowerShell.Cmdletization.Cim.CimCmdletAdapter] $script:PrivateData = [System.Collections.Generic.Dictionary[string,string]]::new() Microsoft.PowerShell.Core\Export-ModuleMember -Function @() function __cmdletization_BindCommonParameters { param( $__cmdletization_objectModelWrapper, $myPSBoundParameters ) if ($myPSBoundParameters.ContainsKey('CimSession')) { $__cmdletization_objectModelWrapper.PSObject.Properties['CimSession'].Value = $myPSBoundParameters['CimSession'] } if ($myPSBoundParameters.ContainsKey('ThrottleLimit')) { $__cmdletization_objectModelWrapper.PSObject.Properties['ThrottleLimit'].Value = $myPSBoundParameters['ThrottleLimit'] } if ($myPSBoundParameters.ContainsKey('AsJob')) { $__cmdletization_objectModelWrapper.PSObject.Properties['AsJob'].Value = $myPSBoundParameters['AsJob'] } } function Get-FileIntegrity { [CmdletBinding(PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])][OutputType('Microsoft.Management.Infrastructure.CimInstance#MSFT_FileIntegrity')] param( [Parameter(ParameterSetName='Get0', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [Alias('FullName')] [string] ${FileName}, [Parameter(ParameterSetName='Get0')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='Get0')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='Get0')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FileName')) { [object]$__cmdletization_value = ${FileName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FileName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FileName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FileIntegrity'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_FileIntegrity' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Get', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP FileIntegrity.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-FileIntegrity' -Alias '*' function Set-FileIntegrity { [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='Medium', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Set1', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [Alias('FullName')] [string] ${FileName}, [Parameter(ParameterSetName='Set1', Position=1)] [bool] ${Enable}, [Parameter(ParameterSetName='Set1')] [bool] ${Enforce}, [Parameter(ParameterSetName='Set1')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='Set1')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='Set1')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FileName')) { [object]$__cmdletization_value = ${FileName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FileName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FileName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Enable')) { [object]$__cmdletization_value = ${Enable} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Enable'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Enable'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Enforce')) { [object]$__cmdletization_value = ${Enforce} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Enforce'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Enforce'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Set', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP FileIntegrity.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Set-FileIntegrity' -Alias '*' function Repair-FileIntegrity { [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='Medium', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Repair2', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [Alias('FullName')] [string] ${FileName}, [Parameter(ParameterSetName='Repair2')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='Repair2')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='Repair2')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FileName')) { [object]$__cmdletization_value = ${FileName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FileName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FileName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Repair', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP FileIntegrity.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Repair-FileIntegrity' -Alias '*' ScriptBlock ID: b0da38b9-6445-4472-bb1b-dbfc744f8a30 Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905072 Keywords=None Message=Completed invocation of ScriptBlock ID: a78b8faf-75a4-425f-9ca1-4c06fdde8e8d Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905071 Keywords=None Message=Started invocation of ScriptBlock ID: a78b8faf-75a4-425f-9ca1-4c06fdde8e8d Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905070 Keywords=None Message=Creating Scriptblock text (2 of 2): tization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP DiskImage.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Mount-DiskImage' -Alias '*' function Dismount-DiskImage { [CmdletBinding(DefaultParameterSetName='ByImagePath', SupportsShouldProcess=$true, ConfirmImpact='Medium', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_DiskImage')] param( [Parameter(ParameterSetName='ByImagePath', Mandatory=$true, Position=0, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [string[]] ${ImagePath}, [Parameter(ParameterSetName='ByDevicePath', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [string[]] ${DevicePath}, [Parameter(ParameterSetName='ByImagePath', ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByDevicePath', ValueFromPipelineByPropertyName=$true)] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.DiskImage.StorageType] ${StorageType}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_DiskImage')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByImagePath')] [Parameter(ParameterSetName='ByDevicePath')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByImagePath')] [Parameter(ParameterSetName='ByDevicePath')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByImagePath')] [Parameter(ParameterSetName='ByDevicePath')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByImagePath')] [Parameter(ParameterSetName='ByDevicePath')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('ImagePath') -and (@('ByImagePath') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.AddQueryOption('ImagePath', ${ImagePath}) } if ($PSBoundParameters.ContainsKey('DevicePath') -and (@('ByDevicePath') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.AddQueryOption('DevicePath', ${DevicePath}) } if ($PSBoundParameters.ContainsKey('StorageType') -and (@('ByImagePath', 'ByDevicePath') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.AddQueryOption('VirtualStorageTypeDeviceId', ${StorageType}) } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByImagePath', 'ByDevicePath', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Dismount', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP DiskImage.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Dismount-DiskImage' -Alias '*' ScriptBlock ID: a78b8faf-75a4-425f-9ca1-4c06fdde8e8d Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905069 Keywords=None Message=Creating Scriptblock text (1 of 2): #requires -version 3.0 try { Microsoft.PowerShell.Core\Set-StrictMode -Off } catch { } $script:MyModule = $MyInvocation.MyCommand.ScriptBlock.Module $script:ClassName = 'ROOT/Microsoft/Windows/Storage/MSFT_DiskImage' $script:ClassVersion = '' $script:ModuleVersion = '1.0.0.0' $script:ObjectModelWrapper = [Microsoft.PowerShell.Cmdletization.Cim.CimCmdletAdapter] $script:PrivateData = [System.Collections.Generic.Dictionary[string,string]]::new() Microsoft.PowerShell.Core\Export-ModuleMember -Function @() function __cmdletization_BindCommonParameters { param( $__cmdletization_objectModelWrapper, $myPSBoundParameters ) if ($myPSBoundParameters.ContainsKey('CimSession')) { $__cmdletization_objectModelWrapper.PSObject.Properties['CimSession'].Value = $myPSBoundParameters['CimSession'] } if ($myPSBoundParameters.ContainsKey('ThrottleLimit')) { $__cmdletization_objectModelWrapper.PSObject.Properties['ThrottleLimit'].Value = $myPSBoundParameters['ThrottleLimit'] } if ($myPSBoundParameters.ContainsKey('AsJob')) { $__cmdletization_objectModelWrapper.PSObject.Properties['AsJob'].Value = $myPSBoundParameters['AsJob'] } } function Get-DiskImage { [CmdletBinding(DefaultParameterSetName='ByImagePath', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_DiskImage')] param( [Parameter(ParameterSetName='ByVolume', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Volume')] [ValidateNotNull()] [ciminstance] ${Volume}, [Parameter(ParameterSetName='ByImagePath', Mandatory=$true, Position=0, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [string[]] ${ImagePath}, [Parameter(ParameterSetName='ByDevicePath', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [string[]] ${DevicePath}, [Parameter(ParameterSetName='ByVolume', ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByImagePath', ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByDevicePath', ValueFromPipelineByPropertyName=$true)] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.DiskImage.StorageType] ${StorageType}, [Parameter(ParameterSetName='ByVolume')] [Parameter(ParameterSetName='ByImagePath')] [Parameter(ParameterSetName='ByDevicePath')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByVolume')] [Parameter(ParameterSetName='ByImagePath')] [Parameter(ParameterSetName='ByDevicePath')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByVolume')] [Parameter(ParameterSetName='ByImagePath')] [Parameter(ParameterSetName='ByDevicePath')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('Volume') -and (@('ByVolume') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${Volume}, 'MSFT_DiskImageToVolume', 'Volume', 'DiskImage', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('ImagePath') -and (@('ByImagePath') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.AddQueryOption('ImagePath', ${ImagePath}) } if ($PSBoundParameters.ContainsKey('DevicePath') -and (@('ByDevicePath') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.AddQueryOption('DevicePath', ${DevicePath}) } if ($PSBoundParameters.ContainsKey('StorageType') -and (@('ByVolume', 'ByImagePath', 'ByDevicePath') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.AddQueryOption('VirtualStorageTypeDeviceId', ${StorageType}) } $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder) } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP DiskImage.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-DiskImage' -Alias '*' function Mount-DiskImage { [CmdletBinding(DefaultParameterSetName='ByImagePath', SupportsShouldProcess=$true, ConfirmImpact='Medium', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_DiskImage')] param( [Parameter(ParameterSetName='ByImagePath', Mandatory=$true, Position=0, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [string[]] ${ImagePath}, [Parameter(ParameterSetName='ByImagePath', ValueFromPipelineByPropertyName=$true)] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.DiskImage.StorageType] ${StorageType}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_DiskImage')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByImagePath')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.DiskImage.Access] ${Access}, [Parameter(ParameterSetName='ByImagePath')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${NoDriveLetter}, [Parameter(ParameterSetName='ByImagePath')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByImagePath')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByImagePath')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByImagePath')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('ImagePath') -and (@('ByImagePath') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.AddQueryOption('ImagePath', ${ImagePath}) } if ($PSBoundParameters.ContainsKey('StorageType') -and (@('ByImagePath') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.AddQueryOption('VirtualStorageTypeDeviceId', ${StorageType}) } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByImagePath', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Access')) { [object]$__cmdletization_value = ${Access} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Access'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.DiskImage.Access'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Access'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.DiskImage.Access'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NoDriveLetter')) { [object]$__cmdletization_value = ${NoDriveLetter} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NoDriveLetter'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NoDriveLetter'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Mount', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdle ScriptBlock ID: a78b8faf-75a4-425f-9ca1-4c06fdde8e8d Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905068 Keywords=None Message=Completed invocation of ScriptBlock ID: 05e9905f-b265-4bfc-acd4-e60e3af264cc Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905067 Keywords=None Message=Started invocation of ScriptBlock ID: 05e9905f-b265-4bfc-acd4-e60e3af264cc Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905066 Keywords=None Message=Creating Scriptblock text (8 of 8): } # .EXTERNALHELP Disk.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Disable-StorageHighAvailability' -Alias '*' ScriptBlock ID: 05e9905f-b265-4bfc-acd4-e60e3af264cc Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905065 Keywords=None Message=Creating Scriptblock text (7 of 8): $PSCmdlet.ParameterSetName) { { @('ByDiskUniqueId', 'ByDiskName', 'ByDiskPath', 'ByDiskNumber', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ScaleOut')) { [object]$__cmdletization_value = ${ScaleOut} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ScaleOut'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ScaleOut'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('EnableHighAvailability', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP Disk.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Enable-StorageHighAvailability' -Alias '*' function Disable-StorageHighAvailability { [CmdletBinding(DefaultParameterSetName='ByDiskNumber', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Disk')] param( [Parameter(ParameterSetName='ByDiskUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('DiskId')] [ValidateNotNull()] [string[]] ${DiskUniqueId}, [Parameter(ParameterSetName='ByDiskName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${DiskFriendlyName}, [Parameter(ParameterSetName='ByDiskPath', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${DiskPath}, [Parameter(ParameterSetName='ByDiskNumber', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [uint32[]] ${DiskNumber}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Disk')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByDiskUniqueId')] [Parameter(ParameterSetName='ByDiskName')] [Parameter(ParameterSetName='ByDiskPath')] [Parameter(ParameterSetName='ByDiskNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByDiskUniqueId')] [Parameter(ParameterSetName='ByDiskName')] [Parameter(ParameterSetName='ByDiskPath')] [Parameter(ParameterSetName='ByDiskNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByDiskUniqueId')] [Parameter(ParameterSetName='ByDiskName')] [Parameter(ParameterSetName='ByDiskPath')] [Parameter(ParameterSetName='ByDiskNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByDiskUniqueId')] [Parameter(ParameterSetName='ByDiskName')] [Parameter(ParameterSetName='ByDiskPath')] [Parameter(ParameterSetName='ByDiskNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('DiskUniqueId') -and (@('ByDiskUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DiskUniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('DiskFriendlyName') -and (@('ByDiskName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DiskFriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('DiskPath') -and (@('ByDiskPath') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DiskPath}) $__cmdletization_queryBuilder.FilterByProperty('Path', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('DiskNumber') -and (@('ByDiskNumber') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DiskNumber}) $__cmdletization_queryBuilder.FilterByProperty('Number', $__cmdletization_values, $false, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByDiskUniqueId', 'ByDiskName', 'ByDiskPath', 'ByDiskNumber', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('DisableHighAvailability', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } ScriptBlock ID: 05e9905f-b265-4bfc-acd4-e60e3af264cc Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905064 Keywords=None Message=Creating Scriptblock text (6 of 8): $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Path') -and (@('ByPath') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Path}) $__cmdletization_queryBuilder.FilterByProperty('Path', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Number') -and (@('ByNumber') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Number}) $__cmdletization_queryBuilder.FilterByProperty('Number', $__cmdletization_values, $false, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByName', 'ByPath', 'ByNumber', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Refresh', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP Disk.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Update-Disk' -Alias '*' function Enable-StorageHighAvailability { [CmdletBinding(DefaultParameterSetName='ByDiskNumber', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Disk')] param( [Parameter(ParameterSetName='ByDiskUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('DiskId')] [ValidateNotNull()] [string[]] ${DiskUniqueId}, [Parameter(ParameterSetName='ByDiskName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${DiskFriendlyName}, [Parameter(ParameterSetName='ByDiskPath', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${DiskPath}, [Parameter(ParameterSetName='ByDiskNumber', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [uint32[]] ${DiskNumber}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Disk')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByDiskUniqueId')] [Parameter(ParameterSetName='ByDiskName')] [Parameter(ParameterSetName='ByDiskPath')] [Parameter(ParameterSetName='ByDiskNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [bool] ${ScaleOut}, [Parameter(ParameterSetName='ByDiskUniqueId')] [Parameter(ParameterSetName='ByDiskName')] [Parameter(ParameterSetName='ByDiskPath')] [Parameter(ParameterSetName='ByDiskNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByDiskUniqueId')] [Parameter(ParameterSetName='ByDiskName')] [Parameter(ParameterSetName='ByDiskPath')] [Parameter(ParameterSetName='ByDiskNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByDiskUniqueId')] [Parameter(ParameterSetName='ByDiskName')] [Parameter(ParameterSetName='ByDiskPath')] [Parameter(ParameterSetName='ByDiskNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByDiskUniqueId')] [Parameter(ParameterSetName='ByDiskName')] [Parameter(ParameterSetName='ByDiskPath')] [Parameter(ParameterSetName='ByDiskNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('DiskUniqueId') -and (@('ByDiskUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DiskUniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('DiskFriendlyName') -and (@('ByDiskName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DiskFriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('DiskPath') -and (@('ByDiskPath') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DiskPath}) $__cmdletization_queryBuilder.FilterByProperty('Path', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('DiskNumber') -and (@('ByDiskNumber') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DiskNumber}) $__cmdletization_queryBuilder.FilterByProperty('Number', $__cmdletization_values, $false, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ( ScriptBlock ID: 05e9905f-b265-4bfc-acd4-e60e3af264cc Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905063 Keywords=None Message=Creating Scriptblock text (5 of 8): PowerShell.Cmdletization.MethodParameter]@{Name = 'DriveLetter'; ParameterType = 'System.Char'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DriveLetter'; ParameterType = 'System.Char'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('AssignDriveLetter')) { [object]$__cmdletization_value = ${AssignDriveLetter} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AssignDriveLetter'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AssignDriveLetter'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('MbrType')) { [object]$__cmdletization_value = ${MbrType} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MbrType'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Disk.CreatePartition.MbrType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MbrType'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Disk.CreatePartition.MbrType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('GptType')) { [object]$__cmdletization_value = ${GptType} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'GptType'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'GptType'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsHidden')) { [object]$__cmdletization_value = ${IsHidden} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsHidden'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsHidden'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsActive')) { [object]$__cmdletization_value = ${IsActive} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsActive'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsActive'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'CreatedPartition'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_Partition' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('CreatePartition', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $false if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP Disk.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'New-Partition' -Alias '*' function Update-Disk { [CmdletBinding(DefaultParameterSetName='ByNumber', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Disk')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByName', ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='ByPath', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Path}, [Parameter(ParameterSetName='ByNumber', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [uint32[]] ${Number}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Disk')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { ScriptBlock ID: 05e9905f-b265-4bfc-acd4-e60e3af264cc Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905062 Keywords=None Message=Creating Scriptblock text (4 of 8): string[]] ${DiskId}, [Parameter(ParameterSetName='ByPath', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${DiskPath}, [Parameter(ParameterSetName='ByNumber', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [uint32[]] ${DiskNumber}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Disk')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [uint64] ${Size}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [switch] ${UseMaximumSize}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [uint64] ${Offset}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [uint32] ${Alignment}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('NewDriveLetter')] [char] ${DriveLetter}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AssignDriveLetter}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.Disk.CreatePartition.MbrType] ${MbrType}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${GptType}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${IsHidden}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${IsActive}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('DiskId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DiskId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('DiskPath') -and (@('ByPath') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DiskPath}) $__cmdletization_queryBuilder.FilterByProperty('Path', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('DiskNumber') -and (@('ByNumber') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DiskNumber}) $__cmdletization_queryBuilder.FilterByProperty('Number', $__cmdletization_values, $false, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByPath', 'ByNumber', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Size')) { [object]$__cmdletization_value = ${Size} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Size'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Size'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('UseMaximumSize')) { [object]$__cmdletization_value = ${UseMaximumSize} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UseMaximumSize'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UseMaximumSize'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Offset')) { [object]$__cmdletization_value = ${Offset} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Offset'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Offset'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Alignment')) { [object]$__cmdletization_value = ${Alignment} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Alignment'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Alignment'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('DriveLetter')) { [object]$__cmdletization_value = ${DriveLetter} $__cmdletization_methodParameter = [Microsoft. ScriptBlock ID: 05e9905f-b265-4bfc-acd4-e60e3af264cc Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905061 Keywords=None Message=Creating Scriptblock text (3 of 8): { throw } } # .EXTERNALHELP Disk.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Initialize-Disk' -Alias '*' function Clear-Disk { [CmdletBinding(DefaultParameterSetName='ByNumber', SupportsShouldProcess=$true, ConfirmImpact='High', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Disk')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByName', ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='ByPath', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Path}, [Parameter(ParameterSetName='ByNumber', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [uint32[]] ${Number}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Disk')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${RemoveData}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${RemoveOEM}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Path') -and (@('ByPath') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Path}) $__cmdletization_queryBuilder.FilterByProperty('Path', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Number') -and (@('ByNumber') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Number}) $__cmdletization_queryBuilder.FilterByProperty('Number', $__cmdletization_values, $false, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByName', 'ByPath', 'ByNumber', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('RemoveData')) { [object]$__cmdletization_value = ${RemoveData} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'RemoveData'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'RemoveData'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('RemoveOEM')) { [object]$__cmdletization_value = ${RemoveOEM} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'RemoveOEM'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'RemoveOEM'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Clear', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP Disk.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Clear-Disk' -Alias '*' function New-Partition { [CmdletBinding(DefaultParameterSetName='ByNumber', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])][OutputType('Microsoft.Management.Infrastructure.CimInstance#MSFT_Partition')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [ ScriptBlock ID: 05e9905f-b265-4bfc-acd4-e60e3af264cc Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905060 Keywords=None Message=Creating Scriptblock text (2 of 8): FilterByAssociatedInstance(${StorageNode}, 'MSFT_StorageNodeToDisk', 'StorageNode', 'Disk', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('StorageJob') -and (@('ByStorageJob') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StorageJob}, 'MSFT_StorageJobToAffectedStorageObject', 'StorageJob', 'AffectedStorageObject', 'SilentlyContinue') } $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder) } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP Disk.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-Disk' -Alias '*' function Initialize-Disk { [CmdletBinding(DefaultParameterSetName='ByNumber', SupportsShouldProcess=$true, ConfirmImpact='Medium', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Disk')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByName', ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='ByPath', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Path}, [Parameter(ParameterSetName='ByNumber', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [uint32[]] ${Number}, [Parameter(ParameterSetName='ByVirtualDisk', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_VirtualDisk')] [ValidateNotNull()] [ciminstance] ${VirtualDisk}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Disk')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.Disk.PartitionStyle] ${PartitionStyle}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Path') -and (@('ByPath') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Path}) $__cmdletization_queryBuilder.FilterByProperty('Path', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Number') -and (@('ByNumber') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Number}) $__cmdletization_queryBuilder.FilterByProperty('Number', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('VirtualDisk') -and (@('ByVirtualDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${VirtualDisk}, 'MSFT_VirtualDiskToDisk', 'VirtualDisk', 'Disk', 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByName', 'ByPath', 'ByNumber', 'ByVirtualDisk', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PartitionStyle')) { [object]$__cmdletization_value = ${PartitionStyle} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PartitionStyle'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Disk.PartitionStyle'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PartitionStyle'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Disk.PartitionStyle'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Initialize', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch ScriptBlock ID: 05e9905f-b265-4bfc-acd4-e60e3af264cc Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905059 Keywords=None Message=Creating Scriptblock text (1 of 8): #requires -version 3.0 try { Microsoft.PowerShell.Core\Set-StrictMode -Off } catch { } $script:MyModule = $MyInvocation.MyCommand.ScriptBlock.Module $script:ClassName = 'ROOT/Microsoft/Windows/Storage/MSFT_Disk' $script:ClassVersion = '' $script:ModuleVersion = '1.0.0.0' $script:ObjectModelWrapper = [Microsoft.PowerShell.Cmdletization.Cim.CimCmdletAdapter] $script:PrivateData = [System.Collections.Generic.Dictionary[string,string]]::new() Microsoft.PowerShell.Core\Export-ModuleMember -Function @() function __cmdletization_BindCommonParameters { param( $__cmdletization_objectModelWrapper, $myPSBoundParameters ) if ($myPSBoundParameters.ContainsKey('CimSession')) { $__cmdletization_objectModelWrapper.PSObject.Properties['CimSession'].Value = $myPSBoundParameters['CimSession'] } if ($myPSBoundParameters.ContainsKey('ThrottleLimit')) { $__cmdletization_objectModelWrapper.PSObject.Properties['ThrottleLimit'].Value = $myPSBoundParameters['ThrottleLimit'] } if ($myPSBoundParameters.ContainsKey('AsJob')) { $__cmdletization_objectModelWrapper.PSObject.Properties['AsJob'].Value = $myPSBoundParameters['AsJob'] } } function Get-Disk { [CmdletBinding(DefaultParameterSetName='ByNumber', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Disk')] param( [Parameter(ParameterSetName='ByUniqueId')] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByName')] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='ByName')] [ValidateNotNull()] [string[]] ${SerialNumber}, [Parameter(ParameterSetName='ByPath', ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Path}, [Parameter(ParameterSetName='ByNumber', Position=0, ValueFromPipelineByPropertyName=$true)] [Alias('DeviceId')] [ValidateNotNull()] [uint32[]] ${Number}, [Parameter(ParameterSetName='ByPartition', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Partition')] [ValidateNotNull()] [ciminstance] ${Partition}, [Parameter(ParameterSetName='ByVirtualDisk', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_VirtualDisk')] [ValidateNotNull()] [ciminstance] ${VirtualDisk}, [Parameter(ParameterSetName='ByiSCSISession', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_iSCSISession')] [ValidateNotNull()] [ciminstance] ${iSCSISession}, [Parameter(ParameterSetName='ByiSCSIConnection', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_iSCSIConnection')] [ValidateNotNull()] [ciminstance] ${iSCSIConnection}, [Parameter(ParameterSetName='ByStorageSubSystem', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageSubSystem')] [ValidateNotNull()] [ciminstance] ${StorageSubSystem}, [Parameter(ParameterSetName='ByStorageNode', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageNode')] [ValidateNotNull()] [ciminstance] ${StorageNode}, [Parameter(ParameterSetName='ByStorageJob', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageJob')] [ValidateNotNull()] [ciminstance] ${StorageJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByPartition')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByiSCSISession')] [Parameter(ParameterSetName='ByiSCSIConnection')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStorageNode')] [Parameter(ParameterSetName='ByStorageJob')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByPartition')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByiSCSISession')] [Parameter(ParameterSetName='ByiSCSIConnection')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStorageNode')] [Parameter(ParameterSetName='ByStorageJob')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByPartition')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByiSCSISession')] [Parameter(ParameterSetName='ByiSCSIConnection')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStorageNode')] [Parameter(ParameterSetName='ByStorageJob')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('SerialNumber') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${SerialNumber}) $__cmdletization_queryBuilder.FilterByProperty('SerialNumber', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Path') -and (@('ByPath') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Path}) $__cmdletization_queryBuilder.FilterByProperty('Path', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Number') -and (@('ByNumber') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Number}) $__cmdletization_queryBuilder.FilterByProperty('Number', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('Partition') -and (@('ByPartition') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${Partition}, 'MSFT_DiskToPartition', 'Partition', 'Disk', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('VirtualDisk') -and (@('ByVirtualDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${VirtualDisk}, 'MSFT_VirtualDiskToDisk', 'VirtualDisk', 'Disk', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('iSCSISession') -and (@('ByiSCSISession') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${iSCSISession}, 'MSFT_iSCSISessionToDisk', 'iSCSISession', 'Disk', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('iSCSIConnection') -and (@('ByiSCSIConnection') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${iSCSIConnection}, 'MSFT_iSCSIConnectionToDisk', 'iSCSIConnection', 'Disk', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('StorageSubSystem') -and (@('ByStorageSubSystem') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StorageSubSystem}, 'MSFT_StorageSubSystemToDisk', 'StorageSubSystem', 'Disk', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('StorageNode') -and (@('ByStorageNode') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder. ScriptBlock ID: 05e9905f-b265-4bfc-acd4-e60e3af264cc Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905058 Keywords=None Message=Completed invocation of ScriptBlock ID: 7f6e62f6-a7ca-49f9-8c16-059ae6317422 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905057 Keywords=None Message=Started invocation of ScriptBlock ID: 7f6e62f6-a7ca-49f9-8c16-059ae6317422 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905056 Keywords=None Message=Started invocation of ScriptBlock ID: 1eb43eb6-d6d2-4b5a-add5-1549747e4e94 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905055 Keywords=None Message=Creating Scriptblock text (1 of 1): Get-FileIntegrity ScriptBlock ID: 1eb43eb6-d6d2-4b5a-add5-1549747e4e94 Path: 08/24/2021 08:33:54 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905054 Keywords=None Message=Completed invocation of ScriptBlock ID: abfb964d-7dd6-4f93-a45a-c1e7ff9cddd4 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905228 Keywords=None Message=Completed invocation of ScriptBlock ID: 04b215bd-df54-4c4f-a08a-968c11f98290 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905227 Keywords=None Message=Started invocation of ScriptBlock ID: 04b215bd-df54-4c4f-a08a-968c11f98290 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905226 Keywords=None Message=Completed invocation of ScriptBlock ID: cae66298-8632-4bfd-ac27-9c2a47d6aeca Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905225 Keywords=None Message=Started invocation of ScriptBlock ID: cae66298-8632-4bfd-ac27-9c2a47d6aeca Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905224 Keywords=None Message=Creating Scriptblock text (6 of 6): n_values = @(${ObjectId}) $__cmdletization_queryBuilder.FilterByProperty('ObjectId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Path') -and (@('ByPaths') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Path}) $__cmdletization_queryBuilder.FilterByProperty('Path', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('FileSystemLabel') -and (@('ByLabel') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FileSystemLabel}) $__cmdletization_queryBuilder.FilterByProperty('FileSystemLabel', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('DriveLetter') -and (@('ByDriveLetter') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DriveLetter}) $__cmdletization_queryBuilder.FilterByProperty('DriveLetter', $__cmdletization_values, $false, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ById', 'ByPaths', 'ByLabel', 'ByDriveLetter', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Enable')) { [object]$__cmdletization_value = ${Enable} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'EnableVolumeScrub'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'EnableVolumeScrub'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetAttributes', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP Volume.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Set-VolumeScrubPolicy' -Alias '*' function Write-VolumeCache { [CmdletBinding(DefaultParameterSetName='ByDriveLetter', PositionalBinding=$false)] [Alias('Write-FileSystemCache','Flush-Volume')] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Volume')] param( [Parameter(ParameterSetName='ById', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${ObjectId}, [Parameter(ParameterSetName='ByPaths', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Path}, [Parameter(ParameterSetName='ByLabel', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FileSystemLabel}, [Parameter(ParameterSetName='ByDriveLetter', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [char[]] ${DriveLetter}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Volume')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('ObjectId') -and (@('ById') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${ObjectId}) $__cmdletization_queryBuilder.FilterByProperty('ObjectId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Path') -and (@('ByPaths') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Path}) $__cmdletization_queryBuilder.FilterByProperty('Path', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('FileSystemLabel') -and (@('ByLabel') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FileSystemLabel}) $__cmdletization_queryBuilder.FilterByProperty('FileSystemLabel', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('DriveLetter') -and (@('ByDriveLetter') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DriveLetter}) $__cmdletization_queryBuilder.FilterByProperty('DriveLetter', $__cmdletization_values, $false, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ById', 'ByPaths', 'ByLabel', 'ByDriveLetter', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Flush', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP Volume.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Write-VolumeCache' -Alias '*' function Get-DedupProperties { [CmdletBinding(DefaultParameterSetName='ByDriveLetter', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] param( [Parameter(ParameterSetName='ById', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${ObjectId}, [Parameter(ParameterSetName='ByPaths', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Path}, [Parameter(ParameterSetName='ByLabel', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FileSystemLabel}, [Parameter(ParameterSetName='ByDriveLetter', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [char[]] ${DriveLetter}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Volume')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('ObjectId') -and (@('ById') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${ObjectId}) $__cmdletization_queryBuilder.FilterByProperty('ObjectId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Path') -and (@('ByPaths') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Path}) $__cmdletization_queryBuilder.FilterByProperty('Path', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('FileSystemLabel') -and (@('ByLabel') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FileSystemLabel}) $__cmdletization_queryBuilder.FilterByProperty('FileSystemLabel', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('DriveLetter') -and (@('ByDriveLetter') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DriveLetter}) $__cmdletization_queryBuilder.FilterByProperty('DriveLetter', $__cmdletization_values, $false, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ById', 'ByPaths', 'ByLabel', 'ByDriveLetter', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DedupProperties'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('GetDedupProperties', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $false if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP Volume.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-DedupProperties' -Alias '*' ScriptBlock ID: cae66298-8632-4bfd-ac27-9c2a47d6aeca Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905223 Keywords=None Message=Creating Scriptblock text (5 of 6): crosoft.PowerShell.Core\Export-ModuleMember -Function 'Get-SupportedClusterSizes' -Alias '*' function Get-VolumeCorruptionCount { [CmdletBinding(DefaultParameterSetName='ByDriveLetter', PositionalBinding=$false)] [OutputType([System.UInt32])] param( [Parameter(ParameterSetName='ById', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${ObjectId}, [Parameter(ParameterSetName='ByPaths', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Path}, [Parameter(ParameterSetName='ByLabel', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FileSystemLabel}, [Parameter(ParameterSetName='ByDriveLetter', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [char[]] ${DriveLetter}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Volume')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('ObjectId') -and (@('ById') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${ObjectId}) $__cmdletization_queryBuilder.FilterByProperty('ObjectId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Path') -and (@('ByPaths') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Path}) $__cmdletization_queryBuilder.FilterByProperty('Path', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('FileSystemLabel') -and (@('ByLabel') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FileSystemLabel}) $__cmdletization_queryBuilder.FilterByProperty('FileSystemLabel', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('DriveLetter') -and (@('ByDriveLetter') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DriveLetter}) $__cmdletization_queryBuilder.FilterByProperty('DriveLetter', $__cmdletization_values, $false, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ById', 'ByPaths', 'ByLabel', 'ByDriveLetter', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'CorruptionCount'; ParameterType = 'System.UInt32'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('GetCorruptionCount', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $false if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP Volume.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-VolumeCorruptionCount' -Alias '*' function Get-VolumeScrubPolicy { [CmdletBinding(DefaultParameterSetName='ByDriveLetter', PositionalBinding=$false)] [OutputType([System.Boolean])] param( [Parameter(ParameterSetName='ById', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${ObjectId}, [Parameter(ParameterSetName='ByPaths', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Path}, [Parameter(ParameterSetName='ByLabel', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FileSystemLabel}, [Parameter(ParameterSetName='ByDriveLetter', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [char[]] ${DriveLetter}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Volume')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('ObjectId') -and (@('ById') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${ObjectId}) $__cmdletization_queryBuilder.FilterByProperty('ObjectId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Path') -and (@('ByPaths') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Path}) $__cmdletization_queryBuilder.FilterByProperty('Path', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('FileSystemLabel') -and (@('ByLabel') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FileSystemLabel}) $__cmdletization_queryBuilder.FilterByProperty('FileSystemLabel', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('DriveLetter') -and (@('ByDriveLetter') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DriveLetter}) $__cmdletization_queryBuilder.FilterByProperty('DriveLetter', $__cmdletization_values, $false, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ById', 'ByPaths', 'ByLabel', 'ByDriveLetter', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VolumeScrubEnabled'; ParameterType = 'System.Boolean'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('GetAttributes', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $false if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP Volume.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-VolumeScrubPolicy' -Alias '*' function Set-VolumeScrubPolicy { [CmdletBinding(DefaultParameterSetName='ByDriveLetter', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Volume')] param( [Parameter(ParameterSetName='ById', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${ObjectId}, [Parameter(ParameterSetName='ByPaths', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Path}, [Parameter(ParameterSetName='ByLabel', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FileSystemLabel}, [Parameter(ParameterSetName='ByDriveLetter', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [char[]] ${DriveLetter}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Volume')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ById', Position=1)] [Parameter(ParameterSetName='ByPaths', Position=1)] [Parameter(ParameterSetName='ByLabel', Position=1)] [Parameter(ParameterSetName='ByDriveLetter', Position=1)] [Parameter(ParameterSetName='InputObject (cdxml)', Position=1)] [bool] ${Enable}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('ObjectId') -and (@('ById') -contains $PSCmdlet.ParameterSetName )) { $__cmdletizatio ScriptBlock ID: cae66298-8632-4bfd-ac27-9c2a47d6aeca Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905222 Keywords=None Message=Creating Scriptblock text (4 of 6): ent = $false if ($PSBoundParameters.ContainsKey('NormalPriority')) { [object]$__cmdletization_value = ${NormalPriority} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NormalPriority'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NormalPriority'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Output'; ParameterType = 'System.UInt32'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Optimize', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $false if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP Volume.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Optimize-Volume' -Alias '*' function Get-SupportedFileSystems { [CmdletBinding(DefaultParameterSetName='ByDriveLetter', PositionalBinding=$false)] [OutputType([System.String[]])] param( [Parameter(ParameterSetName='ById', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${ObjectId}, [Parameter(ParameterSetName='ByPaths', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Path}, [Parameter(ParameterSetName='ByLabel', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FileSystemLabel}, [Parameter(ParameterSetName='ByDriveLetter', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [char[]] ${DriveLetter}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Volume')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('ObjectId') -and (@('ById') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${ObjectId}) $__cmdletization_queryBuilder.FilterByProperty('ObjectId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Path') -and (@('ByPaths') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Path}) $__cmdletization_queryBuilder.FilterByProperty('Path', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('FileSystemLabel') -and (@('ByLabel') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FileSystemLabel}) $__cmdletization_queryBuilder.FilterByProperty('FileSystemLabel', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('DriveLetter') -and (@('ByDriveLetter') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DriveLetter}) $__cmdletization_queryBuilder.FilterByProperty('DriveLetter', $__cmdletization_values, $false, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ById', 'ByPaths', 'ByLabel', 'ByDriveLetter', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'SupportedFileSystems'; ParameterType = 'System.String[]'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('GetSupportedFileSystems', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $false if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP Volume.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-SupportedFileSystems' -Alias '*' function Get-SupportedClusterSizes { [CmdletBinding(DefaultParameterSetName='ByDriveLetter', PositionalBinding=$false)] [OutputType([System.UInt32[]])] param( [Parameter(ParameterSetName='ById', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${ObjectId}, [Parameter(ParameterSetName='ByPaths', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Path}, [Parameter(ParameterSetName='ByLabel', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FileSystemLabel}, [Parameter(ParameterSetName='ByDriveLetter', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [char[]] ${DriveLetter}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Volume')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ById', Mandatory=$true)] [Parameter(ParameterSetName='ByPaths', Mandatory=$true)] [Parameter(ParameterSetName='ByLabel', Mandatory=$true)] [Parameter(ParameterSetName='ByDriveLetter', Mandatory=$true)] [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${FileSystem}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('ObjectId') -and (@('ById') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${ObjectId}) $__cmdletization_queryBuilder.FilterByProperty('ObjectId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Path') -and (@('ByPaths') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Path}) $__cmdletization_queryBuilder.FilterByProperty('Path', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('FileSystemLabel') -and (@('ByLabel') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FileSystemLabel}) $__cmdletization_queryBuilder.FilterByProperty('FileSystemLabel', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('DriveLetter') -and (@('ByDriveLetter') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DriveLetter}) $__cmdletization_queryBuilder.FilterByProperty('DriveLetter', $__cmdletization_values, $false, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ById', 'ByPaths', 'ByLabel', 'ByDriveLetter', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'SupportedClusterSizes'; ParameterType = 'System.UInt32[]'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FileSystem')) { [object]$__cmdletization_value = ${FileSystem} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FileSystem'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FileSystem'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('GetSupportedClusterSizes', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $false if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP Volume.cdxml-Help.xml } Mi ScriptBlock ID: cae66298-8632-4bfd-ac27-9c2a47d6aeca Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905221 Keywords=None Message=Creating Scriptblock text (3 of 6): if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('ObjectId') -and (@('ById') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${ObjectId}) $__cmdletization_queryBuilder.FilterByProperty('ObjectId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Path') -and (@('ByPaths') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Path}) $__cmdletization_queryBuilder.FilterByProperty('Path', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('FileSystemLabel') -and (@('ByLabel') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FileSystemLabel}) $__cmdletization_queryBuilder.FilterByProperty('FileSystemLabel', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('DriveLetter') -and (@('ByDriveLetter') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DriveLetter}) $__cmdletization_queryBuilder.FilterByProperty('DriveLetter', $__cmdletization_values, $false, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ById', 'ByPaths', 'ByLabel', 'ByDriveLetter', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('OfflineScanAndFix')) { [object]$__cmdletization_value = ${OfflineScanAndFix} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'OfflineScanAndFix'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'OfflineScanAndFix'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('SpotFix')) { [object]$__cmdletization_value = ${SpotFix} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'SpotFix'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'SpotFix'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Scan')) { [object]$__cmdletization_value = ${Scan} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Scan'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Scan'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Output'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Volume.RepairStatus'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Repair', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $false if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP Volume.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Repair-Volume' -Alias '*' function Optimize-Volume { [CmdletBinding(DefaultParameterSetName='ByDriveLetter', SupportsShouldProcess=$true, ConfirmImpact='Medium', PositionalBinding=$false)] [OutputType([System.UInt32])] param( [Parameter(ParameterSetName='ById', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${ObjectId}, [Parameter(ParameterSetName='ByPaths', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Path}, [Parameter(ParameterSetName='ByLabel', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FileSystemLabel}, [Parameter(ParameterSetName='ByDriveLetter', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [char[]] ${DriveLetter}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Volume')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${ReTrim}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${Analyze}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${Defrag}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${SlabConsolidate}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${TierOptimize}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${NormalPriority}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('ObjectId') -and (@('ById') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${ObjectId}) $__cmdletization_queryBuilder.FilterByProperty('ObjectId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Path') -and (@('ByPaths') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Path}) $__cmdletization_queryBuilder.FilterByProperty('Path', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('FileSystemLabel') -and (@('ByLabel') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FileSystemLabel}) $__cmdletization_queryBuilder.FilterByProperty('FileSystemLabel', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('DriveLetter') -and (@('ByDriveLetter') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DriveLetter}) $__cmdletization_queryBuilder.FilterByProperty('DriveLetter', $__cmdletization_values, $false, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ById', 'ByPaths', 'ByLabel', 'ByDriveLetter', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ReTrim')) { [object]$__cmdletization_value = ${ReTrim} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ReTrim'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ReTrim'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Analyze')) { [object]$__cmdletization_value = ${Analyze} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Analyze'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Analyze'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Defrag')) { [object]$__cmdletization_value = ${Defrag} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Defrag'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Defrag'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('SlabConsolidate')) { [object]$__cmdletization_value = ${SlabConsolidate} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'SlabConsolidate'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'SlabConsolidate'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('TierOptimize')) { [object]$__cmdletization_value = ${TierOptimize} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'TierOptimize'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'TierOptimize'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPres ScriptBlock ID: cae66298-8632-4bfd-ac27-9c2a47d6aeca Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905220 Keywords=None Message=Creating Scriptblock text (2 of 6): e='InputObject (cdxml)')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('ObjectId') -and (@('ById') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${ObjectId}) $__cmdletization_queryBuilder.FilterByProperty('ObjectId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Path') -and (@('ByPaths') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Path}) $__cmdletization_queryBuilder.FilterByProperty('Path', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('FileSystemLabel') -and (@('ByLabel') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FileSystemLabel}) $__cmdletization_queryBuilder.FilterByProperty('FileSystemLabel', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('DriveLetter') -and (@('ByDriveLetter') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DriveLetter}) $__cmdletization_queryBuilder.FilterByProperty('DriveLetter', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('Partition') -and (@('ByPartition') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${Partition}, 'MSFT_PartitionToVolume', 'Partition', 'Volume', 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ById', 'ByPaths', 'ByLabel', 'ByDriveLetter', 'ByPartition', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FileSystem')) { [object]$__cmdletization_value = ${FileSystem} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FileSystem'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FileSystem'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NewFileSystemLabel')) { [object]$__cmdletization_value = ${NewFileSystemLabel} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FileSystemLabel'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FileSystemLabel'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('AllocationUnitSize')) { [object]$__cmdletization_value = ${AllocationUnitSize} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AllocationUnitSize'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AllocationUnitSize'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Full')) { [object]$__cmdletization_value = ${Full} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Full'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Full'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Force')) { [object]$__cmdletization_value = ${Force} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Force'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Force'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Compress')) { [object]$__cmdletization_value = ${Compress} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Compress'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Compress'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ShortFileNameSupport')) { [object]$__cmdletization_value = ${ShortFileNameSupport} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ShortFileNameSupport'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ShortFileNameSupport'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('SetIntegrityStreams')) { [object]$__cmdletization_value = ${SetIntegrityStreams} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'SetIntegrityStreams'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'SetIntegrityStreams'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('UseLargeFRS')) { [object]$__cmdletization_value = ${UseLargeFRS} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UseLargeFRS'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UseLargeFRS'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('DisableHeatGathering')) { [object]$__cmdletization_value = ${DisableHeatGathering} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DisableHeatGathering'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DisableHeatGathering'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsDAX')) { [object]$__cmdletization_value = ${IsDAX} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsDAX'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsDAX'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FormattedVolume'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_Volume' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Format', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $false if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP Volume.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Format-Volume' -Alias '*' function Repair-Volume { [CmdletBinding(DefaultParameterSetName='ByDriveLetter', SupportsShouldProcess=$true, ConfirmImpact='Medium', PositionalBinding=$false)] [OutputType([Microsoft.PowerShell.Cmdletization.GeneratedTypes.Volume.RepairStatus])] param( [Parameter(ParameterSetName='ById', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${ObjectId}, [Parameter(ParameterSetName='ByPaths', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Path}, [Parameter(ParameterSetName='ByLabel', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FileSystemLabel}, [Parameter(ParameterSetName='ByDriveLetter', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [char[]] ${DriveLetter}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Volume')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${OfflineScanAndFix}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${SpotFix}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${Scan}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) ScriptBlock ID: cae66298-8632-4bfd-ac27-9c2a47d6aeca Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905219 Keywords=None Message=Creating Scriptblock text (1 of 6): #requires -version 3.0 try { Microsoft.PowerShell.Core\Set-StrictMode -Off } catch { } $script:MyModule = $MyInvocation.MyCommand.ScriptBlock.Module $script:ClassName = 'ROOT/Microsoft/Windows/Storage/MSFT_Volume' $script:ClassVersion = '' $script:ModuleVersion = '1.0.0.0' $script:ObjectModelWrapper = [Microsoft.PowerShell.Cmdletization.Cim.CimCmdletAdapter] $script:PrivateData = [System.Collections.Generic.Dictionary[string,string]]::new() Microsoft.PowerShell.Core\Export-ModuleMember -Function @() function __cmdletization_BindCommonParameters { param( $__cmdletization_objectModelWrapper, $myPSBoundParameters ) if ($myPSBoundParameters.ContainsKey('CimSession')) { $__cmdletization_objectModelWrapper.PSObject.Properties['CimSession'].Value = $myPSBoundParameters['CimSession'] } if ($myPSBoundParameters.ContainsKey('ThrottleLimit')) { $__cmdletization_objectModelWrapper.PSObject.Properties['ThrottleLimit'].Value = $myPSBoundParameters['ThrottleLimit'] } if ($myPSBoundParameters.ContainsKey('AsJob')) { $__cmdletization_objectModelWrapper.PSObject.Properties['AsJob'].Value = $myPSBoundParameters['AsJob'] } } function Get-Volume { [CmdletBinding(DefaultParameterSetName='ByDriveLetter', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Volume')] param( [Parameter(ParameterSetName='ById', ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${ObjectId}, [Parameter(ParameterSetName='ByUniqueId', ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByPaths', ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Path}, [Parameter(ParameterSetName='ByLabel', ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FileSystemLabel}, [Parameter(ParameterSetName='ByDriveLetter', Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [char[]] ${DriveLetter}, [Parameter(ParameterSetName='ByPartition', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Partition')] [ValidateNotNull()] [ciminstance] ${Partition}, [Parameter(ParameterSetName='ByDiskImage', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_DiskImage')] [ValidateNotNull()] [ciminstance] ${DiskImage}, [Parameter(ParameterSetName='ByStorageSubSystem', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageSubSystem')] [ValidateNotNull()] [ciminstance] ${StorageSubSystem}, [Parameter(ParameterSetName='ByStoragePool', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StoragePool')] [ValidateNotNull()] [ciminstance] ${StoragePool}, [Parameter(ParameterSetName='ByStorageNode', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageNode')] [ValidateNotNull()] [ciminstance] ${StorageNode}, [Parameter(ParameterSetName='ByStorageFileServer', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_FileServer')] [ValidateNotNull()] [ciminstance] ${StorageFileServer}, [Parameter(ParameterSetName='ByFileShare', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_FileShare')] [ValidateNotNull()] [ciminstance] ${FileShare}, [Parameter(ParameterSetName='ByStorageJob', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageJob')] [ValidateNotNull()] [ciminstance] ${StorageJob}, [Parameter(ParameterSetName='ByFilePath', ValueFromPipelineByPropertyName=$true)] [Alias('FullName')] [ValidateNotNullOrEmpty()] [string] ${FilePath}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='ByPartition')] [Parameter(ParameterSetName='ByDiskImage')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByStorageNode')] [Parameter(ParameterSetName='ByStorageFileServer')] [Parameter(ParameterSetName='ByFileShare')] [Parameter(ParameterSetName='ByStorageJob')] [Parameter(ParameterSetName='ByFilePath')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='ByPartition')] [Parameter(ParameterSetName='ByDiskImage')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByStorageNode')] [Parameter(ParameterSetName='ByStorageFileServer')] [Parameter(ParameterSetName='ByFileShare')] [Parameter(ParameterSetName='ByStorageJob')] [Parameter(ParameterSetName='ByFilePath')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='ByPartition')] [Parameter(ParameterSetName='ByDiskImage')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByStorageNode')] [Parameter(ParameterSetName='ByStorageFileServer')] [Parameter(ParameterSetName='ByFileShare')] [Parameter(ParameterSetName='ByStorageJob')] [Parameter(ParameterSetName='ByFilePath')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('ObjectId') -and (@('ById') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${ObjectId}) $__cmdletization_queryBuilder.FilterByProperty('ObjectId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Path') -and (@('ByPaths') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Path}) $__cmdletization_queryBuilder.FilterByProperty('Path', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('FileSystemLabel') -and (@('ByLabel') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FileSystemLabel}) $__cmdletization_queryBuilder.FilterByProperty('FileSystemLabel', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('DriveLetter') -and (@('ByDriveLetter') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${DriveLetter}) $__cmdletization_queryBuilder.FilterByProperty('DriveLetter', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('Partition') -and (@('ByPartition') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${Partition}, 'MSFT_PartitionToVolume', 'Partition', 'Volume', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('DiskImage') -and (@('ByDiskImage') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${DiskImage}, 'MSFT_DiskImageToVolume', 'DiskImage', 'Volume', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('StorageSubSystem') -and (@('ByStorageSubSystem') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StorageSubSystem}, 'MSFT_StorageSubSystemToVolume', 'StorageSubSystem', 'Volume', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('StoragePool') -and (@('ByStoragePool') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StoragePool}, 'MSFT_StoragePoolToVolume', 'StoragePool', 'Volume', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('StorageNode') -and (@('ByStorageNode') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StorageNode}, 'MSFT_StorageNodeToVolume', 'StorageNode', 'Volume', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('StorageFileServer') -and (@('ByStorageFileServer') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StorageFileServer}, 'MSFT_FileServerToVolume', 'FileServer', 'Volume', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('FileShare') -and (@('ByFileShare') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${FileShare}, 'MSFT_VolumeToFileShare', 'FileShare', 'Volume', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('StorageJob') -and (@('ByStorageJob') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StorageJob}, 'MSFT_StorageJobToAffectedStorageObject', 'StorageJob', 'AffectedStorageObject', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('FilePath') -and (@('ByFilePath') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.AddQueryOption('FilePath', ${FilePath}) } $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder) } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP Volume.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-Volume' -Alias '*' function Format-Volume { [CmdletBinding(DefaultParameterSetName='ByDriveLetter', SupportsShouldProcess=$true, ConfirmImpact='High', PositionalBinding=$false)] [Alias('Initialize-Volume')] [OutputType([Microsoft.Management.Infrastructure.CimInstance])][OutputType('Microsoft.Management.Infrastructure.CimInstance#MSFT_Volume')] param( [Parameter(ParameterSetName='ById', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${ObjectId}, [Parameter(ParameterSetName='ByPaths', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Path}, [Parameter(ParameterSetName='ByLabel', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FileSystemLabel}, [Parameter(ParameterSetName='ByDriveLetter', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [char[]] ${DriveLetter}, [Parameter(ParameterSetName='ByPartition', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Partition')] [ValidateNotNull()] [ciminstance] ${Partition}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Volume')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='ByPartition')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ValidateSet('FAT','FAT32','exFAT','NTFS','ReFS')] [string] ${FileSystem}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='ByPartition')] [Parameter(ParameterSetName='InputObject (cdxml)')] [string] ${NewFileSystemLabel}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='ByPartition')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('ClusterSize')] [uint32] ${AllocationUnitSize}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='ByPartition')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${Full}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='ByPartition')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${Force}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='ByPartition')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${Compress}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='ByPartition')] [Parameter(ParameterSetName='InputObject (cdxml)')] [bool] ${ShortFileNameSupport}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='ByPartition')] [Parameter(ParameterSetName='InputObject (cdxml)')] [bool] ${SetIntegrityStreams}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='ByPartition')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${UseLargeFRS}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='ByPartition')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${DisableHeatGathering}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='ByPartition')] [Parameter(ParameterSetName='InputObject (cdxml)')] [bool] ${IsDAX}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='ByPartition')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='ByPartition')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPaths')] [Parameter(ParameterSetName='ByLabel')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='ByPartition')] [Parameter(ParameterSetNam ScriptBlock ID: cae66298-8632-4bfd-ac27-9c2a47d6aeca Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905218 Keywords=None Message=Completed invocation of ScriptBlock ID: a77fb18c-bb0f-4ba0-b120-158bba47f997 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905217 Keywords=None Message=Started invocation of ScriptBlock ID: a77fb18c-bb0f-4ba0-b120-158bba47f997 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905216 Keywords=None Message=Creating Scriptblock text (8 of 8): = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Detach', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP VirtualDisk.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Disconnect-VirtualDisk' -Alias '*' ScriptBlock ID: a77fb18c-bb0f-4ba0-b120-158bba47f997 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905215 Keywords=None Message=Creating Scriptblock text (7 of 8): Connect-VirtualDisk { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_VirtualDisk')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='ByName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Name}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_VirtualDisk')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [string] ${StorageNodeName}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('Name') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Name}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $false, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('StorageNodeName')) { [object]$__cmdletization_value = ${StorageNodeName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StorageNodeName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StorageNodeName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Attach', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP VirtualDisk.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Connect-VirtualDisk' -Alias '*' function Disconnect-VirtualDisk { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_VirtualDisk')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='ByName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Name}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_VirtualDisk')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [string] ${StorageNodeName}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('Name') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Name}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $false, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('StorageNodeName')) { [object]$__cmdletization_value = ${StorageNodeName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StorageNodeName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StorageNodeName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent ScriptBlock ID: a77fb18c-bb0f-4ba0-b120-158bba47f997 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905214 Keywords=None Message=Creating Scriptblock text (6 of 8): anagement.Infrastructure.CimInstance#MSFT_VirtualDisk')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [uint64] ${Size}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Name') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Name}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Size')) { [object]$__cmdletization_value = ${Size} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Size'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Size'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Resize', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP VirtualDisk.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Resize-VirtualDisk' -Alias '*' function Repair-VirtualDisk { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', SupportsShouldProcess=$true, ConfirmImpact='Medium', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_VirtualDisk')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='ByName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Name}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_VirtualDisk')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Name') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Name}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Repair', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP VirtualDisk.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Repair-VirtualDisk' -Alias '*' function ScriptBlock ID: a77fb18c-bb0f-4ba0-b120-158bba47f997 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905213 Keywords=None Message=Creating Scriptblock text (5 of 8): e = ${TargetStoragePoolName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'TargetStoragePoolName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'TargetStoragePoolName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'CreatedVirtualDisk'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('CreateSnapshot', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $false if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP VirtualDisk.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'New-VirtualDiskSnapshot' -Alias '*' function New-VirtualDiskClone { [CmdletBinding(PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('VirtualDiskId')] [ValidateNotNull()] [string[]] ${VirtualDiskUniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${VirtualDiskFriendlyName}, [Parameter(ParameterSetName='ByName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${VirtualDiskName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_VirtualDisk')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true)] [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true)] [Parameter(ParameterSetName='ByName', Mandatory=$true)] [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${FriendlyName}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${TargetStoragePoolName}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('VirtualDiskUniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${VirtualDiskUniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('VirtualDiskFriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${VirtualDiskFriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('VirtualDiskName') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${VirtualDiskName}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FriendlyName')) { [object]$__cmdletization_value = ${FriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('TargetStoragePoolName')) { [object]$__cmdletization_value = ${TargetStoragePoolName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'TargetStoragePoolName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'TargetStoragePoolName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'CreatedVirtualDisk'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('CreateClone', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $false if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP VirtualDisk.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'New-VirtualDiskClone' -Alias '*' function Resize-VirtualDisk { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', SupportsShouldProcess=$true, ConfirmImpact='Medium', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_VirtualDisk')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='ByName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Name}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.M ScriptBlock ID: a77fb18c-bb0f-4ba0-b120-158bba47f997 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905212 Keywords=None Message=Creating Scriptblock text (4 of 8): terSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Name') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Name}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('TargetPortAddresses')) { [object]$__cmdletization_value = ${TargetPortAddresses} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'TargetPortAddresses'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'TargetPortAddresses'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('InitiatorAddress')) { [object]$__cmdletization_value = ${InitiatorAddress} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InitiatorAddress'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InitiatorAddress'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Hide', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP VirtualDisk.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Hide-VirtualDisk' -Alias '*' function New-VirtualDiskSnapshot { [CmdletBinding(PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('VirtualDiskId')] [ValidateNotNull()] [string[]] ${VirtualDiskUniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${VirtualDiskFriendlyName}, [Parameter(ParameterSetName='ByName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${VirtualDiskName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_VirtualDisk')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true)] [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true)] [Parameter(ParameterSetName='ByName', Mandatory=$true)] [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${FriendlyName}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${TargetStoragePoolName}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('VirtualDiskUniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${VirtualDiskUniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('VirtualDiskFriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${VirtualDiskFriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('VirtualDiskName') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${VirtualDiskName}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FriendlyName')) { [object]$__cmdletization_value = ${FriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('TargetStoragePoolName')) { [object]$__cmdletization_valu ScriptBlock ID: a77fb18c-bb0f-4ba0-b120-158bba47f997 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905211 Keywords=None Message=Creating Scriptblock text (3 of 8): nInfo]::new('DeleteObject', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP VirtualDisk.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Remove-VirtualDisk' -Alias '*' function Show-VirtualDisk { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', SupportsShouldProcess=$true, ConfirmImpact='Low', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_VirtualDisk')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='ByName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Name}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_VirtualDisk')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string[]] ${TargetPortAddresses}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${InitiatorAddress}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.VirtualDisk.Expose.HostType] ${HostType}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Name') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Name}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('TargetPortAddresses')) { [object]$__cmdletization_value = ${TargetPortAddresses} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'TargetPortAddresses'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'TargetPortAddresses'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('InitiatorAddress')) { [object]$__cmdletization_value = ${InitiatorAddress} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InitiatorAddress'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InitiatorAddress'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('HostType')) { [object]$__cmdletization_value = ${HostType} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'HostType'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.VirtualDisk.Expose.HostType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'HostType'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.VirtualDisk.Expose.HostType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Show', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP VirtualDisk.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Show-VirtualDisk' -Alias '*' function Hide-VirtualDisk { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', SupportsShouldProcess=$true, ConfirmImpact='Low', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_VirtualDisk')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='ByName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Name}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_VirtualDisk')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string[]] ${TargetPortAddresses}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${InitiatorAddress}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(Parame ScriptBlock ID: a77fb18c-bb0f-4ba0-b120-158bba47f997 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905210 Keywords=None Message=Creating Scriptblock text (2 of 8): PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Name') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Name}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Usage') -and (@('ByUniqueId', 'ByFriendlyName', 'ByName', 'ByStorageSubSystem', 'ByStorageNode', 'ByStoragePool', 'ByPhysicalDisk', 'ByStorageTier', 'ByDisk', 'ByInitiatorPort', 'ByMaskingSet', 'ByInitiatorId', 'ByTargetPort', 'BySourceVirtualDisk', 'ByTargetVirtualDisk', 'ByStorageJob') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Usage}) $__cmdletization_queryBuilder.FilterByProperty('Usage', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('OtherUsageDescription') -and (@('ByUniqueId', 'ByFriendlyName', 'ByName', 'ByStorageSubSystem', 'ByStorageNode', 'ByStoragePool', 'ByPhysicalDisk', 'ByStorageTier', 'ByDisk', 'ByInitiatorPort', 'ByMaskingSet', 'ByInitiatorId', 'ByTargetPort', 'BySourceVirtualDisk', 'ByTargetVirtualDisk', 'ByStorageJob') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${OtherUsageDescription}) $__cmdletization_queryBuilder.FilterByProperty('OtherUsageDescription', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('IsSnapshot') -and (@('ByUniqueId', 'ByFriendlyName', 'ByName', 'ByStorageSubSystem', 'ByStorageNode', 'ByStoragePool', 'ByPhysicalDisk', 'ByStorageTier', 'ByDisk', 'ByInitiatorPort', 'ByMaskingSet', 'ByInitiatorId', 'ByTargetPort', 'BySourceVirtualDisk', 'ByTargetVirtualDisk', 'ByStorageJob') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${IsSnapshot}) $__cmdletization_queryBuilder.FilterByProperty('IsSnapshot', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('HealthStatus') -and (@('ByUniqueId', 'ByFriendlyName', 'ByName', 'ByStorageSubSystem', 'ByStorageNode', 'ByStoragePool', 'ByPhysicalDisk', 'ByStorageTier', 'ByDisk', 'ByInitiatorPort', 'ByMaskingSet', 'ByInitiatorId', 'ByTargetPort', 'BySourceVirtualDisk', 'ByTargetVirtualDisk', 'ByStorageJob') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${HealthStatus}) $__cmdletization_queryBuilder.FilterByProperty('HealthStatus', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('StorageSubSystem') -and (@('ByStorageSubSystem') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StorageSubSystem}, 'MSFT_StorageSubSystemToVirtualDisk', 'StorageSubSystem', 'VirtualDisk', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('StorageNode') -and (@('ByStorageNode') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StorageNode}, 'MSFT_StorageNodeToVirtualDisk', 'StorageNode', 'VirtualDisk', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('StoragePool') -and (@('ByStoragePool') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StoragePool}, 'MSFT_StoragePoolToVirtualDisk', 'StoragePool', 'VirtualDisk', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('PhysicalDisk') -and (@('ByPhysicalDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${PhysicalDisk}, 'MSFT_VirtualDiskToPhysicalDisk', 'PhysicalDisk', 'VirtualDisk', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('StorageTier') -and (@('ByStorageTier') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StorageTier}, 'MSFT_VirtualDiskToStorageTier', 'StorageTier', 'VirtualDisk', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('Disk') -and (@('ByDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${Disk}, 'MSFT_VirtualDiskToDisk', 'Disk', 'VirtualDisk', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('InitiatorPort') -and (@('ByInitiatorPort') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${InitiatorPort}, 'MSFT_VirtualDiskToInitiatorPort', 'InitiatorPort', 'VirtualDisk', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('MaskingSet') -and (@('ByMaskingSet') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${MaskingSet}, 'MSFT_MaskingSetToVirtualDisk', 'MaskingSet', 'VirtualDisk', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('InitiatorId') -and (@('ByInitiatorId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${InitiatorId}, 'MSFT_InitiatorIdToVirtualDisk', 'InitiatorId', 'VirtualDisk', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('TargetPort') -and (@('ByTargetPort') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${TargetPort}, 'MSFT_TargetPortToVirtualDisk', 'TargetPort', 'VirtualDisk', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('SourceVirtualDisk') -and (@('BySourceVirtualDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${SourceVirtualDisk}, 'MSFT_VirtualDiskToVirtualDisk', 'SourceVirtualDisk', 'TargetVirtualDisk', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('TargetVirtualDisk') -and (@('ByTargetVirtualDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${TargetVirtualDisk}, 'MSFT_VirtualDiskToVirtualDisk', 'TargetVirtualDisk', 'SourceVirtualDisk', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('StorageJob') -and (@('ByStorageJob') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StorageJob}, 'MSFT_StorageJobToAffectedStorageObject', 'StorageJob', 'AffectedStorageObject', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('PhysicalRangeMin') -and (@('ByPhysicalDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.AddQueryOption('PhysicalRangeMin', ${PhysicalRangeMin}) } if ($PSBoundParameters.ContainsKey('PhysicalRangeMax') -and (@('ByPhysicalDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.AddQueryOption('PhysicalRangeMax', ${PhysicalRangeMax}) } if ($PSBoundParameters.ContainsKey('NoRedundancy') -and (@('ByPhysicalDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.AddQueryOption('NoRedundancy', ${NoRedundancy}) } $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder) } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP VirtualDisk.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-VirtualDisk' -Alias '*' function Remove-VirtualDisk { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', SupportsShouldProcess=$true, ConfirmImpact='High', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_VirtualDisk')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='ByName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Name}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_VirtualDisk')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('Name') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Name}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $false, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocatio ScriptBlock ID: a77fb18c-bb0f-4ba0-b120-158bba47f997 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905209 Keywords=None Message=Creating Scriptblock text (1 of 8): #requires -version 3.0 try { Microsoft.PowerShell.Core\Set-StrictMode -Off } catch { } $script:MyModule = $MyInvocation.MyCommand.ScriptBlock.Module $script:ClassName = 'ROOT/Microsoft/Windows/Storage/MSFT_VirtualDisk' $script:ClassVersion = '' $script:ModuleVersion = '1.0.0.0' $script:ObjectModelWrapper = [Microsoft.PowerShell.Cmdletization.Cim.CimCmdletAdapter] $script:PrivateData = [System.Collections.Generic.Dictionary[string,string]]::new() Microsoft.PowerShell.Core\Export-ModuleMember -Function @() function __cmdletization_BindCommonParameters { param( $__cmdletization_objectModelWrapper, $myPSBoundParameters ) if ($myPSBoundParameters.ContainsKey('CimSession')) { $__cmdletization_objectModelWrapper.PSObject.Properties['CimSession'].Value = $myPSBoundParameters['CimSession'] } if ($myPSBoundParameters.ContainsKey('ThrottleLimit')) { $__cmdletization_objectModelWrapper.PSObject.Properties['ThrottleLimit'].Value = $myPSBoundParameters['ThrottleLimit'] } if ($myPSBoundParameters.ContainsKey('AsJob')) { $__cmdletization_objectModelWrapper.PSObject.Properties['AsJob'].Value = $myPSBoundParameters['AsJob'] } } function Get-VirtualDisk { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_VirtualDisk')] param( [Parameter(ParameterSetName='ByUniqueId', ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='ByName', ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Name}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStorageNode')] [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByPhysicalDisk')] [Parameter(ParameterSetName='ByStorageTier')] [Parameter(ParameterSetName='ByDisk')] [Parameter(ParameterSetName='ByInitiatorPort')] [Parameter(ParameterSetName='ByMaskingSet')] [Parameter(ParameterSetName='ByInitiatorId')] [Parameter(ParameterSetName='ByTargetPort')] [Parameter(ParameterSetName='BySourceVirtualDisk')] [Parameter(ParameterSetName='ByTargetVirtualDisk')] [Parameter(ParameterSetName='ByStorageJob')] [ValidateNotNull()] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.VirtualDisk.Usage[]] ${Usage}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStorageNode')] [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByPhysicalDisk')] [Parameter(ParameterSetName='ByStorageTier')] [Parameter(ParameterSetName='ByDisk')] [Parameter(ParameterSetName='ByInitiatorPort')] [Parameter(ParameterSetName='ByMaskingSet')] [Parameter(ParameterSetName='ByInitiatorId')] [Parameter(ParameterSetName='ByTargetPort')] [Parameter(ParameterSetName='BySourceVirtualDisk')] [Parameter(ParameterSetName='ByTargetVirtualDisk')] [Parameter(ParameterSetName='ByStorageJob')] [ValidateNotNull()] [string[]] ${OtherUsageDescription}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStorageNode')] [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByPhysicalDisk')] [Parameter(ParameterSetName='ByStorageTier')] [Parameter(ParameterSetName='ByDisk')] [Parameter(ParameterSetName='ByInitiatorPort')] [Parameter(ParameterSetName='ByMaskingSet')] [Parameter(ParameterSetName='ByInitiatorId')] [Parameter(ParameterSetName='ByTargetPort')] [Parameter(ParameterSetName='BySourceVirtualDisk')] [Parameter(ParameterSetName='ByTargetVirtualDisk')] [Parameter(ParameterSetName='ByStorageJob')] [ValidateNotNull()] [bool[]] ${IsSnapshot}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStorageNode')] [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByPhysicalDisk')] [Parameter(ParameterSetName='ByStorageTier')] [Parameter(ParameterSetName='ByDisk')] [Parameter(ParameterSetName='ByInitiatorPort')] [Parameter(ParameterSetName='ByMaskingSet')] [Parameter(ParameterSetName='ByInitiatorId')] [Parameter(ParameterSetName='ByTargetPort')] [Parameter(ParameterSetName='BySourceVirtualDisk')] [Parameter(ParameterSetName='ByTargetVirtualDisk')] [Parameter(ParameterSetName='ByStorageJob')] [ValidateNotNull()] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.VirtualDisk.HealthStatus[]] ${HealthStatus}, [Parameter(ParameterSetName='ByStorageSubSystem', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageSubSystem')] [ValidateNotNull()] [ciminstance] ${StorageSubSystem}, [Parameter(ParameterSetName='ByStorageNode', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageNode')] [ValidateNotNull()] [ciminstance] ${StorageNode}, [Parameter(ParameterSetName='ByStoragePool', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StoragePool')] [ValidateNotNull()] [ciminstance] ${StoragePool}, [Parameter(ParameterSetName='ByPhysicalDisk', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_PhysicalDisk')] [ValidateNotNull()] [ciminstance] ${PhysicalDisk}, [Parameter(ParameterSetName='ByStorageTier', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageTier')] [ValidateNotNull()] [ciminstance] ${StorageTier}, [Parameter(ParameterSetName='ByDisk', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Disk')] [ValidateNotNull()] [ciminstance] ${Disk}, [Parameter(ParameterSetName='ByInitiatorPort', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_InitiatorPort')] [ValidateNotNull()] [ciminstance] ${InitiatorPort}, [Parameter(ParameterSetName='ByMaskingSet', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_MaskingSet')] [ValidateNotNull()] [ciminstance] ${MaskingSet}, [Parameter(ParameterSetName='ByInitiatorId', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_InitiatorId')] [ValidateNotNull()] [ciminstance] ${InitiatorId}, [Parameter(ParameterSetName='ByTargetPort', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_TargetPort')] [ValidateNotNull()] [ciminstance] ${TargetPort}, [Parameter(ParameterSetName='BySourceVirtualDisk')] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_VirtualDisk')] [ValidateNotNull()] [ciminstance] ${SourceVirtualDisk}, [Parameter(ParameterSetName='ByTargetVirtualDisk')] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_VirtualDisk')] [ValidateNotNull()] [ciminstance] ${TargetVirtualDisk}, [Parameter(ParameterSetName='ByStorageJob', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageJob')] [ValidateNotNull()] [ciminstance] ${StorageJob}, [Parameter(ParameterSetName='ByPhysicalDisk')] [uint64] ${PhysicalRangeMin}, [Parameter(ParameterSetName='ByPhysicalDisk')] [uint64] ${PhysicalRangeMax}, [Parameter(ParameterSetName='ByPhysicalDisk')] [switch] ${NoRedundancy}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStorageNode')] [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByPhysicalDisk')] [Parameter(ParameterSetName='ByStorageTier')] [Parameter(ParameterSetName='ByDisk')] [Parameter(ParameterSetName='ByInitiatorPort')] [Parameter(ParameterSetName='ByMaskingSet')] [Parameter(ParameterSetName='ByInitiatorId')] [Parameter(ParameterSetName='ByTargetPort')] [Parameter(ParameterSetName='BySourceVirtualDisk')] [Parameter(ParameterSetName='ByTargetVirtualDisk')] [Parameter(ParameterSetName='ByStorageJob')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStorageNode')] [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByPhysicalDisk')] [Parameter(ParameterSetName='ByStorageTier')] [Parameter(ParameterSetName='ByDisk')] [Parameter(ParameterSetName='ByInitiatorPort')] [Parameter(ParameterSetName='ByMaskingSet')] [Parameter(ParameterSetName='ByInitiatorId')] [Parameter(ParameterSetName='ByTargetPort')] [Parameter(ParameterSetName='BySourceVirtualDisk')] [Parameter(ParameterSetName='ByTargetVirtualDisk')] [Parameter(ParameterSetName='ByStorageJob')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStorageNode')] [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByPhysicalDisk')] [Parameter(ParameterSetName='ByStorageTier')] [Parameter(ParameterSetName='ByDisk')] [Parameter(ParameterSetName='ByInitiatorPort')] [Parameter(ParameterSetName='ByMaskingSet')] [Parameter(ParameterSetName='ByInitiatorId')] [Parameter(ParameterSetName='ByTargetPort')] [Parameter(ParameterSetName='BySourceVirtualDisk')] [Parameter(ParameterSetName='ByTargetVirtualDisk')] [Parameter(ParameterSetName='ByStorageJob')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($ ScriptBlock ID: a77fb18c-bb0f-4ba0-b120-158bba47f997 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905208 Keywords=None Message=Completed invocation of ScriptBlock ID: b2b672bd-e45f-4046-ad93-c2e6faeccd04 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905207 Keywords=None Message=Started invocation of ScriptBlock ID: b2b672bd-e45f-4046-ad93-c2e6faeccd04 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905206 Keywords=None Message=Creating Scriptblock text (1 of 1): #requires -version 3.0 try { Microsoft.PowerShell.Core\Set-StrictMode -Off } catch { } $script:MyModule = $MyInvocation.MyCommand.ScriptBlock.Module $script:ClassName = 'ROOT/Microsoft/Windows/Storage/MSFT_TargetPortal' $script:ClassVersion = '' $script:ModuleVersion = '1.0.0.0' $script:ObjectModelWrapper = [Microsoft.PowerShell.Cmdletization.Cim.CimCmdletAdapter] $script:PrivateData = [System.Collections.Generic.Dictionary[string,string]]::new() Microsoft.PowerShell.Core\Export-ModuleMember -Function @() function __cmdletization_BindCommonParameters { param( $__cmdletization_objectModelWrapper, $myPSBoundParameters ) if ($myPSBoundParameters.ContainsKey('CimSession')) { $__cmdletization_objectModelWrapper.PSObject.Properties['CimSession'].Value = $myPSBoundParameters['CimSession'] } if ($myPSBoundParameters.ContainsKey('ThrottleLimit')) { $__cmdletization_objectModelWrapper.PSObject.Properties['ThrottleLimit'].Value = $myPSBoundParameters['ThrottleLimit'] } if ($myPSBoundParameters.ContainsKey('AsJob')) { $__cmdletization_objectModelWrapper.PSObject.Properties['AsJob'].Value = $myPSBoundParameters['AsJob'] } } function Get-TargetPortal { [CmdletBinding(DefaultParameterSetName='ByUniqueId', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_TargetPortal')] param( [Parameter(ParameterSetName='ByUniqueId', ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByIPv4Address', ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ValidateNotNull()] [string[]] ${IPv4Address}, [Parameter(ParameterSetName='ByIPv6Address', ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ValidateNotNull()] [string[]] ${IPv6Address}, [Parameter(ParameterSetName='ByTargetPort', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_TargetPort')] [ValidateNotNull()] [ciminstance] ${TargetPort}, [Parameter(ParameterSetName='BySubsystem', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageSubSystem')] [ValidateNotNull()] [ciminstance] ${StorageSubsystem}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByIPv4Address')] [Parameter(ParameterSetName='ByIPv6Address')] [Parameter(ParameterSetName='ByTargetPort')] [Parameter(ParameterSetName='BySubsystem')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByIPv4Address')] [Parameter(ParameterSetName='ByIPv6Address')] [Parameter(ParameterSetName='ByTargetPort')] [Parameter(ParameterSetName='BySubsystem')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByIPv4Address')] [Parameter(ParameterSetName='ByIPv6Address')] [Parameter(ParameterSetName='ByTargetPort')] [Parameter(ParameterSetName='BySubsystem')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('IPv4Address') -and (@('ByIPv4Address') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${IPv4Address}) $__cmdletization_queryBuilder.FilterByProperty('IPv4Address', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('IPv6Address') -and (@('ByIPv6Address') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${IPv6Address}) $__cmdletization_queryBuilder.FilterByProperty('IPv6Address', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('TargetPort') -and (@('ByTargetPort') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${TargetPort}, 'MSFT_TargetPortToTargetPortal', 'TargetPort', 'TargetPortal', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('StorageSubsystem') -and (@('BySubsystem') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StorageSubsystem}, 'MSFT_StorageSubSystemToTargetPortal', 'StorageSubSystem', 'TargetPortal', 'SilentlyContinue') } $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder) } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP TargetPortal.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-TargetPortal' -Alias '*' ScriptBlock ID: b2b672bd-e45f-4046-ad93-c2e6faeccd04 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905205 Keywords=None Message=Completed invocation of ScriptBlock ID: 7448dc01-24b6-4eff-b27e-bc1bf39d0985 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905204 Keywords=None Message=Started invocation of ScriptBlock ID: 7448dc01-24b6-4eff-b27e-bc1bf39d0985 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905203 Keywords=None Message=Creating Scriptblock text (1 of 1): #requires -version 3.0 try { Microsoft.PowerShell.Core\Set-StrictMode -Off } catch { } $script:MyModule = $MyInvocation.MyCommand.ScriptBlock.Module $script:ClassName = 'ROOT/Microsoft/Windows/Storage/MSFT_TargetPort' $script:ClassVersion = '' $script:ModuleVersion = '1.0.0.0' $script:ObjectModelWrapper = [Microsoft.PowerShell.Cmdletization.Cim.CimCmdletAdapter] $script:PrivateData = [System.Collections.Generic.Dictionary[string,string]]::new() Microsoft.PowerShell.Core\Export-ModuleMember -Function @() function __cmdletization_BindCommonParameters { param( $__cmdletization_objectModelWrapper, $myPSBoundParameters ) if ($myPSBoundParameters.ContainsKey('CimSession')) { $__cmdletization_objectModelWrapper.PSObject.Properties['CimSession'].Value = $myPSBoundParameters['CimSession'] } if ($myPSBoundParameters.ContainsKey('ThrottleLimit')) { $__cmdletization_objectModelWrapper.PSObject.Properties['ThrottleLimit'].Value = $myPSBoundParameters['ThrottleLimit'] } if ($myPSBoundParameters.ContainsKey('AsJob')) { $__cmdletization_objectModelWrapper.PSObject.Properties['AsJob'].Value = $myPSBoundParameters['AsJob'] } } function Get-TargetPort { [CmdletBinding(DefaultParameterSetName='ByName', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_TargetPort')] param( [Parameter(ParameterSetName='ByUniqueId', ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByName', Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='ByAddress', ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ValidateNotNull()] [string[]] ${PortAddress}, [Parameter(ParameterSetName='ByName', ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByAddress', ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.TargetPort.ConnectionType[]] ${ConnectionType}, [Parameter(ParameterSetName='ByStorageSubSystem', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageSubSystem')] [ValidateNotNull()] [ciminstance] ${StorageSubSystem}, [Parameter(ParameterSetName='ByMaskingSet', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_MaskingSet')] [ValidateNotNull()] [ciminstance] ${MaskingSet}, [Parameter(ParameterSetName='ByTargetPortal', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_TargetPortal')] [ValidateNotNull()] [ciminstance] ${TargetPortal}, [Parameter(ParameterSetName='ByVirtualDisk', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_VirtualDisk')] [ValidateNotNull()] [ciminstance] ${VirtualDisk}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByAddress')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByMaskingSet')] [Parameter(ParameterSetName='ByTargetPortal')] [Parameter(ParameterSetName='ByVirtualDisk')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByAddress')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByMaskingSet')] [Parameter(ParameterSetName='ByTargetPortal')] [Parameter(ParameterSetName='ByVirtualDisk')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByAddress')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByMaskingSet')] [Parameter(ParameterSetName='ByTargetPortal')] [Parameter(ParameterSetName='ByVirtualDisk')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('PortAddress') -and (@('ByAddress') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${PortAddress}) $__cmdletization_queryBuilder.FilterByProperty('PortAddress', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('ConnectionType') -and (@('ByName', 'ByAddress') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${ConnectionType}) $__cmdletization_queryBuilder.FilterByProperty('ConnectionType', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('StorageSubSystem') -and (@('ByStorageSubSystem') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StorageSubSystem}, 'MSFT_StorageSubSystemToTargetPort', 'StorageSubSystem', 'TargetPort', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('MaskingSet') -and (@('ByMaskingSet') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${MaskingSet}, 'MSFT_MaskingSetToTargetPort', 'MaskingSet', 'TargetPort', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('TargetPortal') -and (@('ByTargetPortal') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${TargetPortal}, 'MSFT_TargetPortToTargetPortal', 'TargetPortal', 'TargetPort', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('VirtualDisk') -and (@('ByVirtualDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${VirtualDisk}, 'MSFT_TargetPortToVirtualDisk', 'VirtualDisk', 'TargetPort', 'SilentlyContinue') } $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder) } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP TargetPort.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-TargetPort' -Alias '*' ScriptBlock ID: 7448dc01-24b6-4eff-b27e-bc1bf39d0985 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905202 Keywords=None Message=Completed invocation of ScriptBlock ID: 7e3fe878-b6a0-429f-b725-2a16200d23cf Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905201 Keywords=None Message=Started invocation of ScriptBlock ID: 7e3fe878-b6a0-429f-b725-2a16200d23cf Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905200 Keywords=None Message=Creating Scriptblock text (2 of 2): tization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Size'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Size'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Resize', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageTier.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Resize-StorageTier' -Alias '*' function Get-StorageTierSupportedSize { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', PositionalBinding=$false)] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageTier')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId', ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByFriendlyName', ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='InputObject (cdxml)', ValueFromPipelineByPropertyName=$true)] [Alias('Name')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${ResiliencySettingName}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ResiliencySettingName')) { [object]$__cmdletization_value = ${ResiliencySettingName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ResiliencySettingName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ResiliencySettingName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'SupportedSizes'; ParameterType = 'System.UInt64[]'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'TierSizeMin'; ParameterType = 'System.UInt64'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'TierSizeMax'; ParameterType = 'System.UInt64'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'TierSizeDivisor'; ParameterType = 'System.UInt64'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('GetSupportedSize', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $false if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageTier.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-StorageTierSupportedSize' -Alias '*' ScriptBlock ID: 7e3fe878-b6a0-429f-b725-2a16200d23cf Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905199 Keywords=None Message=Creating Scriptblock text (1 of 2): #requires -version 3.0 try { Microsoft.PowerShell.Core\Set-StrictMode -Off } catch { } $script:MyModule = $MyInvocation.MyCommand.ScriptBlock.Module $script:ClassName = 'ROOT/Microsoft/Windows/Storage/MSFT_StorageTier' $script:ClassVersion = '' $script:ModuleVersion = '1.0.0.0' $script:ObjectModelWrapper = [Microsoft.PowerShell.Cmdletization.Cim.CimCmdletAdapter] $script:PrivateData = [System.Collections.Generic.Dictionary[string,string]]::new() Microsoft.PowerShell.Core\Export-ModuleMember -Function @() function __cmdletization_BindCommonParameters { param( $__cmdletization_objectModelWrapper, $myPSBoundParameters ) if ($myPSBoundParameters.ContainsKey('CimSession')) { $__cmdletization_objectModelWrapper.PSObject.Properties['CimSession'].Value = $myPSBoundParameters['CimSession'] } if ($myPSBoundParameters.ContainsKey('ThrottleLimit')) { $__cmdletization_objectModelWrapper.PSObject.Properties['ThrottleLimit'].Value = $myPSBoundParameters['ThrottleLimit'] } if ($myPSBoundParameters.ContainsKey('AsJob')) { $__cmdletization_objectModelWrapper.PSObject.Properties['AsJob'].Value = $myPSBoundParameters['AsJob'] } } function Get-StorageTier { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StorageTier')] param( [Parameter(ParameterSetName='ByUniqueId', ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByVirtualDisk')] [ValidateNotNull()] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageTier.MediaType[]] ${MediaType}, [Parameter(ParameterSetName='ByStoragePool', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StoragePool')] [ValidateNotNull()] [ciminstance] ${StoragePool}, [Parameter(ParameterSetName='ByVirtualDisk', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_VirtualDisk')] [ValidateNotNull()] [ciminstance] ${VirtualDisk}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByVirtualDisk')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByVirtualDisk')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByVirtualDisk')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('MediaType') -and (@('ByUniqueId', 'ByFriendlyName', 'ByStoragePool', 'ByVirtualDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${MediaType}) $__cmdletization_queryBuilder.FilterByProperty('MediaType', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('StoragePool') -and (@('ByStoragePool') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StoragePool}, 'MSFT_StoragePoolToStorageTier', 'StoragePool', 'StorageTier', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('VirtualDisk') -and (@('ByVirtualDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${VirtualDisk}, 'MSFT_VirtualDiskToStorageTier', 'VirtualDisk', 'StorageTier', 'SilentlyContinue') } $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder) } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageTier.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-StorageTier' -Alias '*' function Remove-StorageTier { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', SupportsShouldProcess=$true, ConfirmImpact='High', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StorageTier')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageTier')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $false, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('DeleteObject', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageTier.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Remove-StorageTier' -Alias '*' function Resize-StorageTier { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', SupportsShouldProcess=$true, ConfirmImpact='Medium', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StorageTier')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageTier')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [uint64] ${Size}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Size')) { [object]$__cmdletization_value = ${Size} $__cmdle ScriptBlock ID: 7e3fe878-b6a0-429f-b725-2a16200d23cf Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905198 Keywords=None Message=Completed invocation of ScriptBlock ID: 7c57da61-20a6-46a5-afb1-fb2765426cf6 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905197 Keywords=None Message=Started invocation of ScriptBlock ID: 7c57da61-20a6-46a5-afb1-fb2765426cf6 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905196 Keywords=None Message=Creating Scriptblock text (7 of 7): lue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Informational', 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.EnableDiagnosticLog.Level') [object]$__cmdletization_defaultValueIsPresent = $true if ($PSBoundParameters.ContainsKey('Level')) { [object]$__cmdletization_value = ${Level} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Level'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.EnableDiagnosticLog.Level'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Level'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.EnableDiagnosticLog.Level'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('MaxLogSize')) { [object]$__cmdletization_value = ${MaxLogSize} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MaxLogSize'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MaxLogSize'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('StartDiagnosticLog', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageSubSystem.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Start-StorageDiagnosticLog' -Alias '*' function Stop-StorageDiagnosticLog { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', PositionalBinding=$false)] [Alias('Disable-StorageDiagnosticLog')] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StorageSubSystem')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('StorageSubsystemId')] [ValidateNotNull()] [string[]] ${StorageSubSystemUniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${StorageSubSystemFriendlyName}, [Parameter(ParameterSetName='ByName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${StorageSubSystemName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageSubSystem')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('StorageSubSystemUniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StorageSubSystemUniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('StorageSubSystemFriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StorageSubSystemFriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'ReportErrors') } if ($PSBoundParameters.ContainsKey('StorageSubSystemName') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StorageSubSystemName}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('StopDiagnosticLog', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageSubSystem.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Stop-StorageDiagnosticLog' -Alias '*' ScriptBlock ID: 7c57da61-20a6-46a5-afb1-fb2765426cf6 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905195 Keywords=None Message=Creating Scriptblock text (6 of 7): meter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DestinationPath'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DestinationPath'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('TimeSpan')) { [object]$__cmdletization_value = ${TimeSpan} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'TimeSpan'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'TimeSpan'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ActivityId')) { [object]$__cmdletization_value = ${ActivityId} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ActivityId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ActivityId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ExcludeOperationalLog')) { [object]$__cmdletization_value = ${ExcludeOperationalLog} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ExcludeOperationalLog'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ExcludeOperationalLog'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ExcludeDiagnosticLog')) { [object]$__cmdletization_value = ${ExcludeDiagnosticLog} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ExcludeDiagnosticLog'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ExcludeDiagnosticLog'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IncludeLiveDump')) { [object]$__cmdletization_value = ${IncludeLiveDump} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IncludeLiveDump'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IncludeLiveDump'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('GetDiagnosticInfo', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageSubSystem.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-StorageDiagnosticInfoInternal' -Alias '*' function Clear-StorageDiagnosticInfo { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StorageSubSystem')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('StorageSubsystemId')] [ValidateNotNull()] [string[]] ${StorageSubSystemUniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${StorageSubSystemFriendlyName}, [Parameter(ParameterSetName='ByName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${StorageSubSystemName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageSubSystem')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('StorageSubSystemUniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StorageSubSystemUniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('StorageSubSystemFriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StorageSubSystemFriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'ReportErrors') } if ($PSBoundParameters.ContainsKey('StorageSubSystemName') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StorageSubSystemName}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('ClearDiagnosticInfo', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageSubSystem.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Clear-StorageDiagnosticInfo' -Alias '*' function Start-StorageDiagnosticLog { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', PositionalBinding=$false)] [Alias('Enable-StorageDiagnosticLog')] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StorageSubSystem')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('StorageSubsystemId')] [ValidateNotNull()] [string[]] ${StorageSubSystemUniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${StorageSubSystemFriendlyName}, [Parameter(ParameterSetName='ByName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${StorageSubSystemName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageSubSystem')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.EnableDiagnosticLog.Level] ${Level}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [uint64] ${MaxLogSize}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('StorageSubSystemUniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StorageSubSystemUniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('StorageSubSystemFriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StorageSubSystemFriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'ReportErrors') } if ($PSBoundParameters.ContainsKey('StorageSubSystemName') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StorageSubSystemName}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultVa ScriptBlock ID: 7c57da61-20a6-46a5-afb1-fb2765426cf6 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905194 Keywords=None Message=Creating Scriptblock text (5 of 7): pe = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.CreateMaskingSet.DeviceAccess[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DeviceAccesses'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.CreateMaskingSet.DeviceAccess[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('HostType')) { [object]$__cmdletization_value = ${HostType} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'HostType'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.CreateMaskingSet.HostMode'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'HostType'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.CreateMaskingSet.HostMode'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'CreatedMaskingSet'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('CreateMaskingSet', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $false if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageSubSystem.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'New-MaskingSet' -Alias '*' function New-StorageFileServer { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('StorageSubSystemId')] [ValidateNotNull()] [string[]] ${StorageSubSystemUniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${StorageSubSystemFriendlyName}, [Parameter(ParameterSetName='ByName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${StorageSubSystemName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageSubSystem')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true)] [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true)] [Parameter(ParameterSetName='ByName', Mandatory=$true)] [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string[]] ${HostNames}, [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true)] [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true)] [Parameter(ParameterSetName='ByName', Mandatory=$true)] [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.CreateFileServer.FileSharingProtocol[]] ${Protocols}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [string] ${FriendlyName}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('StorageSubSystemUniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StorageSubSystemUniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('StorageSubSystemFriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StorageSubSystemFriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'ReportErrors') } if ($PSBoundParameters.ContainsKey('StorageSubSystemName') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StorageSubSystemName}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('HostNames')) { [object]$__cmdletization_value = ${HostNames} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'HostNames'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'HostNames'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Protocols')) { [object]$__cmdletization_value = ${Protocols} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FileSharingProtocols'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.CreateFileServer.FileSharingProtocol[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FileSharingProtocols'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.CreateFileServer.FileSharingProtocol[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FriendlyName')) { [object]$__cmdletization_value = ${FriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'CreatedFileServer'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('CreateFileServer', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $false if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageSubSystem.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'New-StorageFileServer' -Alias '*' function Get-StorageDiagnosticInfoInternal { [CmdletBinding(DefaultParameterSetName='ByUniqueId', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StorageSubSystem')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true)] [ValidateNotNull()] [string[]] ${StorageSubSystemUniqueId}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageSubSystem')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true)] [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true)] [ValidateNotNullOrEmpty()] [string] ${DestinationPath}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='InputObject (cdxml)')] [uint32] ${TimeSpan}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='InputObject (cdxml)')] [string] ${ActivityId}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${ExcludeOperationalLog}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${ExcludeDiagnosticLog}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${IncludeLiveDump}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('StorageSubSystemUniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StorageSubSystemUniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('DestinationPath')) { [object]$__cmdletization_value = ${DestinationPath} $__cmdletization_methodPara ScriptBlock ID: 7c57da61-20a6-46a5-afb1-fb2765426cf6 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905193 Keywords=None Message=Creating Scriptblock text (4 of 7): stem.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfDataCopies'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ParityLayout')) { [object]$__cmdletization_value = ${ParityLayout} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ParityLayout'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.CreateVirtualDisk.ParityLayout'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ParityLayout'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.CreateVirtualDisk.ParityLayout'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('RequestNoSinglePointOfFailure')) { [object]$__cmdletization_value = ${RequestNoSinglePointOfFailure} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'RequestNoSinglePointOfFailure'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'RequestNoSinglePointOfFailure'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ProvisioningType')) { [object]$__cmdletization_value = ${ProvisioningType} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ProvisioningType'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.ProvisioningType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ProvisioningType'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.ProvisioningType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsEnclosureAware')) { [object]$__cmdletization_value = ${IsEnclosureAware} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsEnclosureAware'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsEnclosureAware'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FaultDomainAwareness')) { [object]$__cmdletization_value = ${FaultDomainAwareness} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwareness'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwareness'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'CreatedVirtualDisk'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('CreateVirtualDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $false if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageSubSystem.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'New-StorageSubsystemVirtualDisk' -Alias '*' function New-MaskingSet { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('StorageSubsystemId')] [ValidateNotNull()] [string[]] ${StorageSubSystemUniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${StorageSubSystemFriendlyName}, [Parameter(ParameterSetName='ByName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${StorageSubSystemName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageSubSystem')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('MaskingSetFriendlyName')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${FriendlyName}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string[]] ${VirtualDiskNames}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string[]] ${InitiatorAddresses}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string[]] ${TargetPortAddresses}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string[]] ${DeviceNumbers}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.CreateMaskingSet.DeviceAccess[]] ${DeviceAccesses}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.CreateMaskingSet.HostMode] ${HostType}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('StorageSubSystemUniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StorageSubSystemUniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('StorageSubSystemFriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StorageSubSystemFriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'ReportErrors') } if ($PSBoundParameters.ContainsKey('StorageSubSystemName') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StorageSubSystemName}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FriendlyName')) { [object]$__cmdletization_value = ${FriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('VirtualDiskNames')) { [object]$__cmdletization_value = ${VirtualDiskNames} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VirtualDiskNames'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VirtualDiskNames'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('InitiatorAddresses')) { [object]$__cmdletization_value = ${InitiatorAddresses} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InitiatorAddresses'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InitiatorAddresses'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('TargetPortAddresses')) { [object]$__cmdletization_value = ${TargetPortAddresses} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'TargetPortAddresses'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'TargetPortAddresses'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('DeviceNumbers')) { [object]$__cmdletization_value = ${DeviceNumbers} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DeviceNumbers'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DeviceNumbers'; ParameterType = 'System.String[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('DeviceAccesses')) { [object]$__cmdletization_value = ${DeviceAccesses} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DeviceAccesses'; ParameterTy ScriptBlock ID: 7c57da61-20a6-46a5-afb1-fb2765426cf6 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905192 Keywords=None Message=Creating Scriptblock text (3 of 7): faultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('AutoWriteCacheSize')) { [object]$__cmdletization_value = ${AutoWriteCacheSize} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AutoWriteCacheSize'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AutoWriteCacheSize'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'CreatedStoragePool'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('CreateStoragePool', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $false if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageSubSystem.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'New-StoragePool' -Alias '*' function New-StorageSubsystemVirtualDisk { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('StorageSubsystemId')] [ValidateNotNull()] [string[]] ${StorageSubSystemUniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${StorageSubSystemFriendlyName}, [Parameter(ParameterSetName='ByName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${StorageSubSystemName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageSubSystem')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('VirtualDiskFriendlyName')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${FriendlyName}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.CreateVirtualDisk.Usage] ${Usage}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${OtherUsageDescription}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [uint64] ${Size}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [switch] ${UseMaximumSize}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [uint64] ${Interleave}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [uint16] ${NumberOfColumns}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [uint16] ${PhysicalDiskRedundancy}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [uint16] ${NumberOfDataCopies}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.CreateVirtualDisk.ParityLayout] ${ParityLayout}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [bool] ${RequestNoSinglePointOfFailure}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.ProvisioningType] ${ProvisioningType}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${IsEnclosureAware}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.FaultDomainType] ${FaultDomainAwareness}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('StorageSubSystemUniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StorageSubSystemUniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('StorageSubSystemFriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StorageSubSystemFriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'ReportErrors') } if ($PSBoundParameters.ContainsKey('StorageSubSystemName') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StorageSubSystemName}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FriendlyName')) { [object]$__cmdletization_value = ${FriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Usage')) { [object]$__cmdletization_value = ${Usage} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.CreateVirtualDisk.Usage'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.CreateVirtualDisk.Usage'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('OtherUsageDescription')) { [object]$__cmdletization_value = ${OtherUsageDescription} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'OtherUsageDescription'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'OtherUsageDescription'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Size')) { [object]$__cmdletization_value = ${Size} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Size'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Size'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('UseMaximumSize')) { [object]$__cmdletization_value = ${UseMaximumSize} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UseMaximumSize'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UseMaximumSize'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Interleave')) { [object]$__cmdletization_value = ${Interleave} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Interleave'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Interleave'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NumberOfColumns')) { [object]$__cmdletization_value = ${NumberOfColumns} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfColumns'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfColumns'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PhysicalDiskRedundancy')) { [object]$__cmdletization_value = ${PhysicalDiskRedundancy} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDiskRedundancy'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDiskRedundancy'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NumberOfDataCopies')) { [object]$__cmdletization_value = ${NumberOfDataCopies} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfDataCopies'; ParameterType = 'Sy ScriptBlock ID: 7c57da61-20a6-46a5-afb1-fb2765426cf6 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905191 Keywords=None Message=Creating Scriptblock text (2 of 7): } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageSubSystem.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-StorageSubSystem' -Alias '*' function New-StoragePool { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('StorageSubsystemId')] [ValidateNotNull()] [string[]] ${StorageSubSystemUniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${StorageSubSystemFriendlyName}, [Parameter(ParameterSetName='ByName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${StorageSubSystemName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageSubSystem')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true)] [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true)] [Parameter(ParameterSetName='ByName', Mandatory=$true)] [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true)] [Alias('StoragePoolFriendlyName')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${FriendlyName}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('StoragePoolUsage')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.CreateStoragePool.Usage] ${Usage}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('StoragePoolOtherUsageDescription')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${OtherUsageDescription}, [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true)] [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true)] [Parameter(ParameterSetName='ByName', Mandatory=$true)] [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_PhysicalDisk')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ciminstance[]] ${PhysicalDisks}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.ProvisioningType] ${ProvisioningTypeDefault}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.MediaType] ${MediaTypeDefault}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [bool] ${EnclosureAwareDefault}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.FaultDomainType] ${FaultDomainAwarenessDefault}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${ResiliencySettingNameDefault}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [uint64] ${LogicalSectorSizeDefault}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [uint64] ${WriteCacheSizeDefault}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [bool] ${AutoWriteCacheSize}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('StorageSubSystemUniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StorageSubSystemUniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('StorageSubSystemFriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StorageSubSystemFriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'ReportErrors') } if ($PSBoundParameters.ContainsKey('StorageSubSystemName') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StorageSubSystemName}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FriendlyName')) { [object]$__cmdletization_value = ${FriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Usage')) { [object]$__cmdletization_value = ${Usage} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.CreateStoragePool.Usage'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.CreateStoragePool.Usage'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('OtherUsageDescription')) { [object]$__cmdletization_value = ${OtherUsageDescription} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'OtherUsageDescription'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'OtherUsageDescription'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PhysicalDisks')) { [object]$__cmdletization_value = ${PhysicalDisks} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_PhysicalDisk' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ProvisioningTypeDefault')) { [object]$__cmdletization_value = ${ProvisioningTypeDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ProvisioningTypeDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.ProvisioningType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ProvisioningTypeDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.ProvisioningType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('MediaTypeDefault')) { [object]$__cmdletization_value = ${MediaTypeDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MediaTypeDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.MediaType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MediaTypeDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.MediaType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('EnclosureAwareDefault')) { [object]$__cmdletization_value = ${EnclosureAwareDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'EnclosureAwareDefault'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'EnclosureAwareDefault'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FaultDomainAwarenessDefault')) { [object]$__cmdletization_value = ${FaultDomainAwarenessDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwarenessDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwarenessDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ResiliencySettingNameDefault')) { [object]$__cmdletization_value = ${ResiliencySettingNameDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ResiliencySettingNameDefault'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ResiliencySettingNameDefault'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('LogicalSectorSizeDefault')) { [object]$__cmdletization_value = ${LogicalSectorSizeDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'LogicalSectorSizeDefault'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'LogicalSectorSizeDefault'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('WriteCacheSizeDefault')) { [object]$__cmdletization_value = ${WriteCacheSizeDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'WriteCacheSizeDefault'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'WriteCacheSizeDefault'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_de ScriptBlock ID: 7c57da61-20a6-46a5-afb1-fb2765426cf6 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905190 Keywords=None Message=Creating Scriptblock text (1 of 7): #requires -version 3.0 try { Microsoft.PowerShell.Core\Set-StrictMode -Off } catch { } $script:MyModule = $MyInvocation.MyCommand.ScriptBlock.Module $script:ClassName = 'ROOT/Microsoft/Windows/Storage/MSFT_StorageSubSystem' $script:ClassVersion = '' $script:ModuleVersion = '1.0.0.0' $script:ObjectModelWrapper = [Microsoft.PowerShell.Cmdletization.Cim.CimCmdletAdapter] $script:PrivateData = [System.Collections.Generic.Dictionary[string,string]]::new() Microsoft.PowerShell.Core\Export-ModuleMember -Function @() function __cmdletization_BindCommonParameters { param( $__cmdletization_objectModelWrapper, $myPSBoundParameters ) if ($myPSBoundParameters.ContainsKey('CimSession')) { $__cmdletization_objectModelWrapper.PSObject.Properties['CimSession'].Value = $myPSBoundParameters['CimSession'] } if ($myPSBoundParameters.ContainsKey('ThrottleLimit')) { $__cmdletization_objectModelWrapper.PSObject.Properties['ThrottleLimit'].Value = $myPSBoundParameters['ThrottleLimit'] } if ($myPSBoundParameters.ContainsKey('AsJob')) { $__cmdletization_objectModelWrapper.PSObject.Properties['AsJob'].Value = $myPSBoundParameters['AsJob'] } } function Get-StorageSubSystem { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StorageSubSystem')] param( [Parameter(ParameterSetName='ByUniqueId', ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='ByName', ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Name}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByStorageProvider')] [Parameter(ParameterSetName='ByStorageNode')] [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByMaskingSet')] [Parameter(ParameterSetName='ByTargetPort')] [Parameter(ParameterSetName='ByTargetPortal')] [Parameter(ParameterSetName='ByInitiatorId')] [Parameter(ParameterSetName='ByOffloadDataTransferSetting')] [Parameter(ParameterSetName='ByDisk')] [Parameter(ParameterSetName='ByPartition')] [Parameter(ParameterSetName='ByVolume')] [Parameter(ParameterSetName='ByFileServer')] [Parameter(ParameterSetName='ByStorageFaultDomain')] [ValidateNotNull()] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSubSystem.HealthStatus[]] ${HealthStatus}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByStorageProvider')] [Parameter(ParameterSetName='ByStorageNode')] [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByMaskingSet')] [Parameter(ParameterSetName='ByTargetPort')] [Parameter(ParameterSetName='ByTargetPortal')] [Parameter(ParameterSetName='ByInitiatorId')] [Parameter(ParameterSetName='ByOffloadDataTransferSetting')] [Parameter(ParameterSetName='ByDisk')] [Parameter(ParameterSetName='ByPartition')] [Parameter(ParameterSetName='ByVolume')] [Parameter(ParameterSetName='ByFileServer')] [Parameter(ParameterSetName='ByStorageFaultDomain')] [ValidateNotNull()] [string[]] ${Manufacturer}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByStorageProvider')] [Parameter(ParameterSetName='ByStorageNode')] [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByMaskingSet')] [Parameter(ParameterSetName='ByTargetPort')] [Parameter(ParameterSetName='ByTargetPortal')] [Parameter(ParameterSetName='ByInitiatorId')] [Parameter(ParameterSetName='ByOffloadDataTransferSetting')] [Parameter(ParameterSetName='ByDisk')] [Parameter(ParameterSetName='ByPartition')] [Parameter(ParameterSetName='ByVolume')] [Parameter(ParameterSetName='ByFileServer')] [Parameter(ParameterSetName='ByStorageFaultDomain')] [ValidateNotNull()] [string[]] ${Model}, [Parameter(ParameterSetName='ByStorageProvider', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageProvider')] [ValidateNotNull()] [ciminstance] ${StorageProvider}, [Parameter(ParameterSetName='ByStorageNode', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageNode')] [ValidateNotNull()] [ciminstance] ${StorageNode}, [Parameter(ParameterSetName='ByStoragePool', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StoragePool')] [ValidateNotNull()] [ciminstance] ${StoragePool}, [Parameter(ParameterSetName='ByVirtualDisk', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_VirtualDisk')] [ValidateNotNull()] [ciminstance] ${VirtualDisk}, [Parameter(ParameterSetName='ByMaskingSet', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_MaskingSet')] [ValidateNotNull()] [ciminstance] ${MaskingSet}, [Parameter(ParameterSetName='ByTargetPort', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_TargetPort')] [ValidateNotNull()] [ciminstance] ${TargetPort}, [Parameter(ParameterSetName='ByTargetPortal', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_TargetPortal')] [ValidateNotNull()] [ciminstance] ${TargetPortal}, [Parameter(ParameterSetName='ByInitiatorId', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_InitiatorId')] [ValidateNotNull()] [ciminstance] ${InitiatorId}, [Parameter(ParameterSetName='ByOffloadDataTransferSetting', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_OffloadDataTransferSetting')] [ValidateNotNull()] [ciminstance] ${OffloadDataTransferSetting}, [Parameter(ParameterSetName='ByDisk', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Disk')] [ValidateNotNull()] [ciminstance] ${Disk}, [Parameter(ParameterSetName='ByPartition', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Partition')] [ValidateNotNull()] [ciminstance] ${Partition}, [Parameter(ParameterSetName='ByVolume', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Volume')] [ValidateNotNull()] [ciminstance] ${Volume}, [Parameter(ParameterSetName='ByFileServer', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_FileServer')] [ValidateNotNull()] [ciminstance] ${FileServer}, [Parameter(ParameterSetName='ByStorageFaultDomain', ValueFromPipeline=$true)] [Alias('PhysicalDisk','StorageEnclosure','StorageScaleUnit','StorageChassis','StorageRack','StorageSite')] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageFaultDomain')] [ValidateNotNull()] [ciminstance] ${StorageFaultDomain}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByStorageProvider')] [Parameter(ParameterSetName='ByStorageNode')] [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByMaskingSet')] [Parameter(ParameterSetName='ByTargetPort')] [Parameter(ParameterSetName='ByTargetPortal')] [Parameter(ParameterSetName='ByInitiatorId')] [Parameter(ParameterSetName='ByOffloadDataTransferSetting')] [Parameter(ParameterSetName='ByDisk')] [Parameter(ParameterSetName='ByPartition')] [Parameter(ParameterSetName='ByVolume')] [Parameter(ParameterSetName='ByFileServer')] [Parameter(ParameterSetName='ByStorageFaultDomain')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByStorageProvider')] [Parameter(ParameterSetName='ByStorageNode')] [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByMaskingSet')] [Parameter(ParameterSetName='ByTargetPort')] [Parameter(ParameterSetName='ByTargetPortal')] [Parameter(ParameterSetName='ByInitiatorId')] [Parameter(ParameterSetName='ByOffloadDataTransferSetting')] [Parameter(ParameterSetName='ByDisk')] [Parameter(ParameterSetName='ByPartition')] [Parameter(ParameterSetName='ByVolume')] [Parameter(ParameterSetName='ByFileServer')] [Parameter(ParameterSetName='ByStorageFaultDomain')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByStorageProvider')] [Parameter(ParameterSetName='ByStorageNode')] [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByMaskingSet')] [Parameter(ParameterSetName='ByTargetPort')] [Parameter(ParameterSetName='ByTargetPortal')] [Parameter(ParameterSetName='ByInitiatorId')] [Parameter(ParameterSetName='ByOffloadDataTransferSetting')] [Parameter(ParameterSetName='ByDisk')] [Parameter(ParameterSetName='ByPartition')] [Parameter(ParameterSetName='ByVolume')] [Parameter(ParameterSetName='ByFileServer')] [Parameter(ParameterSetName='ByStorageFaultDomain')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Name') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Name}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('HealthStatus') -and (@('ByUniqueId', 'ByFriendlyName', 'ByName', 'ByStorageProvider', 'ByStorageNode', 'ByStoragePool', 'ByVirtualDisk', 'ByMaskingSet', 'ByTargetPort', 'ByTargetPortal', 'ByInitiatorId', 'ByOffloadDataTransferSetting', 'ByDisk', 'ByPartition', 'ByVolume', 'ByFileServer', 'ByStorageFaultDomain') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${HealthStatus}) $__cmdletization_queryBuilder.FilterByProperty('HealthStatus', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('Manufacturer') -and (@('ByUniqueId', 'ByFriendlyName', 'ByName', 'ByStorageProvider', 'ByStorageNode', 'ByStoragePool', 'ByVirtualDisk', 'ByMaskingSet', 'ByTargetPort', 'ByTargetPortal', 'ByInitiatorId', 'ByOffloadDataTransferSetting', 'ByDisk', 'ByPartition', 'ByVolume', 'ByFileServer', 'ByStorageFaultDomain') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Manufacturer}) $__cmdletization_queryBuilder.FilterByProperty('Manufacturer', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Model') -and (@('ByUniqueId', 'ByFriendlyName', 'ByName', 'ByStorageProvider', 'ByStorageNode', 'ByStoragePool', 'ByVirtualDisk', 'ByMaskingSet', 'ByTargetPort', 'ByTargetPortal', 'ByInitiatorId', 'ByOffloadDataTransferSetting', 'ByDisk', 'ByPartition', 'ByVolume', 'ByFileServer', 'ByStorageFaultDomain') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Model}) $__cmdletization_queryBuilder.FilterByProperty('Model', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('StorageProvider') -and (@('ByStorageProvider') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StorageProvider}, 'MSFT_StorageProviderToStorageSubSystem', 'StorageProvider', 'StorageSubSystem', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('StorageNode') -and (@('ByStorageNode') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StorageNode}, 'MSFT_StorageSubSystemToStorageNode', 'StorageNode', 'StorageSubSystem', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('StoragePool') -and (@('ByStoragePool') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StoragePool}, 'MSFT_StorageSubSystemToStoragePool', 'StoragePool', 'StorageSubSystem', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('VirtualDisk') -and (@('ByVirtualDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${VirtualDisk}, 'MSFT_StorageSubSystemToVirtualDisk', 'VirtualDisk', 'StorageSubSystem', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('MaskingSet') -and (@('ByMaskingSet') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${MaskingSet}, 'MSFT_StorageSubSystemToMaskingSet', 'MaskingSet', 'StorageSubSystem', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('TargetPort') -and (@('ByTargetPort') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${TargetPort}, 'MSFT_StorageSubSystemToTargetPort', 'TargetPort', 'StorageSubSystem', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('TargetPortal') -and (@('ByTargetPortal') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${TargetPortal}, 'MSFT_StorageSubSystemToTargetPortal', 'TargetPortal', 'StorageSubSystem', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('InitiatorId') -and (@('ByInitiatorId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${InitiatorId}, 'MSFT_StorageSubSystemToInitiatorId', 'InitiatorId', 'StorageSubSystem', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('OffloadDataTransferSetting') -and (@('ByOffloadDataTransferSetting') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${OffloadDataTransferSetting}, 'MSFT_StorageSubSystemToOffloadDataTransferSetting', 'OffloadDataTransferSetting', 'StorageSubSystem', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('Disk') -and (@('ByDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${Disk}, 'MSFT_StorageSubSystemToDisk', 'Disk', 'StorageSubSystem', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('Partition') -and (@('ByPartition') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${Partition}, 'MSFT_StorageSubSystemToPartition', 'Partition', 'StorageSubSystem', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('Volume') -and (@('ByVolume') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${Volume}, 'MSFT_StorageSubSystemToVolume', 'Volume', 'StorageSubSystem', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('FileServer') -and (@('ByFileServer') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${FileServer}, 'MSFT_StorageSubSystemToFileServer', 'FileServer', 'StorageSubSystem', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('StorageFaultDomain') -and (@('ByStorageFaultDomain') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StorageFaultDomain}, 'MSFT_StorageSubSystemToStorageFaultDomain', 'StorageFaultDomain', 'StorageSubSystem', 'SilentlyContinue') } $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder) ScriptBlock ID: 7c57da61-20a6-46a5-afb1-fb2765426cf6 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905189 Keywords=None Message=Completed invocation of ScriptBlock ID: 83b60a9a-32fd-4736-beba-b4565352fa95 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905188 Keywords=None Message=Started invocation of ScriptBlock ID: 83b60a9a-32fd-4736-beba-b4565352fa95 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905187 Keywords=None Message=Creating Scriptblock text (1 of 1): #requires -version 3.0 try { Microsoft.PowerShell.Core\Set-StrictMode -Off } catch { } $script:MyModule = $MyInvocation.MyCommand.ScriptBlock.Module $script:ClassName = 'ROOT/Microsoft/Windows/Storage/MSFT_StorageSetting' $script:ClassVersion = '' $script:ModuleVersion = '1.0.0.0' $script:ObjectModelWrapper = [Microsoft.PowerShell.Cmdletization.Cim.CimCmdletAdapter] $script:PrivateData = [System.Collections.Generic.Dictionary[string,string]]::new() Microsoft.PowerShell.Core\Export-ModuleMember -Function @() function __cmdletization_BindCommonParameters { param( $__cmdletization_objectModelWrapper, $myPSBoundParameters ) if ($myPSBoundParameters.ContainsKey('CimSession')) { $__cmdletization_objectModelWrapper.PSObject.Properties['CimSession'].Value = $myPSBoundParameters['CimSession'] } if ($myPSBoundParameters.ContainsKey('ThrottleLimit')) { $__cmdletization_objectModelWrapper.PSObject.Properties['ThrottleLimit'].Value = $myPSBoundParameters['ThrottleLimit'] } if ($myPSBoundParameters.ContainsKey('AsJob')) { $__cmdletization_objectModelWrapper.PSObject.Properties['AsJob'].Value = $myPSBoundParameters['AsJob'] } } function Get-StorageSetting { [CmdletBinding(PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] param( [Parameter(ParameterSetName='Get0')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='Get0')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='Get0')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StorageSetting'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Get', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageSetting.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-StorageSetting' -Alias '*' function Set-StorageSetting { [CmdletBinding(PositionalBinding=$false)] param( [Parameter(ParameterSetName='Set1')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSetting.NewDiskPolicy] ${NewDiskPolicy}, [Parameter(ParameterSetName='Set1')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSetting.ScrubPolicy] ${ScrubPolicy}, [Parameter(ParameterSetName='Set1')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='Set1')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='Set1')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NewDiskPolicy')) { [object]$__cmdletization_value = ${NewDiskPolicy} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewDiskPolicy'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSetting.NewDiskPolicy'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewDiskPolicy'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSetting.NewDiskPolicy'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ScrubPolicy')) { [object]$__cmdletization_value = ${ScrubPolicy} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ScrubPolicy'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSetting.ScrubPolicy'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ScrubPolicy'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageSetting.ScrubPolicy'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Set', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageSetting.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Set-StorageSetting' -Alias '*' function Update-HostStorageCache { [CmdletBinding(PositionalBinding=$false)] param( [Parameter(ParameterSetName='UpdateHostStorageCache2')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='UpdateHostStorageCache2')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='UpdateHostStorageCache2')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('UpdateHostStorageCache', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageSetting.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Update-HostStorageCache' -Alias '*' ScriptBlock ID: 83b60a9a-32fd-4736-beba-b4565352fa95 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905186 Keywords=None Message=Completed invocation of ScriptBlock ID: 374a2180-4eda-4983-a4cd-36c6e4c839cd Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905185 Keywords=None Message=Started invocation of ScriptBlock ID: 374a2180-4eda-4983-a4cd-36c6e4c839cd Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905184 Keywords=None Message=Creating Scriptblock text (1 of 1): #requires -version 3.0 try { Microsoft.PowerShell.Core\Set-StrictMode -Off } catch { } $script:MyModule = $MyInvocation.MyCommand.ScriptBlock.Module $script:ClassName = 'ROOT/Microsoft/Windows/Storage/MSFT_StorageReliabilityCounter' $script:ClassVersion = '' $script:ModuleVersion = '1.0.0.0' $script:ObjectModelWrapper = [Microsoft.PowerShell.Cmdletization.Cim.CimCmdletAdapter] $script:PrivateData = [System.Collections.Generic.Dictionary[string,string]]::new() Microsoft.PowerShell.Core\Export-ModuleMember -Function @() function __cmdletization_BindCommonParameters { param( $__cmdletization_objectModelWrapper, $myPSBoundParameters ) if ($myPSBoundParameters.ContainsKey('CimSession')) { $__cmdletization_objectModelWrapper.PSObject.Properties['CimSession'].Value = $myPSBoundParameters['CimSession'] } if ($myPSBoundParameters.ContainsKey('ThrottleLimit')) { $__cmdletization_objectModelWrapper.PSObject.Properties['ThrottleLimit'].Value = $myPSBoundParameters['ThrottleLimit'] } if ($myPSBoundParameters.ContainsKey('AsJob')) { $__cmdletization_objectModelWrapper.PSObject.Properties['AsJob'].Value = $myPSBoundParameters['AsJob'] } } function Get-StorageReliabilityCounterDeprecated { [CmdletBinding(PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StorageReliabilityCounter')] param( [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [int] ${ThrottleLimit}, [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder) } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageReliabilityCounter.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-StorageReliabilityCounterDeprecated' -Alias '*' function Reset-StorageReliabilityCounter { [CmdletBinding(PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StorageReliabilityCounter')] param( [Parameter(ParameterSetName='ByPhysicalDisk', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_PhysicalDisk')] [ValidateNotNull()] [ciminstance] ${PhysicalDisk}, [Parameter(ParameterSetName='ByDisk', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Disk')] [ValidateNotNull()] [ciminstance] ${Disk}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageReliabilityCounter')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByPhysicalDisk')] [Parameter(ParameterSetName='ByDisk')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByPhysicalDisk')] [Parameter(ParameterSetName='ByDisk')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByPhysicalDisk')] [Parameter(ParameterSetName='ByDisk')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByPhysicalDisk')] [Parameter(ParameterSetName='ByDisk')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('PhysicalDisk') -and (@('ByPhysicalDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${PhysicalDisk}, 'MSFT_PhysicalDiskToStorageReliabilityCounter', 'PhysicalDisk', 'StorageReliabilityCounter', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('Disk') -and (@('ByDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${Disk}, 'MSFT_DiskToStorageReliabilityCounter', 'Disk', 'StorageReliabilityCounter', 'SilentlyContinue') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByPhysicalDisk', 'ByDisk', 'InputObject (cdxml)') -contains $_ } { $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Reset', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageReliabilityCounter.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Reset-StorageReliabilityCounter' -Alias '*' ScriptBlock ID: 374a2180-4eda-4983-a4cd-36c6e4c839cd Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905183 Keywords=None Message=Completed invocation of ScriptBlock ID: 03aa9579-ad36-4309-a5c6-c340782ac786 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905182 Keywords=None Message=Started invocation of ScriptBlock ID: 03aa9579-ad36-4309-a5c6-c340782ac786 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905181 Keywords=None Message=Creating Scriptblock text (5 of 5): Set-StorageProvider' -Alias '*' ScriptBlock ID: 03aa9579-ad36-4309-a5c6-c340782ac786 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905180 Keywords=None Message=Creating Scriptblock text (4 of 5): letization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Force')) { [object]$__cmdletization_value = ${Force} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Force'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Force'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('UnregisterSubsystem', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageProvider.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Unregister-StorageSubsystem' -Alias '*' function Set-StorageProvider { [CmdletBinding(DefaultParameterSetName='ByName', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StorageProvider')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('ProviderId')] [ValidateNotNull()] [string[]] ${ProviderUniqueId}, [Parameter(ParameterSetName='ByName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${ProviderName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageProvider')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageProvider.RemoteSubsystemCacheMode] ${RemoteSubsystemCacheMode}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('ProviderUniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${ProviderUniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('ProviderName') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${ProviderName}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'ReportErrors') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('RemoteSubsystemCacheMode')) { [object]$__cmdletization_value = ${RemoteSubsystemCacheMode} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'RemoteSubsystemCacheMode'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageProvider.RemoteSubsystemCacheMode'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'RemoteSubsystemCacheMode'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageProvider.RemoteSubsystemCacheMode'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetAttributes', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageProvider.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function ' ScriptBlock ID: 03aa9579-ad36-4309-a5c6-c340782ac786 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905179 Keywords=None Message=Creating Scriptblock text (3 of 5): BoundParameters.ContainsKey('ProviderUniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${ProviderUniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('ProviderName') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${ProviderName}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'ReportErrors') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ComputerName')) { [object]$__cmdletization_value = ${ComputerName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ComputerName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ComputerName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Credential')) { [object]$__cmdletization_value = ${Credential} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Credential'; ParameterType = 'System.Management.Automation.PSCredential'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Credential'; ParameterType = 'System.Management.Automation.PSCredential'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'RegisteredSubsystem'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('RegisterSubsystem', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $false if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageProvider.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Register-StorageSubsystem' -Alias '*' function Unregister-StorageSubsystem { [CmdletBinding(DefaultParameterSetName='ByName', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StorageProvider')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('ProviderId')] [ValidateNotNull()] [string[]] ${ProviderUniqueId}, [Parameter(ParameterSetName='ByName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${ProviderName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageProvider')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId', ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByName', ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='InputObject (cdxml)', ValueFromPipelineByPropertyName=$true)] [Alias('UniqueId')] [string] ${StorageSubSystemUniqueId}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${Force}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('ProviderUniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${ProviderUniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('ProviderName') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${ProviderName}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'ReportErrors') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('StorageSubSystemUniqueId')) { [object]$__cmdletization_value = ${StorageSubSystemUniqueId} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StorageSubSystemUniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StorageSubSystemUniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmd ScriptBlock ID: 03aa9579-ad36-4309-a5c6-c340782ac786 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905178 Keywords=None Message=Creating Scriptblock text (2 of 5): xceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Name') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Name}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Manufacturer') -and (@('ByURI', 'ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Manufacturer}) $__cmdletization_queryBuilder.FilterByProperty('Manufacturer', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('URI') -and (@('ByURI') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${URI}) $__cmdletization_queryBuilder.FilterByProperty('URI', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('StorageSubSystem') -and (@('ByStorageSubSystem') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StorageSubSystem}, 'MSFT_StorageProviderToStorageSubSystem', 'StorageSubSystem', 'StorageProvider', 'SilentlyContinue') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByName', 'ByURI', 'ByStorageSubSystem', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('DiscoveryLevel')) { [object]$__cmdletization_value = ${DiscoveryLevel} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DiscoveryLevel'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageProvider.DiscoveryLevel'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DiscoveryLevel'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageProvider.DiscoveryLevel'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('RootObject')) { [object]$__cmdletization_value = ${RootObject} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'RootObject'; ParameterType = 'System.Management.Automation.PSReference'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'RootObject'; ParameterType = 'System.Management.Automation.PSReference'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Discover', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageProvider.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Update-StorageProviderCache' -Alias '*' function Register-StorageSubsystem { [CmdletBinding(DefaultParameterSetName='ByName', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('ProviderId')] [ValidateNotNull()] [string[]] ${ProviderUniqueId}, [Parameter(ParameterSetName='ByName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${ProviderName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageProvider')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true)] [Parameter(ParameterSetName='ByName', Mandatory=$true)] [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true)] [Alias('CN')] [string] ${ComputerName}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [pscredential] [System.Management.Automation.CredentialAttribute()] ${Credential}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PS ScriptBlock ID: 03aa9579-ad36-4309-a5c6-c340782ac786 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905177 Keywords=None Message=Creating Scriptblock text (1 of 5): #requires -version 3.0 try { Microsoft.PowerShell.Core\Set-StrictMode -Off } catch { } $script:MyModule = $MyInvocation.MyCommand.ScriptBlock.Module $script:ClassName = 'ROOT/Microsoft/Windows/Storage/MSFT_StorageProvider' $script:ClassVersion = '' $script:ModuleVersion = '1.0.0.0' $script:ObjectModelWrapper = [Microsoft.PowerShell.Cmdletization.Cim.CimCmdletAdapter] $script:PrivateData = [System.Collections.Generic.Dictionary[string,string]]::new() Microsoft.PowerShell.Core\Export-ModuleMember -Function @() function __cmdletization_BindCommonParameters { param( $__cmdletization_objectModelWrapper, $myPSBoundParameters ) if ($myPSBoundParameters.ContainsKey('CimSession')) { $__cmdletization_objectModelWrapper.PSObject.Properties['CimSession'].Value = $myPSBoundParameters['CimSession'] } if ($myPSBoundParameters.ContainsKey('ThrottleLimit')) { $__cmdletization_objectModelWrapper.PSObject.Properties['ThrottleLimit'].Value = $myPSBoundParameters['ThrottleLimit'] } if ($myPSBoundParameters.ContainsKey('AsJob')) { $__cmdletization_objectModelWrapper.PSObject.Properties['AsJob'].Value = $myPSBoundParameters['AsJob'] } } function Get-StorageProvider { [CmdletBinding(DefaultParameterSetName='ByName', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StorageProvider')] param( [Parameter(ParameterSetName='ByUniqueId', ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByName', Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Name}, [Parameter(ParameterSetName='ByURI', ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByName', ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Manufacturer}, [Parameter(ParameterSetName='ByURI', ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [uri[]] ${URI}, [Parameter(ParameterSetName='ByStorageSubSystem', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageSubSystem')] [ValidateNotNull()] [ciminstance] ${StorageSubSystem}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByURI')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByURI')] [Parameter(ParameterSetName='ByStorageSubSystem')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByURI')] [Parameter(ParameterSetName='ByStorageSubSystem')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Name') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Name}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Manufacturer') -and (@('ByURI', 'ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Manufacturer}) $__cmdletization_queryBuilder.FilterByProperty('Manufacturer', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('URI') -and (@('ByURI') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${URI}) $__cmdletization_queryBuilder.FilterByProperty('URI', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('StorageSubSystem') -and (@('ByStorageSubSystem') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StorageSubSystem}, 'MSFT_StorageProviderToStorageSubSystem', 'StorageSubSystem', 'StorageProvider', 'SilentlyContinue') } $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder) } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageProvider.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-StorageProvider' -Alias '*' function Update-StorageProviderCache { [CmdletBinding(DefaultParameterSetName='ByName', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StorageProvider')] param( [Parameter(ParameterSetName='ByUniqueId', ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByName', Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Name}, [Parameter(ParameterSetName='ByURI', ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByName', ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Manufacturer}, [Parameter(ParameterSetName='ByURI', ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [uri[]] ${URI}, [Parameter(ParameterSetName='ByStorageSubSystem', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageSubSystem')] [ValidateNotNull()] [ciminstance] ${StorageSubSystem}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageProvider')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByURI')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageProvider.DiscoveryLevel] ${DiscoveryLevel}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByURI')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ref] ${RootObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByURI')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByURI')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByURI')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByURI')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_e ScriptBlock ID: 03aa9579-ad36-4309-a5c6-c340782ac786 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905176 Keywords=None Message=Completed invocation of ScriptBlock ID: bc892584-3f85-4409-bab8-7531851b6621 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905175 Keywords=None Message=Started invocation of ScriptBlock ID: bc892584-3f85-4409-bab8-7531851b6621 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905174 Keywords=None Message=Creating Scriptblock text (7 of 7): eIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('GetSupportedSize', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $false if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StoragePool.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-VirtualDiskSupportedSize' -Alias '*' ScriptBlock ID: bc892584-3f85-4409-bab8-7531851b6621 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905173 Keywords=None Message=Creating Scriptblock text (6 of 7): } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StoragePool.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Update-StoragePool' -Alias '*' function Optimize-StoragePool { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', SupportsShouldProcess=$true, ConfirmImpact='Medium', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StoragePool')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='ByName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Name}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StoragePool')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('Name') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Name}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $false, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('true', 'System.Boolean') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:FromPowerShell'; ParameterType = 'System.Boolean'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Optimize', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StoragePool.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Optimize-StoragePool' -Alias '*' function Get-VirtualDiskSupportedSize { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', PositionalBinding=$false)] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('StoragePoolId','UniqueId')] [ValidateNotNull()] [string[]] ${StoragePoolUniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [Alias('FriendlyName')] [ValidateNotNull()] [string[]] ${StoragePoolFriendlyName}, [Parameter(ParameterSetName='ByName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${StoragePoolName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StoragePool')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId', ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByFriendlyName', ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByName', ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='InputObject (cdxml)', ValueFromPipelineByPropertyName=$true)] [Alias('Name')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${ResiliencySettingName}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StoragePool.FaultDomainType] ${FaultDomainAwareness}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('StoragePoolUniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StoragePoolUniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('StoragePoolFriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StoragePoolFriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('StoragePoolName') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StoragePoolName}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ResiliencySettingName')) { [object]$__cmdletization_value = ${ResiliencySettingName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ResiliencySettingName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ResiliencySettingName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FaultDomainAwareness')) { [object]$__cmdletization_value = ${FaultDomainAwareness} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwareness'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StoragePool.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwareness'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StoragePool.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'SupportedSizes'; ParameterType = 'System.UInt64[]'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VirtualDiskSizeMin'; ParameterType = 'System.UInt64'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VirtualDiskSizeMax'; ParameterType = 'System.UInt64'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VirtualDiskSizeDivisor'; ParameterType = 'System.UInt64'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValu ScriptBlock ID: bc892584-3f85-4409-bab8-7531851b6621 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905172 Keywords=None Message=Creating Scriptblock text (5 of 7): thodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Interleave')) { [object]$__cmdletization_value = ${Interleave} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Interleave'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Interleave'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Description')) { [object]$__cmdletization_value = ${Description} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Description'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Description'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'CreatedStorageTier'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('CreateStorageTier', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $false if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StoragePool.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'New-StorageTier' -Alias '*' function Remove-StoragePool { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', SupportsShouldProcess=$true, ConfirmImpact='High', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StoragePool')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='ByName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Name}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StoragePool')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('Name') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Name}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $false, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('DeleteObject', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StoragePool.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Remove-StoragePool' -Alias '*' function Update-StoragePool { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', SupportsShouldProcess=$true, ConfirmImpact='High', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StoragePool')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='ByName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Name}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StoragePool')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('Name') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Name}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $false, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('Upgrade', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } ScriptBlock ID: bc892584-3f85-4409-bab8-7531851b6621 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905171 Keywords=None Message=Creating Scriptblock text (4 of 7): n_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StoragePool.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'New-VirtualDisk' -Alias '*' function New-StorageTier { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('StoragePoolId')] [ValidateNotNull()] [string[]] ${StoragePoolUniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${StoragePoolFriendlyName}, [Parameter(ParameterSetName='ByName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${StoragePoolName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StoragePool')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true)] [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true)] [Parameter(ParameterSetName='ByName', Mandatory=$true)] [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true)] [Alias('StorageTierFriendlyName')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${FriendlyName}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StoragePool.MediaType] ${MediaType}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StoragePool.FaultDomainType] ${FaultDomainAwareness}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StoragePool.FaultDomainType] ${ColumnIsolation}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${ResiliencySettingName}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [uint16] ${PhysicalDiskRedundancy}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [uint16] ${NumberOfDataCopies}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [uint16] ${NumberOfGroups}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [uint16] ${NumberOfColumns}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [uint64] ${Interleave}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${Description}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('StoragePoolUniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StoragePoolUniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('StoragePoolFriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StoragePoolFriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('StoragePoolName') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StoragePoolName}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FriendlyName')) { [object]$__cmdletization_value = ${FriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('MediaType')) { [object]$__cmdletization_value = ${MediaType} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MediaType'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StoragePool.MediaType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MediaType'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StoragePool.MediaType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FaultDomainAwareness')) { [object]$__cmdletization_value = ${FaultDomainAwareness} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwareness'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StoragePool.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwareness'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StoragePool.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ColumnIsolation')) { [object]$__cmdletization_value = ${ColumnIsolation} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ColumnIsolation'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StoragePool.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ColumnIsolation'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StoragePool.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ResiliencySettingName')) { [object]$__cmdletization_value = ${ResiliencySettingName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ResiliencySettingName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ResiliencySettingName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PhysicalDiskRedundancy')) { [object]$__cmdletization_value = ${PhysicalDiskRedundancy} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDiskRedundancy'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDiskRedundancy'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NumberOfDataCopies')) { [object]$__cmdletization_value = ${NumberOfDataCopies} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfDataCopies'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfDataCopies'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NumberOfGroups')) { [object]$__cmdletization_value = ${NumberOfGroups} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfGroups'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfGroups'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NumberOfColumns')) { [object]$__cmdletization_value = ${NumberOfColumns} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfColumns'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfColumns'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_me ScriptBlock ID: bc892584-3f85-4409-bab8-7531851b6621 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905170 Keywords=None Message=Creating Scriptblock text (3 of 7): ; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('MediaType')) { [object]$__cmdletization_value = ${MediaType} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MediaType'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StoragePool.MediaType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MediaType'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StoragePool.MediaType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsEnclosureAware')) { [object]$__cmdletization_value = ${IsEnclosureAware} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsEnclosureAware'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsEnclosureAware'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FaultDomainAwareness')) { [object]$__cmdletization_value = ${FaultDomainAwareness} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwareness'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StoragePool.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwareness'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StoragePool.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ColumnIsolation')) { [object]$__cmdletization_value = ${ColumnIsolation} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ColumnIsolation'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StoragePool.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ColumnIsolation'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StoragePool.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PhysicalDisksToUse')) { [object]$__cmdletization_value = ${PhysicalDisksToUse} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisksToUse'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisksToUse'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_PhysicalDisk' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PhysicalDiskRedundancy')) { [object]$__cmdletization_value = ${PhysicalDiskRedundancy} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDiskRedundancy'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDiskRedundancy'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NumberOfDataCopies')) { [object]$__cmdletization_value = ${NumberOfDataCopies} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfDataCopies'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfDataCopies'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NumberOfColumns')) { [object]$__cmdletization_value = ${NumberOfColumns} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfColumns'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfColumns'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('AutoNumberOfColumns')) { [object]$__cmdletization_value = ${AutoNumberOfColumns} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AutoNumberOfColumns'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AutoNumberOfColumns'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NumberOfGroups')) { [object]$__cmdletization_value = ${NumberOfGroups} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfGroups'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfGroups'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Interleave')) { [object]$__cmdletization_value = ${Interleave} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Interleave'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Interleave'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('StorageTiers')) { [object]$__cmdletization_value = ${StorageTiers} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StorageTiers'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StorageTiers'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageTier' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('StorageTierSizes')) { [object]$__cmdletization_value = ${StorageTierSizes} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StorageTierSizes'; ParameterType = 'System.UInt64[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StorageTierSizes'; ParameterType = 'System.UInt64[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('WriteCacheSize')) { [object]$__cmdletization_value = ${WriteCacheSize} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'WriteCacheSize'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'WriteCacheSize'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('AutoWriteCacheSize')) { [object]$__cmdletization_value = ${AutoWriteCacheSize} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AutoWriteCacheSize'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AutoWriteCacheSize'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ReadCacheSize')) { [object]$__cmdletization_value = ${ReadCacheSize} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ReadCacheSize'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ReadCacheSize'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'CreatedVirtualDisk'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('CreateVirtualDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $false if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletizatio ScriptBlock ID: bc892584-3f85-4409-bab8-7531851b6621 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905169 Keywords=None Message=Creating Scriptblock text (2 of 7): [ValidateNotNullOrEmpty()] [string] ${OtherUsageDescription}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${ResiliencySettingName}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [uint64] ${Size}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [switch] ${UseMaximumSize}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StoragePool.ProvisioningType] ${ProvisioningType}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [uint64] ${AllocationUnitSize}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StoragePool.MediaType] ${MediaType}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [bool] ${IsEnclosureAware}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StoragePool.FaultDomainType] ${FaultDomainAwareness}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StoragePool.FaultDomainType] ${ColumnIsolation}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_PhysicalDisk')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ciminstance[]] ${PhysicalDisksToUse}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [uint16] ${PhysicalDiskRedundancy}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [uint16] ${NumberOfDataCopies}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [uint16] ${NumberOfColumns}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AutoNumberOfColumns}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [uint16] ${NumberOfGroups}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [uint64] ${Interleave}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageTier')] [ciminstance[]] ${StorageTiers}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [uint64[]] ${StorageTierSizes}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [uint64] ${WriteCacheSize}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AutoWriteCacheSize}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [uint64] ${ReadCacheSize}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('StoragePoolUniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StoragePoolUniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('StoragePoolFriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StoragePoolFriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('StoragePoolName') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${StoragePoolName}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FriendlyName')) { [object]$__cmdletization_value = ${FriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Usage')) { [object]$__cmdletization_value = ${Usage} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StoragePool.CreateVirtualDisk.Usage'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StoragePool.CreateVirtualDisk.Usage'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('OtherUsageDescription')) { [object]$__cmdletization_value = ${OtherUsageDescription} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'OtherUsageDescription'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'OtherUsageDescription'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ResiliencySettingName')) { [object]$__cmdletization_value = ${ResiliencySettingName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ResiliencySettingName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ResiliencySettingName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Size')) { [object]$__cmdletization_value = ${Size} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Size'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Size'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('UseMaximumSize')) { [object]$__cmdletization_value = ${UseMaximumSize} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UseMaximumSize'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UseMaximumSize'; ParameterType = 'System.Management.Automation.SwitchParameter'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ProvisioningType')) { [object]$__cmdletization_value = ${ProvisioningType} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ProvisioningType'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StoragePool.ProvisioningType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ProvisioningType'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StoragePool.ProvisioningType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('AllocationUnitSize')) { [object]$__cmdletization_value = ${AllocationUnitSize} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AllocationUnitSize'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AllocationUnitSize'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_defaultValue ScriptBlock ID: bc892584-3f85-4409-bab8-7531851b6621 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905168 Keywords=None Message=Creating Scriptblock text (1 of 7): #requires -version 3.0 try { Microsoft.PowerShell.Core\Set-StrictMode -Off } catch { } $script:MyModule = $MyInvocation.MyCommand.ScriptBlock.Module $script:ClassName = 'ROOT/Microsoft/Windows/Storage/MSFT_StoragePool' $script:ClassVersion = '' $script:ModuleVersion = '1.0.0.0' $script:ObjectModelWrapper = [Microsoft.PowerShell.Cmdletization.Cim.CimCmdletAdapter] $script:PrivateData = [System.Collections.Generic.Dictionary[string,string]]::new() Microsoft.PowerShell.Core\Export-ModuleMember -Function @() function __cmdletization_BindCommonParameters { param( $__cmdletization_objectModelWrapper, $myPSBoundParameters ) if ($myPSBoundParameters.ContainsKey('CimSession')) { $__cmdletization_objectModelWrapper.PSObject.Properties['CimSession'].Value = $myPSBoundParameters['CimSession'] } if ($myPSBoundParameters.ContainsKey('ThrottleLimit')) { $__cmdletization_objectModelWrapper.PSObject.Properties['ThrottleLimit'].Value = $myPSBoundParameters['ThrottleLimit'] } if ($myPSBoundParameters.ContainsKey('AsJob')) { $__cmdletization_objectModelWrapper.PSObject.Properties['AsJob'].Value = $myPSBoundParameters['AsJob'] } } function Get-StoragePool { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StoragePool')] param( [Parameter(ParameterSetName='ByUniqueId', ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='ByName', ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Name}, [Parameter(ParameterSetName='ByFriendlyName', ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByUsage', ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StoragePool.Usage[]] ${Usage}, [Parameter(ParameterSetName='ByUsage', ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${OtherUsageDescription}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByUsage')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStorageNode')] [Parameter(ParameterSetName='ByPhysicalDisk')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByResiliencySetting')] [Parameter(ParameterSetName='ByStorageTier')] [Parameter(ParameterSetName='ByVolume')] [Parameter(ParameterSetName='ByStorageJob')] [ValidateNotNull()] [bool[]] ${IsPrimordial}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByUsage')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStorageNode')] [Parameter(ParameterSetName='ByPhysicalDisk')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByResiliencySetting')] [Parameter(ParameterSetName='ByStorageTier')] [Parameter(ParameterSetName='ByVolume')] [Parameter(ParameterSetName='ByStorageJob')] [ValidateNotNull()] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StoragePool.HealthStatus[]] ${HealthStatus}, [Parameter(ParameterSetName='ByStorageSubSystem', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageSubSystem')] [ValidateNotNull()] [ciminstance] ${StorageSubSystem}, [Parameter(ParameterSetName='ByStorageNode', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageNode')] [ValidateNotNull()] [ciminstance] ${StorageNode}, [Parameter(ParameterSetName='ByPhysicalDisk', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_PhysicalDisk')] [ValidateNotNull()] [ciminstance] ${PhysicalDisk}, [Parameter(ParameterSetName='ByVirtualDisk', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_VirtualDisk')] [ValidateNotNull()] [ciminstance] ${VirtualDisk}, [Parameter(ParameterSetName='ByResiliencySetting', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_ResiliencySetting')] [ValidateNotNull()] [ciminstance] ${ResiliencySetting}, [Parameter(ParameterSetName='ByStorageTier', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageTier')] [ValidateNotNull()] [ciminstance] ${StorageTier}, [Parameter(ParameterSetName='ByVolume', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Volume')] [ValidateNotNull()] [ciminstance] ${Volume}, [Parameter(ParameterSetName='ByStorageJob', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageJob')] [ValidateNotNull()] [ciminstance] ${StorageJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByUsage')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStorageNode')] [Parameter(ParameterSetName='ByPhysicalDisk')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByResiliencySetting')] [Parameter(ParameterSetName='ByStorageTier')] [Parameter(ParameterSetName='ByVolume')] [Parameter(ParameterSetName='ByStorageJob')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByUsage')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStorageNode')] [Parameter(ParameterSetName='ByPhysicalDisk')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByResiliencySetting')] [Parameter(ParameterSetName='ByStorageTier')] [Parameter(ParameterSetName='ByVolume')] [Parameter(ParameterSetName='ByStorageJob')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByUsage')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStorageNode')] [Parameter(ParameterSetName='ByPhysicalDisk')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByResiliencySetting')] [Parameter(ParameterSetName='ByStorageTier')] [Parameter(ParameterSetName='ByVolume')] [Parameter(ParameterSetName='ByStorageJob')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Name') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Name}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Usage') -and (@('ByFriendlyName', 'ByUsage') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Usage}) $__cmdletization_queryBuilder.FilterByProperty('Usage', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('OtherUsageDescription') -and (@('ByUsage') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${OtherUsageDescription}) $__cmdletization_queryBuilder.FilterByProperty('OtherUsageDescription', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('IsPrimordial') -and (@('ByUniqueId', 'ByFriendlyName', 'ByName', 'ByUsage', 'ByStorageSubSystem', 'ByStorageNode', 'ByPhysicalDisk', 'ByVirtualDisk', 'ByResiliencySetting', 'ByStorageTier', 'ByVolume', 'ByStorageJob') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${IsPrimordial}) $__cmdletization_queryBuilder.FilterByProperty('IsPrimordial', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('HealthStatus') -and (@('ByUniqueId', 'ByFriendlyName', 'ByName', 'ByUsage', 'ByStorageSubSystem', 'ByStorageNode', 'ByPhysicalDisk', 'ByVirtualDisk', 'ByResiliencySetting', 'ByStorageTier', 'ByVolume', 'ByStorageJob') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${HealthStatus}) $__cmdletization_queryBuilder.FilterByProperty('HealthStatus', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('StorageSubSystem') -and (@('ByStorageSubSystem') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StorageSubSystem}, 'MSFT_StorageSubSystemToStoragePool', 'StorageSubSystem', 'StoragePool', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('StorageNode') -and (@('ByStorageNode') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StorageNode}, 'MSFT_StorageNodeToStoragePool', 'StorageNode', 'StoragePool', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('PhysicalDisk') -and (@('ByPhysicalDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${PhysicalDisk}, 'MSFT_StoragePoolToPhysicalDisk', 'PhysicalDisk', 'StoragePool', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('VirtualDisk') -and (@('ByVirtualDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${VirtualDisk}, 'MSFT_StoragePoolToVirtualDisk', 'VirtualDisk', 'StoragePool', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('ResiliencySetting') -and (@('ByResiliencySetting') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${ResiliencySetting}, 'MSFT_StoragePoolToResiliencySetting', 'ResiliencySetting', 'StoragePool', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('StorageTier') -and (@('ByStorageTier') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StorageTier}, 'MSFT_StoragePoolToStorageTier', 'StorageTier', 'StoragePool', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('Volume') -and (@('ByVolume') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${Volume}, 'MSFT_StoragePoolToVolume', 'Volume', 'StoragePool', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('StorageJob') -and (@('ByStorageJob') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StorageJob}, 'MSFT_StorageJobToAffectedStorageObject', 'StorageJob', 'AffectedStorageObject', 'SilentlyContinue') } $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder) } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StoragePool.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-StoragePool' -Alias '*' function New-VirtualDisk { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('StoragePoolId')] [ValidateNotNull()] [string[]] ${StoragePoolUniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${StoragePoolFriendlyName}, [Parameter(ParameterSetName='ByName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${StoragePoolName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StoragePool')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true)] [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true)] [Parameter(ParameterSetName='ByName', Mandatory=$true)] [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true)] [Alias('VirtualDiskFriendlyName')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${FriendlyName}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StoragePool.CreateVirtualDisk.Usage] ${Usage}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('VirtualDiskOtherUsageDescription')] [ValidateNotNull()] ScriptBlock ID: bc892584-3f85-4409-bab8-7531851b6621 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905167 Keywords=None Message=Completed invocation of ScriptBlock ID: f98803a6-0dc5-4e38-8c8b-36ba93f2c22c Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905166 Keywords=None Message=Started invocation of ScriptBlock ID: f98803a6-0dc5-4e38-8c8b-36ba93f2c22c Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905165 Keywords=None Message=Creating Scriptblock text (1 of 1): #requires -version 3.0 try { Microsoft.PowerShell.Core\Set-StrictMode -Off } catch { } $script:MyModule = $MyInvocation.MyCommand.ScriptBlock.Module $script:ClassName = 'ROOT/Microsoft/Windows/Storage/MSFT_StorageNode' $script:ClassVersion = '' $script:ModuleVersion = '1.0.0.0' $script:ObjectModelWrapper = [Microsoft.PowerShell.Cmdletization.Cim.CimCmdletAdapter] $script:PrivateData = [System.Collections.Generic.Dictionary[string,string]]::new() Microsoft.PowerShell.Core\Export-ModuleMember -Function @() function __cmdletization_BindCommonParameters { param( $__cmdletization_objectModelWrapper, $myPSBoundParameters ) if ($myPSBoundParameters.ContainsKey('CimSession')) { $__cmdletization_objectModelWrapper.PSObject.Properties['CimSession'].Value = $myPSBoundParameters['CimSession'] } if ($myPSBoundParameters.ContainsKey('ThrottleLimit')) { $__cmdletization_objectModelWrapper.PSObject.Properties['ThrottleLimit'].Value = $myPSBoundParameters['ThrottleLimit'] } if ($myPSBoundParameters.ContainsKey('AsJob')) { $__cmdletization_objectModelWrapper.PSObject.Properties['AsJob'].Value = $myPSBoundParameters['AsJob'] } } function Get-StorageNode { [CmdletBinding(DefaultParameterSetName='ByName', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StorageNode')] param( [Parameter(ParameterSetName='ByUniqueId', ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByObjectId', ValueFromPipelineByPropertyName=$true)] [Alias('StorageNodeObjectId')] [ValidateNotNull()] [string[]] ${ObjectId}, [Parameter(ParameterSetName='ByName', ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Name}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByObjectId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByDisk')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStorageEnclosure')] [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByPhysicalDisk')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByVolume')] [ValidateNotNull()] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageNode.OperationalStatus[]] ${OperationalStatus}, [Parameter(ParameterSetName='ByDisk', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Disk')] [ValidateNotNull()] [ciminstance] ${Disk}, [Parameter(ParameterSetName='ByStorageSubSystem', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageSubSystem')] [ValidateNotNull()] [ciminstance] ${StorageSubSystem}, [Parameter(ParameterSetName='ByStorageEnclosure', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageEnclosure')] [ValidateNotNull()] [ciminstance] ${StorageEnclosure}, [Parameter(ParameterSetName='ByStoragePool', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StoragePool')] [ValidateNotNull()] [ciminstance] ${StoragePool}, [Parameter(ParameterSetName='ByPhysicalDisk', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_PhysicalDisk')] [ValidateNotNull()] [ciminstance] ${PhysicalDisk}, [Parameter(ParameterSetName='ByVirtualDisk', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_VirtualDisk')] [ValidateNotNull()] [ciminstance] ${VirtualDisk}, [Parameter(ParameterSetName='ByVolume', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Volume')] [ValidateNotNull()] [ciminstance] ${Volume}, [Parameter(ParameterSetName='ByStorageEnclosure')] [Parameter(ParameterSetName='ByPhysicalDisk')] [switch] ${PhysicallyConnected}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByObjectId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByDisk')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStorageEnclosure')] [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByPhysicalDisk')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByVolume')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByObjectId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByDisk')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStorageEnclosure')] [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByPhysicalDisk')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByVolume')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByObjectId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByDisk')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStorageEnclosure')] [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByPhysicalDisk')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByVolume')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('ObjectId') -and (@('ByObjectId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${ObjectId}) $__cmdletization_queryBuilder.FilterByProperty('ObjectId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Name') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Name}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('OperationalStatus') -and (@('ByUniqueId', 'ByObjectId', 'ByName', 'ByDisk', 'ByStorageSubSystem', 'ByStorageEnclosure', 'ByStoragePool', 'ByPhysicalDisk', 'ByVirtualDisk', 'ByVolume') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${OperationalStatus}) $__cmdletization_queryBuilder.FilterByProperty('OperationalStatus', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('Disk') -and (@('ByDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${Disk}, 'MSFT_StorageNodeToDisk', 'Disk', 'StorageNode', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('StorageSubSystem') -and (@('ByStorageSubSystem') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StorageSubSystem}, 'MSFT_StorageSubSystemToStorageNode', 'StorageSubSystem', 'StorageNode', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('StorageEnclosure') -and (@('ByStorageEnclosure') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StorageEnclosure}, 'MSFT_StorageNodeToStorageEnclosure', 'StorageEnclosure', 'StorageNode', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('StoragePool') -and (@('ByStoragePool') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StoragePool}, 'MSFT_StorageNodeToStoragePool', 'StoragePool', 'StorageNode', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('PhysicalDisk') -and (@('ByPhysicalDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${PhysicalDisk}, 'MSFT_StorageNodeToPhysicalDisk', 'PhysicalDisk', 'StorageNode', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('VirtualDisk') -and (@('ByVirtualDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${VirtualDisk}, 'MSFT_StorageNodeToVirtualDisk', 'VirtualDisk', 'StorageNode', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('Volume') -and (@('ByVolume') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${Volume}, 'MSFT_StorageNodeToVolume', 'Volume', 'StorageNode', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('PhysicallyConnected') -and (@('ByStorageEnclosure', 'ByPhysicalDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.AddQueryOption('PhysicallyConnected', ${PhysicallyConnected}) } $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder) } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageNode.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-StorageNode' -Alias '*' ScriptBlock ID: f98803a6-0dc5-4e38-8c8b-36ba93f2c22c Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905164 Keywords=None Message=Completed invocation of ScriptBlock ID: d5bbc863-e92f-4568-a886-71d22cc97608 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905163 Keywords=None Message=Started invocation of ScriptBlock ID: d5bbc863-e92f-4568-a886-71d22cc97608 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905162 Keywords=None Message=Creating Scriptblock text (2 of 2): $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Name')) { [object]$__cmdletization_value = ${Name} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Name'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Name'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Value')) { [object]$__cmdletization_value = ${Value} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Value'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Value'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetSetting', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageHealth.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Set-StorageHealthSettingInternal' -Alias '*' function Remove-StorageHealthSettingInternal { [CmdletBinding(DefaultParameterSetName='ByUniqueId', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StorageHealth')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageHealth')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='InputObject (cdxml)')] [string] ${Name}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Name')) { [object]$__cmdletization_value = ${Name} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Name'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Name'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('RemoveSetting', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageHealth.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Remove-StorageHealthSettingInternal' -Alias '*' ScriptBlock ID: d5bbc863-e92f-4568-a886-71d22cc97608 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905161 Keywords=None Message=Creating Scriptblock text (1 of 2): #requires -version 3.0 try { Microsoft.PowerShell.Core\Set-StrictMode -Off } catch { } $script:MyModule = $MyInvocation.MyCommand.ScriptBlock.Module $script:ClassName = 'ROOT/Microsoft/Windows/Storage/MSFT_StorageHealth' $script:ClassVersion = '' $script:ModuleVersion = '1.0.0.0' $script:ObjectModelWrapper = [Microsoft.PowerShell.Cmdletization.Cim.CimCmdletAdapter] $script:PrivateData = [System.Collections.Generic.Dictionary[string,string]]::new() Microsoft.PowerShell.Core\Export-ModuleMember -Function @() function __cmdletization_BindCommonParameters { param( $__cmdletization_objectModelWrapper, $myPSBoundParameters ) if ($myPSBoundParameters.ContainsKey('CimSession')) { $__cmdletization_objectModelWrapper.PSObject.Properties['CimSession'].Value = $myPSBoundParameters['CimSession'] } if ($myPSBoundParameters.ContainsKey('ThrottleLimit')) { $__cmdletization_objectModelWrapper.PSObject.Properties['ThrottleLimit'].Value = $myPSBoundParameters['ThrottleLimit'] } if ($myPSBoundParameters.ContainsKey('AsJob')) { $__cmdletization_objectModelWrapper.PSObject.Properties['AsJob'].Value = $myPSBoundParameters['AsJob'] } } function Get-StorageHealth { [CmdletBinding(DefaultParameterSetName='ByUniqueId', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StorageHealth')] param( [Parameter(ParameterSetName='ByUniqueId', ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='BySubsystem', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageSubsystem')] [ValidateNotNull()] [ciminstance] ${Subsystem}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='BySubsystem')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='BySubsystem')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='BySubsystem')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Subsystem') -and (@('BySubsystem') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${Subsystem}, 'MSFT_StorageSubsystemToStorageHealth', 'StorageSubsystem', 'StorageHealth', 'SilentlyContinue') } $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder) } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageHealth.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-StorageHealth' -Alias '*' function Get-StorageHealthSettingInternal { [CmdletBinding(DefaultParameterSetName='ByUniqueId', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance[]])][OutputType('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageHealthSetting[]')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageHealth')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='InputObject (cdxml)')] [string] ${Name}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Name')) { [object]$__cmdletization_value = ${Name} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Name'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Name'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StorageHealthSetting'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageHealthSetting[]' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('GetSetting', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $false if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageHealth.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-StorageHealthSettingInternal' -Alias '*' function Set-StorageHealthSettingInternal { [CmdletBinding(DefaultParameterSetName='ByUniqueId', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StorageHealth')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageHealth')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='InputObject (cdxml)')] [string] ${Name}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='InputObject (cdxml)')] [string] ${Value}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = ScriptBlock ID: d5bbc863-e92f-4568-a886-71d22cc97608 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905160 Keywords=None Message=Completed invocation of ScriptBlock ID: e4e53fe7-2f35-4be4-9f16-033ea2434240 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905159 Keywords=None Message=Started invocation of ScriptBlock ID: e4e53fe7-2f35-4be4-9f16-033ea2434240 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905158 Keywords=None Message=Creating Scriptblock text (1 of 1): #requires -version 3.0 try { Microsoft.PowerShell.Core\Set-StrictMode -Off } catch { } $script:MyModule = $MyInvocation.MyCommand.ScriptBlock.Module $script:ClassName = 'ROOT/Microsoft/Windows/Storage/MSFT_StorageJob' $script:ClassVersion = '' $script:ModuleVersion = '1.0.0.0' $script:ObjectModelWrapper = [Microsoft.PowerShell.Cmdletization.Cim.CimCmdletAdapter] $script:PrivateData = [System.Collections.Generic.Dictionary[string,string]]::new() Microsoft.PowerShell.Core\Export-ModuleMember -Function @() function __cmdletization_BindCommonParameters { param( $__cmdletization_objectModelWrapper, $myPSBoundParameters ) if ($myPSBoundParameters.ContainsKey('CimSession')) { $__cmdletization_objectModelWrapper.PSObject.Properties['CimSession'].Value = $myPSBoundParameters['CimSession'] } if ($myPSBoundParameters.ContainsKey('ThrottleLimit')) { $__cmdletization_objectModelWrapper.PSObject.Properties['ThrottleLimit'].Value = $myPSBoundParameters['ThrottleLimit'] } if ($myPSBoundParameters.ContainsKey('AsJob')) { $__cmdletization_objectModelWrapper.PSObject.Properties['AsJob'].Value = $myPSBoundParameters['AsJob'] } } function Get-StorageJob { [CmdletBinding(DefaultParameterSetName='ByName', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StorageJob')] param( [Parameter(ParameterSetName='ByUniqueId', ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByName')] [ValidateNotNull()] [string[]] ${Name}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByDisk')] [Parameter(ParameterSetName='ByVolume')] [ValidateNotNull()] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageJob.JobState[]] ${JobState}, [Parameter(ParameterSetName='ByStorageSubSystem', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageSubsystem')] [ValidateNotNull()] [ciminstance] ${StorageSubsystem}, [Parameter(ParameterSetName='ByStoragePool', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StoragePool')] [ValidateNotNull()] [ciminstance] ${StoragePool}, [Parameter(ParameterSetName='ByVirtualDisk', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_VirtualDisk')] [ValidateNotNull()] [ciminstance] ${VirtualDisk}, [Parameter(ParameterSetName='ByDisk', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Disk')] [ValidateNotNull()] [ciminstance] ${Disk}, [Parameter(ParameterSetName='ByVolume', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Volume')] [ValidateNotNull()] [ciminstance] ${Volume}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByDisk')] [Parameter(ParameterSetName='ByVolume')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByDisk')] [Parameter(ParameterSetName='ByVolume')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByDisk')] [Parameter(ParameterSetName='ByVolume')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Name') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Name}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('JobState') -and (@('ByUniqueId', 'ByName', 'ByStorageSubSystem', 'ByStoragePool', 'ByVirtualDisk', 'ByDisk', 'ByVolume') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${JobState}) $__cmdletization_queryBuilder.FilterByProperty('JobState', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('StorageSubsystem') -and (@('ByStorageSubSystem') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StorageSubsystem}, 'MSFT_StorageJobToAffectedStorageObject', 'AffectedStorageObject', 'StorageJob', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('StoragePool') -and (@('ByStoragePool') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StoragePool}, 'MSFT_StorageJobToAffectedStorageObject', 'AffectedStorageObject', 'StorageJob', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('VirtualDisk') -and (@('ByVirtualDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${VirtualDisk}, 'MSFT_StorageJobToAffectedStorageObject', 'AffectedStorageObject', 'StorageJob', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('Disk') -and (@('ByDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${Disk}, 'MSFT_StorageJobToAffectedStorageObject', 'AffectedStorageObject', 'StorageJob', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('Volume') -and (@('ByVolume') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${Volume}, 'MSFT_StorageJobToAffectedStorageObject', 'AffectedStorageObject', 'StorageJob', 'SilentlyContinue') } $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder) } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageJob.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-StorageJob' -Alias '*' function Stop-StorageJob { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', SupportsShouldProcess=$true, ConfirmImpact='Medium', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StorageJob')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${Name}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageJob')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('Name') -and (@('ByName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Name}) $__cmdletization_queryBuilder.FilterByProperty('Name', $__cmdletization_values, $false, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Terminate', 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageJob.StateChange') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'RequestedState'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageJob.StateChange'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('true', 'System.Boolean') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:FromPowerShell'; ParameterType = 'System.Boolean'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('RequestStateChange', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageJob.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Stop-StorageJob' -Alias '*' ScriptBlock ID: e4e53fe7-2f35-4be4-9f16-033ea2434240 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905157 Keywords=None Message=Completed invocation of ScriptBlock ID: 29a22b0c-9b0a-4742-9d0c-50149c87a267 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905156 Keywords=None Message=Started invocation of ScriptBlock ID: 29a22b0c-9b0a-4742-9d0c-50149c87a267 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905155 Keywords=None Message=Creating Scriptblock text (2 of 2): Name='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('', 'System.Boolean') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Enable'; ParameterType = 'System.Boolean'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('SlotNumbers')) { [object]$__cmdletization_value = ${SlotNumbers} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'SlotNumbers'; ParameterType = 'System.UInt32[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'SlotNumbers'; ParameterType = 'System.UInt32[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('IdentifyElement', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageEnclosure.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Disable-StorageEnclosureIdentification' -Alias '*' function Get-StorageEnclosureVendorData { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', PositionalBinding=$false)] [OutputType([System.String])] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageEnclosure')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true)] [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true)] [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [uint16] ${PageNumber}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PageNumber')) { [object]$__cmdletization_value = ${PageNumber} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PageNumber'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PageNumber'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VendorData'; ParameterType = 'System.String'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('GetVendorData', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $false if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageEnclosure.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-StorageEnclosureVendorData' -Alias '*' ScriptBlock ID: 29a22b0c-9b0a-4742-9d0c-50149c87a267 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905154 Keywords=None Message=Creating Scriptblock text (1 of 2): #requires -version 3.0 try { Microsoft.PowerShell.Core\Set-StrictMode -Off } catch { } $script:MyModule = $MyInvocation.MyCommand.ScriptBlock.Module $script:ClassName = 'ROOT/Microsoft/Windows/Storage/MSFT_StorageEnclosure' $script:ClassVersion = '' $script:ModuleVersion = '1.0.0.0' $script:ObjectModelWrapper = [Microsoft.PowerShell.Cmdletization.Cim.CimCmdletAdapter] $script:PrivateData = [System.Collections.Generic.Dictionary[string,string]]::new() Microsoft.PowerShell.Core\Export-ModuleMember -Function @() function __cmdletization_BindCommonParameters { param( $__cmdletization_objectModelWrapper, $myPSBoundParameters ) if ($myPSBoundParameters.ContainsKey('CimSession')) { $__cmdletization_objectModelWrapper.PSObject.Properties['CimSession'].Value = $myPSBoundParameters['CimSession'] } if ($myPSBoundParameters.ContainsKey('ThrottleLimit')) { $__cmdletization_objectModelWrapper.PSObject.Properties['ThrottleLimit'].Value = $myPSBoundParameters['ThrottleLimit'] } if ($myPSBoundParameters.ContainsKey('AsJob')) { $__cmdletization_objectModelWrapper.PSObject.Properties['AsJob'].Value = $myPSBoundParameters['AsJob'] } } function Get-StorageEnclosure { [CmdletBinding(DefaultParameterSetName='ByUniqueId', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StorageEnclosure')] param( [Parameter(ParameterSetName='ByUniqueId', ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='ByFriendlyName', Position=1, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${SerialNumber}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStorageNode')] [Parameter(ParameterSetName='ByPhysicalDisk')] [ValidateNotNull()] [string[]] ${Manufacturer}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStorageNode')] [Parameter(ParameterSetName='ByPhysicalDisk')] [ValidateNotNull()] [string[]] ${Model}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStorageNode')] [Parameter(ParameterSetName='ByPhysicalDisk')] [ValidateNotNull()] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.StorageEnclosure.HealthStatus[]] ${HealthStatus}, [Parameter(ParameterSetName='ByStorageSubSystem', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageSubSystem')] [ValidateNotNull()] [ciminstance] ${StorageSubSystem}, [Parameter(ParameterSetName='ByStorageNode', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageNode')] [ValidateNotNull()] [ciminstance] ${StorageNode}, [Parameter(ParameterSetName='ByPhysicalDisk', ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_PhysicalDisk')] [ValidateNotNull()] [ciminstance] ${PhysicalDisk}, [Parameter(ParameterSetName='ByStorageNode')] [switch] ${PhysicallyConnected}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStorageNode')] [Parameter(ParameterSetName='ByPhysicalDisk')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStorageNode')] [Parameter(ParameterSetName='ByPhysicalDisk')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByStorageSubSystem')] [Parameter(ParameterSetName='ByStorageNode')] [Parameter(ParameterSetName='ByPhysicalDisk')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('SerialNumber') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${SerialNumber}) $__cmdletization_queryBuilder.FilterByProperty('SerialNumber', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Manufacturer') -and (@('ByUniqueId', 'ByFriendlyName', 'ByStorageSubSystem', 'ByStorageNode', 'ByPhysicalDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Manufacturer}) $__cmdletization_queryBuilder.FilterByProperty('Manufacturer', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('Model') -and (@('ByUniqueId', 'ByFriendlyName', 'ByStorageSubSystem', 'ByStorageNode', 'ByPhysicalDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${Model}) $__cmdletization_queryBuilder.FilterByProperty('Model', $__cmdletization_values, $true, 'Default') } if ($PSBoundParameters.ContainsKey('HealthStatus') -and (@('ByUniqueId', 'ByFriendlyName', 'ByStorageSubSystem', 'ByStorageNode', 'ByPhysicalDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${HealthStatus}) $__cmdletization_queryBuilder.FilterByProperty('HealthStatus', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('StorageSubSystem') -and (@('ByStorageSubSystem') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StorageSubSystem}, 'MSFT_StorageSubSystemToStorageEnclosure', 'StorageSubSystem', 'StorageEnclosure', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('StorageNode') -and (@('ByStorageNode') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${StorageNode}, 'MSFT_StorageNodeToStorageEnclosure', 'StorageNode', 'StorageEnclosure', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('PhysicalDisk') -and (@('ByPhysicalDisk') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.FilterByAssociatedInstance(${PhysicalDisk}, 'MSFT_StorageEnclosureToPhysicalDisk', 'PhysicalDisk', 'StorageEnclosure', 'SilentlyContinue') } if ($PSBoundParameters.ContainsKey('PhysicallyConnected') -and (@('ByStorageNode') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_queryBuilder.AddQueryOption('PhysicallyConnected', ${PhysicallyConnected}) } $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder) } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageEnclosure.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-StorageEnclosure' -Alias '*' function Enable-StorageEnclosureIdentification { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StorageEnclosure')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageEnclosure')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [uint32[]] ${SlotNumbers}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${AsJob}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [switch] ${PassThru}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_queryBuilder = $__cmdletization_objectModelWrapper.GetQueryBuilder() if ($PSBoundParameters.ContainsKey('UniqueId') -and (@('ByUniqueId') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${UniqueId}) $__cmdletization_queryBuilder.FilterByProperty('UniqueId', $__cmdletization_values, $false, 'Default') } if ($PSBoundParameters.ContainsKey('FriendlyName') -and (@('ByFriendlyName') -contains $PSCmdlet.ParameterSetName )) { $__cmdletization_values = @(${FriendlyName}) $__cmdletization_queryBuilder.FilterByProperty('FriendlyName', $__cmdletization_values, $true, 'Default') } $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByUniqueId', 'ByFriendlyName', 'InputObject (cdxml)') -contains $_ } { [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('true', 'System.Boolean') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Enable'; ParameterType = 'System.Boolean'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('SlotNumbers')) { [object]$__cmdletization_value = ${SlotNumbers} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'SlotNumbers'; ParameterType = 'System.UInt32[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'SlotNumbers'; ParameterType = 'System.UInt32[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('IdentifyElement', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_passThru = $PSBoundParameters.ContainsKey('PassThru') -and $PassThru if ($PSBoundParameters.ContainsKey('InputObject')) { foreach ($x in $InputObject) { $__cmdletization_objectModelWrapper.ProcessRecord($x, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } else { $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_queryBuilder, $__cmdletization_methodInvocationInfo, $__cmdletization_PassThru) } } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageEnclosure.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Enable-StorageEnclosureIdentification' -Alias '*' function Disable-StorageEnclosureIdentification { [CmdletBinding(DefaultParameterSetName='ByFriendlyName', PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])] [OutputType('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StorageEnclosure')] param( [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [ValidateNotNull()] [string[]] ${UniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [ValidateNotNull()] [string[]] ${FriendlyName}, [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageEnclosure')] [ValidateNotNull()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='InputObject (cdxml)')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [uint32[]] ${SlotNumbers}, [Parameter(ParameterSet ScriptBlock ID: 29a22b0c-9b0a-4742-9d0c-50149c87a267 Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905153 Keywords=None Message=Completed invocation of ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905152 Keywords=None Message=Started invocation of ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905151 Keywords=None Message=Creating Scriptblock text (35 of 35): alue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Description')) { [object]$__cmdletization_value = ${Description} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Description'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Description'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('EncryptData')) { [object]$__cmdletization_value = ${EncryptData} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'EncryptData'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'EncryptData'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetFileShare', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageCmdlets.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Set-FileShare' -Alias '*' function Get-StorageReliabilityCounter { [CmdletBinding(PositionalBinding=$false)] [OutputType([Microsoft.Management.Infrastructure.CimInstance])][OutputType('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageReliabilityCounter')][OutputType([Microsoft.Management.Infrastructure.CimInstance])][OutputType('Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageReliabilityCounter')] param( [Parameter(ParameterSetName='ByPhysicalDisk', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_PhysicalDisk')] [ValidateNotNull()] [ciminstance] ${PhysicalDisk}, [Parameter(ParameterSetName='ByDisk', Mandatory=$true, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_Disk')] [ValidateNotNull()] [ciminstance] ${Disk}, [Parameter(ParameterSetName='ByPhysicalDisk')] [Parameter(ParameterSetName='ByDisk')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByPhysicalDisk')] [Parameter(ParameterSetName='ByDisk')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByPhysicalDisk')] [Parameter(ParameterSetName='ByDisk')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByPhysicalDisk') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PhysicalDisk')) { [object]$__cmdletization_value = ${PhysicalDisk} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisk'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisk'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_PhysicalDisk' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StorageReliabilityCounter'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageReliabilityCounter' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('GetStorageReliabilityCounter', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByDisk') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Disk')) { [object]$__cmdletization_value = ${Disk} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Disk'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Disk'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_Disk' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StorageReliabilityCounter'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'Out'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageReliabilityCounter' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('GetStorageReliabilityCounter', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageCmdlets.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Get-StorageReliabilityCounter' -Alias '*' ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905150 Keywords=None Message=Creating Scriptblock text (34 of 35): ct]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PhysicalDisks')) { [object]$__cmdletization_value = ${PhysicalDisks} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_PhysicalDisk' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('RemovePhysicalDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageCmdlets.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Remove-PhysicalDisk' -Alias '*' function Set-FileShare { [CmdletBinding(DefaultParameterSetName='ByUniqueId', SupportsShouldProcess=$true, ConfirmImpact='High', PositionalBinding=$false)] param( [Parameter(ParameterSetName='ByObject', Mandatory=$true, Position=0, ValueFromPipeline=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${Description}, [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [bool] ${EncryptData}, [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [string] ${UniqueId}, [Parameter(ParameterSetName='ByName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [string] ${Name}, [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByObject') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('InputObject')) { [object]$__cmdletization_value = ${InputObject} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Description')) { [object]$__cmdletization_value = ${Description} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Description'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Description'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('EncryptData')) { [object]$__cmdletization_value = ${EncryptData} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'EncryptData'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'EncryptData'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetFileShare', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByUniqueId') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('UniqueId')) { [object]$__cmdletization_value = ${UniqueId} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Description')) { [object]$__cmdletization_value = ${Description} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Description'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Description'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('EncryptData')) { [object]$__cmdletization_value = ${EncryptData} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'EncryptData'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'EncryptData'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetFileShare', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByName') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Name')) { [object]$__cmdletization_value = ${Name} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Name'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Name'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultV ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905149 Keywords=None Message=Creating Scriptblock text (33 of 35): n_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('RemovePhysicalDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByStoragePoolUniqueId') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('StoragePoolUniqueId')) { [object]$__cmdletization_value = ${StoragePoolUniqueId} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StoragePoolUniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StoragePoolUniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PhysicalDisks')) { [object]$__cmdletization_value = ${PhysicalDisks} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_PhysicalDisk' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('RemovePhysicalDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByVirtualDisk') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('VirtualDisk')) { [object]$__cmdletization_value = ${VirtualDisk} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VirtualDisk'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VirtualDisk'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_VirtualDisk' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PhysicalDisks')) { [object]$__cmdletization_value = ${PhysicalDisks} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_PhysicalDisk' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('RemovePhysicalDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByVirtualDiskFriendlyName') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('VirtualDiskFriendlyName')) { [object]$__cmdletization_value = ${VirtualDiskFriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VirtualDiskFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VirtualDiskFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PhysicalDisks')) { [object]$__cmdletization_value = ${PhysicalDisks} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_PhysicalDisk' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('RemovePhysicalDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByVirtualDiskName') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('VirtualDiskName')) { [object]$__cmdletization_value = ${VirtualDiskName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VirtualDiskName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VirtualDiskName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PhysicalDisks')) { [object]$__cmdletization_value = ${PhysicalDisks} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_PhysicalDisk' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('RemovePhysicalDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByVirtualDiskUniqueId') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('VirtualDiskUniqueId')) { [object]$__cmdletization_value = ${VirtualDiskUniqueId} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VirtualDiskUniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VirtualDiskUniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [obje ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905148 Keywords=None Message=Creating Scriptblock text (32 of 35): P StorageCmdlets.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Add-PhysicalDisk' -Alias '*' function Remove-PhysicalDisk { [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='High', PositionalBinding=$false)] param( [Parameter(ParameterSetName='ByStoragePool', Mandatory=$true, Position=0, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StoragePool')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ciminstance] ${StoragePool}, [Parameter(ParameterSetName='ByStoragePool', Mandatory=$true)] [Parameter(ParameterSetName='ByStoragePoolFriendlyName', Mandatory=$true)] [Parameter(ParameterSetName='ByStoragePoolName', Mandatory=$true)] [Parameter(ParameterSetName='ByStoragePoolUniqueId', Mandatory=$true)] [Parameter(ParameterSetName='ByVirtualDisk', Mandatory=$true)] [Parameter(ParameterSetName='ByVirtualDiskFriendlyName', Mandatory=$true)] [Parameter(ParameterSetName='ByVirtualDiskName', Mandatory=$true)] [Parameter(ParameterSetName='ByVirtualDiskUniqueId', Mandatory=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_PhysicalDisk')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ciminstance[]] ${PhysicalDisks}, [Parameter(ParameterSetName='ByStoragePoolFriendlyName', Mandatory=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${StoragePoolFriendlyName}, [Parameter(ParameterSetName='ByStoragePoolName', Mandatory=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${StoragePoolName}, [Parameter(ParameterSetName='ByStoragePoolUniqueId', Mandatory=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${StoragePoolUniqueId}, [Parameter(ParameterSetName='ByVirtualDisk', Mandatory=$true, Position=0, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_VirtualDisk')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ciminstance] ${VirtualDisk}, [Parameter(ParameterSetName='ByVirtualDiskFriendlyName', Mandatory=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${VirtualDiskFriendlyName}, [Parameter(ParameterSetName='ByVirtualDiskName', Mandatory=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${VirtualDiskName}, [Parameter(ParameterSetName='ByVirtualDiskUniqueId', Mandatory=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${VirtualDiskUniqueId}, [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByStoragePoolFriendlyName')] [Parameter(ParameterSetName='ByStoragePoolName')] [Parameter(ParameterSetName='ByStoragePoolUniqueId')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByVirtualDiskFriendlyName')] [Parameter(ParameterSetName='ByVirtualDiskName')] [Parameter(ParameterSetName='ByVirtualDiskUniqueId')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByStoragePoolFriendlyName')] [Parameter(ParameterSetName='ByStoragePoolName')] [Parameter(ParameterSetName='ByStoragePoolUniqueId')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByVirtualDiskFriendlyName')] [Parameter(ParameterSetName='ByVirtualDiskName')] [Parameter(ParameterSetName='ByVirtualDiskUniqueId')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByStoragePoolFriendlyName')] [Parameter(ParameterSetName='ByStoragePoolName')] [Parameter(ParameterSetName='ByStoragePoolUniqueId')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByVirtualDiskFriendlyName')] [Parameter(ParameterSetName='ByVirtualDiskName')] [Parameter(ParameterSetName='ByVirtualDiskUniqueId')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByStoragePool') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('StoragePool')) { [object]$__cmdletization_value = ${StoragePool} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StoragePool'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StoragePool'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_StoragePool' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PhysicalDisks')) { [object]$__cmdletization_value = ${PhysicalDisks} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_PhysicalDisk' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('RemovePhysicalDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByStoragePoolFriendlyName') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('StoragePoolFriendlyName')) { [object]$__cmdletization_value = ${StoragePoolFriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StoragePoolFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StoragePoolFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PhysicalDisks')) { [object]$__cmdletization_value = ${PhysicalDisks} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_PhysicalDisk' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('RemovePhysicalDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByStoragePoolName') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('StoragePoolName')) { [object]$__cmdletization_value = ${StoragePoolName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StoragePoolName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StoragePoolName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PhysicalDisks')) { [object]$__cmdletization_value = ${PhysicalDisks} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_PhysicalDisk' $__cmdletization_methodParameters.Add($__cmdletizatio ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905147 Keywords=None Message=Creating Scriptblock text (31 of 35): sicalDisk.Usage'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.AddPhysicalDisk.Usage'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('AddPhysicalDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByVirtualDisk') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('VirtualDisk')) { [object]$__cmdletization_value = ${VirtualDisk} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VirtualDisk'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VirtualDisk'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_VirtualDisk' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PhysicalDisks')) { [object]$__cmdletization_value = ${PhysicalDisks} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_PhysicalDisk' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('AddPhysicalDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByVirtualDiskFriendlyName') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('VirtualDiskFriendlyName')) { [object]$__cmdletization_value = ${VirtualDiskFriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VirtualDiskFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VirtualDiskFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PhysicalDisks')) { [object]$__cmdletization_value = ${PhysicalDisks} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_PhysicalDisk' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('AddPhysicalDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByVirtualDiskName') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('VirtualDiskName')) { [object]$__cmdletization_value = ${VirtualDiskName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VirtualDiskName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VirtualDiskName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PhysicalDisks')) { [object]$__cmdletization_value = ${PhysicalDisks} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_PhysicalDisk' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('AddPhysicalDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByVirtualDiskUniqueId') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('VirtualDiskUniqueId')) { [object]$__cmdletization_value = ${VirtualDiskUniqueId} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VirtualDiskUniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'VirtualDiskUniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PhysicalDisks')) { [object]$__cmdletization_value = ${PhysicalDisks} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_PhysicalDisk' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('AddPhysicalDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHEL ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905146 Keywords=None Message=Creating Scriptblock text (30 of 35): = 'StoragePool'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StoragePool'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_StoragePool' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PhysicalDisks')) { [object]$__cmdletization_value = ${PhysicalDisks} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_PhysicalDisk' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Usage')) { [object]$__cmdletization_value = ${Usage} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.AddPhysicalDisk.Usage'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.AddPhysicalDisk.Usage'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('AddPhysicalDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByStoragePoolFriendlyName') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('StoragePoolFriendlyName')) { [object]$__cmdletization_value = ${StoragePoolFriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StoragePoolFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StoragePoolFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PhysicalDisks')) { [object]$__cmdletization_value = ${PhysicalDisks} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_PhysicalDisk' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Usage')) { [object]$__cmdletization_value = ${Usage} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.AddPhysicalDisk.Usage'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.AddPhysicalDisk.Usage'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('AddPhysicalDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByStoragePoolName') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('StoragePoolName')) { [object]$__cmdletization_value = ${StoragePoolName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StoragePoolName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StoragePoolName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PhysicalDisks')) { [object]$__cmdletization_value = ${PhysicalDisks} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_PhysicalDisk' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Usage')) { [object]$__cmdletization_value = ${Usage} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.AddPhysicalDisk.Usage'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.AddPhysicalDisk.Usage'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('AddPhysicalDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByStoragePoolUniqueId') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('StoragePoolUniqueId')) { [object]$__cmdletization_value = ${StoragePoolUniqueId} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StoragePoolUniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StoragePoolUniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PhysicalDisks')) { [object]$__cmdletization_value = ${PhysicalDisks} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDisks'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameter.ParameterTypeName = 'Microsoft.Management.Infrastructure.CimInstance#MSFT_PhysicalDisk' $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Usage')) { [object]$__cmdletization_value = ${Usage} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.AddPhy ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905145 Keywords=None Message=Creating Scriptblock text (29 of 35): '; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('AutomaticClusteringEnabled')) { [object]$__cmdletization_value = ${AutomaticClusteringEnabled} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AutomaticClusteringEnabled'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AutomaticClusteringEnabled'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FaultDomainAwarenessDefault')) { [object]$__cmdletization_value = ${FaultDomainAwarenessDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwarenessDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwarenessDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetStorageSubSystem', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByNameSetAttributes') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Name')) { [object]$__cmdletization_value = ${Name} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Name'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Name'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('AutomaticClusteringEnabled')) { [object]$__cmdletization_value = ${AutomaticClusteringEnabled} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AutomaticClusteringEnabled'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AutomaticClusteringEnabled'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FaultDomainAwarenessDefault')) { [object]$__cmdletization_value = ${FaultDomainAwarenessDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwarenessDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwarenessDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetStorageSubSystem', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageCmdlets.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Set-StorageSubSystem' -Alias '*' function Add-PhysicalDisk { [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='Low', PositionalBinding=$false)] param( [Parameter(ParameterSetName='ByStoragePool', Mandatory=$true, Position=0, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_StoragePool')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ciminstance] ${StoragePool}, [Parameter(ParameterSetName='ByStoragePool', Mandatory=$true)] [Parameter(ParameterSetName='ByStoragePoolFriendlyName', Mandatory=$true)] [Parameter(ParameterSetName='ByStoragePoolName', Mandatory=$true)] [Parameter(ParameterSetName='ByStoragePoolUniqueId', Mandatory=$true)] [Parameter(ParameterSetName='ByVirtualDisk', Mandatory=$true)] [Parameter(ParameterSetName='ByVirtualDiskFriendlyName', Mandatory=$true)] [Parameter(ParameterSetName='ByVirtualDiskName', Mandatory=$true)] [Parameter(ParameterSetName='ByVirtualDiskUniqueId', Mandatory=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_PhysicalDisk')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ciminstance[]] ${PhysicalDisks}, [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByStoragePoolFriendlyName')] [Parameter(ParameterSetName='ByStoragePoolName')] [Parameter(ParameterSetName='ByStoragePoolUniqueId')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.AddPhysicalDisk.Usage] ${Usage}, [Parameter(ParameterSetName='ByStoragePoolFriendlyName', Mandatory=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${StoragePoolFriendlyName}, [Parameter(ParameterSetName='ByStoragePoolName', Mandatory=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${StoragePoolName}, [Parameter(ParameterSetName='ByStoragePoolUniqueId', Mandatory=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${StoragePoolUniqueId}, [Parameter(ParameterSetName='ByVirtualDisk', Mandatory=$true, Position=0, ValueFromPipeline=$true)] [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSFT_VirtualDisk')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ciminstance] ${VirtualDisk}, [Parameter(ParameterSetName='ByVirtualDiskFriendlyName', Mandatory=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${VirtualDiskFriendlyName}, [Parameter(ParameterSetName='ByVirtualDiskName', Mandatory=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${VirtualDiskName}, [Parameter(ParameterSetName='ByVirtualDiskUniqueId', Mandatory=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${VirtualDiskUniqueId}, [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByStoragePoolFriendlyName')] [Parameter(ParameterSetName='ByStoragePoolName')] [Parameter(ParameterSetName='ByStoragePoolUniqueId')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByVirtualDiskFriendlyName')] [Parameter(ParameterSetName='ByVirtualDiskName')] [Parameter(ParameterSetName='ByVirtualDiskUniqueId')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByStoragePoolFriendlyName')] [Parameter(ParameterSetName='ByStoragePoolName')] [Parameter(ParameterSetName='ByStoragePoolUniqueId')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByVirtualDiskFriendlyName')] [Parameter(ParameterSetName='ByVirtualDiskName')] [Parameter(ParameterSetName='ByVirtualDiskUniqueId')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByStoragePool')] [Parameter(ParameterSetName='ByStoragePoolFriendlyName')] [Parameter(ParameterSetName='ByStoragePoolName')] [Parameter(ParameterSetName='ByStoragePoolUniqueId')] [Parameter(ParameterSetName='ByVirtualDisk')] [Parameter(ParameterSetName='ByVirtualDiskFriendlyName')] [Parameter(ParameterSetName='ByVirtualDiskName')] [Parameter(ParameterSetName='ByVirtualDiskUniqueId')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByStoragePool') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('StoragePool')) { [object]$__cmdletization_value = ${StoragePool} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905144 Keywords=None Message=Creating Scriptblock text (28 of 35): etization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByFriendlyNameDescription') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FriendlyName')) { [object]$__cmdletization_value = ${FriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Description')) { [object]$__cmdletization_value = ${Description} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Description'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Description'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetStorageSubSystem', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByNameDescription') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Name')) { [object]$__cmdletization_value = ${Name} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Name'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Name'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Description')) { [object]$__cmdletization_value = ${Description} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Description'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Description'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetStorageSubSystem', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByObjectSetAttributes') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('InputObject')) { [object]$__cmdletization_value = ${InputObject} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('AutomaticClusteringEnabled')) { [object]$__cmdletization_value = ${AutomaticClusteringEnabled} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AutomaticClusteringEnabled'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AutomaticClusteringEnabled'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FaultDomainAwarenessDefault')) { [object]$__cmdletization_value = ${FaultDomainAwarenessDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwarenessDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwarenessDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetStorageSubSystem', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByUniqueIdSetAttributes') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('UniqueId')) { [object]$__cmdletization_value = ${UniqueId} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('AutomaticClusteringEnabled')) { [object]$__cmdletization_value = ${AutomaticClusteringEnabled} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AutomaticClusteringEnabled'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AutomaticClusteringEnabled'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FaultDomainAwarenessDefault')) { [object]$__cmdletization_value = ${FaultDomainAwarenessDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwarenessDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwarenessDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetStorageSubSystem', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByFriendlyNameSetAttributes') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FriendlyName')) { [object]$__cmdletization_value = ${FriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905143 Keywords=None Message=Creating Scriptblock text (27 of 35): value = ${FriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Description')) { [object]$__cmdletization_value = ${Description} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Description'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Description'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetStorageTier', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageCmdlets.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Set-StorageTier' -Alias '*' function Set-StorageSubSystem { [CmdletBinding(DefaultParameterSetName='ByUniqueIdDescription', PositionalBinding=$false)] param( [Parameter(ParameterSetName='ByObjectDescription', Mandatory=$true, Position=0, ValueFromPipeline=$true)] [Parameter(ParameterSetName='ByObjectSetAttributes', Mandatory=$true, Position=0, ValueFromPipeline=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByObjectDescription')] [Parameter(ParameterSetName='ByUniqueIdDescription')] [Parameter(ParameterSetName='ByFriendlyNameDescription')] [Parameter(ParameterSetName='ByNameDescription')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${Description}, [Parameter(ParameterSetName='ByUniqueIdDescription', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByUniqueIdSetAttributes', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [string] ${UniqueId}, [Parameter(ParameterSetName='ByFriendlyNameDescription', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByFriendlyNameSetAttributes', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [string] ${FriendlyName}, [Parameter(ParameterSetName='ByNameDescription', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByNameSetAttributes', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [string] ${Name}, [Parameter(ParameterSetName='ByObjectSetAttributes')] [Parameter(ParameterSetName='ByUniqueIdSetAttributes')] [Parameter(ParameterSetName='ByFriendlyNameSetAttributes')] [Parameter(ParameterSetName='ByNameSetAttributes')] [bool] ${AutomaticClusteringEnabled}, [Parameter(ParameterSetName='ByObjectSetAttributes')] [Parameter(ParameterSetName='ByUniqueIdSetAttributes')] [Parameter(ParameterSetName='ByFriendlyNameSetAttributes')] [Parameter(ParameterSetName='ByNameSetAttributes')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType] ${FaultDomainAwarenessDefault}, [Parameter(ParameterSetName='ByObjectDescription')] [Parameter(ParameterSetName='ByUniqueIdDescription')] [Parameter(ParameterSetName='ByFriendlyNameDescription')] [Parameter(ParameterSetName='ByNameDescription')] [Parameter(ParameterSetName='ByObjectSetAttributes')] [Parameter(ParameterSetName='ByUniqueIdSetAttributes')] [Parameter(ParameterSetName='ByFriendlyNameSetAttributes')] [Parameter(ParameterSetName='ByNameSetAttributes')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByObjectDescription')] [Parameter(ParameterSetName='ByUniqueIdDescription')] [Parameter(ParameterSetName='ByFriendlyNameDescription')] [Parameter(ParameterSetName='ByNameDescription')] [Parameter(ParameterSetName='ByObjectSetAttributes')] [Parameter(ParameterSetName='ByUniqueIdSetAttributes')] [Parameter(ParameterSetName='ByFriendlyNameSetAttributes')] [Parameter(ParameterSetName='ByNameSetAttributes')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByObjectDescription')] [Parameter(ParameterSetName='ByUniqueIdDescription')] [Parameter(ParameterSetName='ByFriendlyNameDescription')] [Parameter(ParameterSetName='ByNameDescription')] [Parameter(ParameterSetName='ByObjectSetAttributes')] [Parameter(ParameterSetName='ByUniqueIdSetAttributes')] [Parameter(ParameterSetName='ByFriendlyNameSetAttributes')] [Parameter(ParameterSetName='ByNameSetAttributes')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByObjectDescription') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('InputObject')) { [object]$__cmdletization_value = ${InputObject} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Description')) { [object]$__cmdletization_value = ${Description} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Description'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Description'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetStorageSubSystem', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByUniqueIdDescription') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('UniqueId')) { [object]$__cmdletization_value = ${UniqueId} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Description')) { [object]$__cmdletization_value = ${Description} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Description'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Description'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetStorageSubSystem', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdl ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905142 Keywords=None Message=Creating Scriptblock text (26 of 35): ) [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetStorageTier', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByFriendlyNameNewFriendlyName') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FriendlyName')) { [object]$__cmdletization_value = ${FriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NewFriendlyName')) { [object]$__cmdletization_value = ${NewFriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetStorageTier', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByFriendlyNameAttributes') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FriendlyName')) { [object]$__cmdletization_value = ${FriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('MediaType')) { [object]$__cmdletization_value = ${MediaType} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MediaType'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStorageTier.MediaType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MediaType'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStorageTier.MediaType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FaultDomainAwareness')) { [object]$__cmdletization_value = ${FaultDomainAwareness} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwareness'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwareness'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ColumnIsolation')) { [object]$__cmdletization_value = ${ColumnIsolation} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ColumnIsolation'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ColumnIsolation'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ResiliencySettingName')) { [object]$__cmdletization_value = ${ResiliencySettingName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ResiliencySettingName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ResiliencySettingName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PhysicalDiskRedundancy')) { [object]$__cmdletization_value = ${PhysicalDiskRedundancy} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDiskRedundancy'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDiskRedundancy'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NumberOfDataCopies')) { [object]$__cmdletization_value = ${NumberOfDataCopies} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfDataCopies'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfDataCopies'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NumberOfGroups')) { [object]$__cmdletization_value = ${NumberOfGroups} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfGroups'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfGroups'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NumberOfColumns')) { [object]$__cmdletization_value = ${NumberOfColumns} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfColumns'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfColumns'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Interleave')) { [object]$__cmdletization_value = ${Interleave} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Interleave'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Interleave'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetStorageTier', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByFriendlyNameDescription') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FriendlyName')) { [object]$__cmdletization_ ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905141 Keywords=None Message=Creating Scriptblock text (25 of 35): IsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NewFriendlyName')) { [object]$__cmdletization_value = ${NewFriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetStorageTier', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByUniqueIdAttributes') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('UniqueId')) { [object]$__cmdletization_value = ${UniqueId} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('MediaType')) { [object]$__cmdletization_value = ${MediaType} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MediaType'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStorageTier.MediaType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MediaType'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStorageTier.MediaType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FaultDomainAwareness')) { [object]$__cmdletization_value = ${FaultDomainAwareness} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwareness'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwareness'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ColumnIsolation')) { [object]$__cmdletization_value = ${ColumnIsolation} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ColumnIsolation'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ColumnIsolation'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ResiliencySettingName')) { [object]$__cmdletization_value = ${ResiliencySettingName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ResiliencySettingName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ResiliencySettingName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PhysicalDiskRedundancy')) { [object]$__cmdletization_value = ${PhysicalDiskRedundancy} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDiskRedundancy'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDiskRedundancy'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NumberOfDataCopies')) { [object]$__cmdletization_value = ${NumberOfDataCopies} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfDataCopies'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfDataCopies'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NumberOfGroups')) { [object]$__cmdletization_value = ${NumberOfGroups} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfGroups'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfGroups'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NumberOfColumns')) { [object]$__cmdletization_value = ${NumberOfColumns} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfColumns'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfColumns'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Interleave')) { [object]$__cmdletization_value = ${Interleave} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Interleave'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Interleave'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetStorageTier', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByUniqueIdDescription') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('UniqueId')) { [object]$__cmdletization_value = ${UniqueId} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Description')) { [object]$__cmdletization_value = ${Description} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Description'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Description'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String' ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905140 Keywords=None Message=Creating Scriptblock text (24 of 35): tization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByObjectAttributes') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('InputObject')) { [object]$__cmdletization_value = ${InputObject} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('MediaType')) { [object]$__cmdletization_value = ${MediaType} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MediaType'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStorageTier.MediaType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MediaType'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStorageTier.MediaType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FaultDomainAwareness')) { [object]$__cmdletization_value = ${FaultDomainAwareness} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwareness'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwareness'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ColumnIsolation')) { [object]$__cmdletization_value = ${ColumnIsolation} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ColumnIsolation'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ColumnIsolation'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ResiliencySettingName')) { [object]$__cmdletization_value = ${ResiliencySettingName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ResiliencySettingName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ResiliencySettingName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PhysicalDiskRedundancy')) { [object]$__cmdletization_value = ${PhysicalDiskRedundancy} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDiskRedundancy'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PhysicalDiskRedundancy'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NumberOfDataCopies')) { [object]$__cmdletization_value = ${NumberOfDataCopies} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfDataCopies'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfDataCopies'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NumberOfGroups')) { [object]$__cmdletization_value = ${NumberOfGroups} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfGroups'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfGroups'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NumberOfColumns')) { [object]$__cmdletization_value = ${NumberOfColumns} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfColumns'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NumberOfColumns'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Interleave')) { [object]$__cmdletization_value = ${Interleave} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Interleave'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Interleave'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetStorageTier', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByObjectDescription') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('InputObject')) { [object]$__cmdletization_value = ${InputObject} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Description')) { [object]$__cmdletization_value = ${Description} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Description'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Description'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetStorageTier', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByUniqueIdNewFriendlyName') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('UniqueId')) { [object]$__cmdletization_value = ${UniqueId} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValue ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905139 Keywords=None Message=Creating Scriptblock text (23 of 35): Value; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('StorageNodeName')) { [object]$__cmdletization_value = ${StorageNodeName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StorageNodeName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StorageNodeName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Access')) { [object]$__cmdletization_value = ${Access} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Access'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetVirtualDisk.Access'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Access'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetVirtualDisk.Access'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetVirtualDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageCmdlets.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Set-VirtualDisk' -Alias '*' function Set-StorageTier { [CmdletBinding(DefaultParameterSetName='ByUniqueIdNewFriendlyName', PositionalBinding=$false)] param( [Parameter(ParameterSetName='ByObjectNewFriendlyName', Mandatory=$true, ValueFromPipeline=$true)] [Parameter(ParameterSetName='ByObjectAttributes', Mandatory=$true, ValueFromPipeline=$true)] [Parameter(ParameterSetName='ByObjectDescription', Mandatory=$true, ValueFromPipeline=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByObjectNewFriendlyName')] [Parameter(ParameterSetName='ByUniqueIdNewFriendlyName')] [Parameter(ParameterSetName='ByFriendlyNameNewFriendlyName')] [string] ${NewFriendlyName}, [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByUniqueIdAttributes')] [Parameter(ParameterSetName='ByFriendlyNameAttributes')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStorageTier.MediaType] ${MediaType}, [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByUniqueIdAttributes')] [Parameter(ParameterSetName='ByFriendlyNameAttributes')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType] ${FaultDomainAwareness}, [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByUniqueIdAttributes')] [Parameter(ParameterSetName='ByFriendlyNameAttributes')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType] ${ColumnIsolation}, [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByUniqueIdAttributes')] [Parameter(ParameterSetName='ByFriendlyNameAttributes')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${ResiliencySettingName}, [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByUniqueIdAttributes')] [Parameter(ParameterSetName='ByFriendlyNameAttributes')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [uint16] ${PhysicalDiskRedundancy}, [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByUniqueIdAttributes')] [Parameter(ParameterSetName='ByFriendlyNameAttributes')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [uint16] ${NumberOfDataCopies}, [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByUniqueIdAttributes')] [Parameter(ParameterSetName='ByFriendlyNameAttributes')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [uint16] ${NumberOfGroups}, [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByUniqueIdAttributes')] [Parameter(ParameterSetName='ByFriendlyNameAttributes')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [uint16] ${NumberOfColumns}, [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByUniqueIdAttributes')] [Parameter(ParameterSetName='ByFriendlyNameAttributes')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [uint64] ${Interleave}, [Parameter(ParameterSetName='ByObjectDescription')] [Parameter(ParameterSetName='ByUniqueIdDescription')] [Parameter(ParameterSetName='ByFriendlyNameDescription')] [string] ${Description}, [Parameter(ParameterSetName='ByUniqueIdNewFriendlyName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByUniqueIdAttributes', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByUniqueIdDescription', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [string] ${UniqueId}, [Parameter(ParameterSetName='ByFriendlyNameNewFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByFriendlyNameAttributes', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByFriendlyNameDescription', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [string] ${FriendlyName}, [Parameter(ParameterSetName='ByObjectNewFriendlyName')] [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByObjectDescription')] [Parameter(ParameterSetName='ByUniqueIdNewFriendlyName')] [Parameter(ParameterSetName='ByUniqueIdAttributes')] [Parameter(ParameterSetName='ByUniqueIdDescription')] [Parameter(ParameterSetName='ByFriendlyNameNewFriendlyName')] [Parameter(ParameterSetName='ByFriendlyNameAttributes')] [Parameter(ParameterSetName='ByFriendlyNameDescription')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByObjectNewFriendlyName')] [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByObjectDescription')] [Parameter(ParameterSetName='ByUniqueIdNewFriendlyName')] [Parameter(ParameterSetName='ByUniqueIdAttributes')] [Parameter(ParameterSetName='ByUniqueIdDescription')] [Parameter(ParameterSetName='ByFriendlyNameNewFriendlyName')] [Parameter(ParameterSetName='ByFriendlyNameAttributes')] [Parameter(ParameterSetName='ByFriendlyNameDescription')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByObjectNewFriendlyName')] [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByObjectDescription')] [Parameter(ParameterSetName='ByUniqueIdNewFriendlyName')] [Parameter(ParameterSetName='ByUniqueIdAttributes')] [Parameter(ParameterSetName='ByUniqueIdDescription')] [Parameter(ParameterSetName='ByFriendlyNameNewFriendlyName')] [Parameter(ParameterSetName='ByFriendlyNameAttributes')] [Parameter(ParameterSetName='ByFriendlyNameDescription')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByObjectNewFriendlyName') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('InputObject')) { [object]$__cmdletization_value = ${InputObject} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NewFriendlyName')) { [object]$__cmdletization_value = ${NewFriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetStorageTier', $__cmdle ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905138 Keywords=None Message=Creating Scriptblock text (22 of 35): dings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsManualAttach'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('StorageNodeName')) { [object]$__cmdletization_value = ${StorageNodeName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StorageNodeName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StorageNodeName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Access')) { [object]$__cmdletization_value = ${Access} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Access'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetVirtualDisk.Access'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Access'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetVirtualDisk.Access'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetVirtualDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByUniqueIdAttributes') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('UniqueId')) { [object]$__cmdletization_value = ${UniqueId} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsManualAttach')) { [object]$__cmdletization_value = ${IsManualAttach} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsManualAttach'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsManualAttach'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('StorageNodeName')) { [object]$__cmdletization_value = ${StorageNodeName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StorageNodeName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StorageNodeName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Access')) { [object]$__cmdletization_value = ${Access} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Access'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetVirtualDisk.Access'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Access'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetVirtualDisk.Access'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetVirtualDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByFriendlyNameAttributes') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FriendlyName')) { [object]$__cmdletization_value = ${FriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsManualAttach')) { [object]$__cmdletization_value = ${IsManualAttach} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsManualAttach'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsManualAttach'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('StorageNodeName')) { [object]$__cmdletization_value = ${StorageNodeName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StorageNodeName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'StorageNodeName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Access')) { [object]$__cmdletization_value = ${Access} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Access'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetVirtualDisk.Access'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Access'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetVirtualDisk.Access'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetVirtualDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByNameAttributes') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Name')) { [object]$__cmdletization_value = ${Name} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Name'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Name'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsManualAttach')) { [object]$__cmdletization_value = ${IsManualAttach} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsManualAttach'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsManualAttach'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_default ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905137 Keywords=None Message=Creating Scriptblock text (21 of 35): FriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Usage')) { [object]$__cmdletization_value = ${Usage} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetVirtualDisk.Usage'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetVirtualDisk.Usage'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('OtherUsageDescription')) { [object]$__cmdletization_value = ${OtherUsageDescription} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'OtherUsageDescription'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'OtherUsageDescription'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetVirtualDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByFriendlyName') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FriendlyName')) { [object]$__cmdletization_value = ${FriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NewFriendlyName')) { [object]$__cmdletization_value = ${NewFriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Usage')) { [object]$__cmdletization_value = ${Usage} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetVirtualDisk.Usage'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetVirtualDisk.Usage'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('OtherUsageDescription')) { [object]$__cmdletization_value = ${OtherUsageDescription} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'OtherUsageDescription'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'OtherUsageDescription'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetVirtualDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByName') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Name')) { [object]$__cmdletization_value = ${Name} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Name'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Name'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NewFriendlyName')) { [object]$__cmdletization_value = ${NewFriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Usage')) { [object]$__cmdletization_value = ${Usage} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetVirtualDisk.Usage'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetVirtualDisk.Usage'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('OtherUsageDescription')) { [object]$__cmdletization_value = ${OtherUsageDescription} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'OtherUsageDescription'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'OtherUsageDescription'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetVirtualDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByObjectAttributes') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('InputObject')) { [object]$__cmdletization_value = ${InputObject} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsManualAttach')) { [object]$__cmdletization_value = ${IsManualAttach} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsManualAttach'; ParameterType = 'System.Boolean'; Bin ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905136 Keywords=None Message=Creating Scriptblock text (20 of 35): [object]$__cmdletization_value = ${IsReadOnly} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsReadOnly'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsReadOnly'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetStoragePool', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageCmdlets.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Set-StoragePool' -Alias '*' function Set-VirtualDisk { [CmdletBinding(DefaultParameterSetName='ByUniqueId', PositionalBinding=$false)] param( [Parameter(ParameterSetName='ByObject', Mandatory=$true, Position=0, ValueFromPipeline=$true)] [Parameter(ParameterSetName='ByObjectAttributes', Mandatory=$true, Position=0, ValueFromPipeline=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${NewFriendlyName}, [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetVirtualDisk.Usage] ${Usage}, [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [string] ${OtherUsageDescription}, [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByUniqueIdAttributes', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [string] ${UniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByFriendlyNameAttributes', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [string] ${FriendlyName}, [Parameter(ParameterSetName='ByName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByNameAttributes', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [string] ${Name}, [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByUniqueIdAttributes')] [Parameter(ParameterSetName='ByFriendlyNameAttributes')] [Parameter(ParameterSetName='ByNameAttributes')] [bool] ${IsManualAttach}, [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByUniqueIdAttributes')] [Parameter(ParameterSetName='ByFriendlyNameAttributes')] [Parameter(ParameterSetName='ByNameAttributes')] [string] ${StorageNodeName}, [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByUniqueIdAttributes')] [Parameter(ParameterSetName='ByFriendlyNameAttributes')] [Parameter(ParameterSetName='ByNameAttributes')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetVirtualDisk.Access] ${Access}, [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByUniqueIdAttributes')] [Parameter(ParameterSetName='ByFriendlyNameAttributes')] [Parameter(ParameterSetName='ByNameAttributes')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByUniqueIdAttributes')] [Parameter(ParameterSetName='ByFriendlyNameAttributes')] [Parameter(ParameterSetName='ByNameAttributes')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByUniqueIdAttributes')] [Parameter(ParameterSetName='ByFriendlyNameAttributes')] [Parameter(ParameterSetName='ByNameAttributes')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByObject') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('InputObject')) { [object]$__cmdletization_value = ${InputObject} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NewFriendlyName')) { [object]$__cmdletization_value = ${NewFriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Usage')) { [object]$__cmdletization_value = ${Usage} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetVirtualDisk.Usage'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetVirtualDisk.Usage'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('OtherUsageDescription')) { [object]$__cmdletization_value = ${OtherUsageDescription} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'OtherUsageDescription'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'OtherUsageDescription'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetVirtualDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByUniqueId') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('UniqueId')) { [object]$__cmdletization_value = ${UniqueId} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NewFriendlyName')) { [object]$__cmdletization_value = ${New ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905135 Keywords=None Message=Creating Scriptblock text (19 of 35): ) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('EnclosureAwareDefault')) { [object]$__cmdletization_value = ${EnclosureAwareDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'EnclosureAwareDefault'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'EnclosureAwareDefault'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FaultDomainAwarenessDefault')) { [object]$__cmdletization_value = ${FaultDomainAwarenessDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwarenessDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwarenessDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('WriteCacheSizeDefault')) { [object]$__cmdletization_value = ${WriteCacheSizeDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'WriteCacheSizeDefault'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'WriteCacheSizeDefault'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('AutoWriteCacheSize')) { [object]$__cmdletization_value = ${AutoWriteCacheSize} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AutoWriteCacheSize'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AutoWriteCacheSize'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetStoragePool', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByObjectAttributes') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('InputObject')) { [object]$__cmdletization_value = ${InputObject} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsReadOnly')) { [object]$__cmdletization_value = ${IsReadOnly} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsReadOnly'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsReadOnly'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetStoragePool', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByUniqueIdAttributes') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('UniqueId')) { [object]$__cmdletization_value = ${UniqueId} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsReadOnly')) { [object]$__cmdletization_value = ${IsReadOnly} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsReadOnly'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsReadOnly'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetStoragePool', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByNameAttributes') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Name')) { [object]$__cmdletization_value = ${Name} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Name'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Name'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsReadOnly')) { [object]$__cmdletization_value = ${IsReadOnly} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsReadOnly'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsReadOnly'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetStoragePool', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByFriendlyNameAttributes') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FriendlyName')) { [object]$__cmdletization_value = ${FriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsReadOnly')) { ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905134 Keywords=None Message=Creating Scriptblock text (18 of 35): [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AutoWriteCacheSize'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AutoWriteCacheSize'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetStoragePool', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByNameDefaults') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Name')) { [object]$__cmdletization_value = ${Name} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Name'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Name'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ProvisioningTypeDefault')) { [object]$__cmdletization_value = ${ProvisioningTypeDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ProvisioningTypeDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.ProvisioningType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ProvisioningTypeDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.ProvisioningType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('MediaTypeDefault')) { [object]$__cmdletization_value = ${MediaTypeDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MediaTypeDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.MediaType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MediaTypeDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.MediaType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ResiliencySettingNameDefault')) { [object]$__cmdletization_value = ${ResiliencySettingNameDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ResiliencySettingNameDefault'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ResiliencySettingNameDefault'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('EnclosureAwareDefault')) { [object]$__cmdletization_value = ${EnclosureAwareDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'EnclosureAwareDefault'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'EnclosureAwareDefault'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FaultDomainAwarenessDefault')) { [object]$__cmdletization_value = ${FaultDomainAwarenessDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwarenessDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwarenessDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('WriteCacheSizeDefault')) { [object]$__cmdletization_value = ${WriteCacheSizeDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'WriteCacheSizeDefault'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'WriteCacheSizeDefault'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('AutoWriteCacheSize')) { [object]$__cmdletization_value = ${AutoWriteCacheSize} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AutoWriteCacheSize'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AutoWriteCacheSize'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetStoragePool', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByFriendlyNameDefaults') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FriendlyName')) { [object]$__cmdletization_value = ${FriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ProvisioningTypeDefault')) { [object]$__cmdletization_value = ${ProvisioningTypeDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ProvisioningTypeDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.ProvisioningType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ProvisioningTypeDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.ProvisioningType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('MediaTypeDefault')) { [object]$__cmdletization_value = ${MediaTypeDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MediaTypeDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.MediaType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MediaTypeDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.MediaType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ResiliencySettingNameDefault')) { [object]$__cmdletization_value = ${ResiliencySettingNameDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ResiliencySettingNameDefault'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ResiliencySettingNameDefault'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905133 Keywords=None Message=Creating Scriptblock text (17 of 35): peDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.ProvisioningType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('MediaTypeDefault')) { [object]$__cmdletization_value = ${MediaTypeDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MediaTypeDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.MediaType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MediaTypeDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.MediaType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ResiliencySettingNameDefault')) { [object]$__cmdletization_value = ${ResiliencySettingNameDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ResiliencySettingNameDefault'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ResiliencySettingNameDefault'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('EnclosureAwareDefault')) { [object]$__cmdletization_value = ${EnclosureAwareDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'EnclosureAwareDefault'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'EnclosureAwareDefault'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FaultDomainAwarenessDefault')) { [object]$__cmdletization_value = ${FaultDomainAwarenessDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwarenessDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwarenessDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('WriteCacheSizeDefault')) { [object]$__cmdletization_value = ${WriteCacheSizeDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'WriteCacheSizeDefault'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'WriteCacheSizeDefault'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('AutoWriteCacheSize')) { [object]$__cmdletization_value = ${AutoWriteCacheSize} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AutoWriteCacheSize'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'AutoWriteCacheSize'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetStoragePool', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByUniqueIdDefaults') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('UniqueId')) { [object]$__cmdletization_value = ${UniqueId} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ProvisioningTypeDefault')) { [object]$__cmdletization_value = ${ProvisioningTypeDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ProvisioningTypeDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.ProvisioningType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ProvisioningTypeDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.ProvisioningType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('MediaTypeDefault')) { [object]$__cmdletization_value = ${MediaTypeDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MediaTypeDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.MediaType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MediaTypeDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.MediaType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ResiliencySettingNameDefault')) { [object]$__cmdletization_value = ${ResiliencySettingNameDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ResiliencySettingNameDefault'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ResiliencySettingNameDefault'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('EnclosureAwareDefault')) { [object]$__cmdletization_value = ${EnclosureAwareDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'EnclosureAwareDefault'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'EnclosureAwareDefault'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FaultDomainAwarenessDefault')) { [object]$__cmdletization_value = ${FaultDomainAwarenessDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwarenessDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FaultDomainAwarenessDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('WriteCacheSizeDefault')) { [object]$__cmdletization_value = ${WriteCacheSizeDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'WriteCacheSizeDefault'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'WriteCacheSizeDefault'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('AutoWriteCacheSize')) { [object]$__cmdletization_value = ${AutoWriteCacheSize} $__cmdletization_methodParameter = ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905132 Keywords=None Message=Creating Scriptblock text (16 of 35): } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('OtherUsageDescription')) { [object]$__cmdletization_value = ${OtherUsageDescription} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'OtherUsageDescription'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'OtherUsageDescription'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ThinProvisioningAlertThresholds')) { [object]$__cmdletization_value = ${ThinProvisioningAlertThresholds} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ThinProvisioningAlertThresholds'; ParameterType = 'System.UInt16[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ThinProvisioningAlertThresholds'; ParameterType = 'System.UInt16[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetStoragePool', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByFriendlyName') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FriendlyName')) { [object]$__cmdletization_value = ${FriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NewFriendlyName')) { [object]$__cmdletization_value = ${NewFriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ClearOnDeallocate')) { [object]$__cmdletization_value = ${ClearOnDeallocate} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ClearOnDeallocate'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ClearOnDeallocate'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsPowerProtected')) { [object]$__cmdletization_value = ${IsPowerProtected} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsPowerProtected'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsPowerProtected'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('RepairPolicy')) { [object]$__cmdletization_value = ${RepairPolicy} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'RepairPolicy'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.RepairPolicy'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'RepairPolicy'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.RepairPolicy'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('RetireMissingPhysicalDisks')) { [object]$__cmdletization_value = ${RetireMissingPhysicalDisks} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'RetireMissingPhysicalDisks'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.RetireMissingPhysicalDisks'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'RetireMissingPhysicalDisks'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.RetireMissingPhysicalDisks'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Usage')) { [object]$__cmdletization_value = ${Usage} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.Usage'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.Usage'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('OtherUsageDescription')) { [object]$__cmdletization_value = ${OtherUsageDescription} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'OtherUsageDescription'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'OtherUsageDescription'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ThinProvisioningAlertThresholds')) { [object]$__cmdletization_value = ${ThinProvisioningAlertThresholds} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ThinProvisioningAlertThresholds'; ParameterType = 'System.UInt16[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ThinProvisioningAlertThresholds'; ParameterType = 'System.UInt16[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetStoragePool', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByObjectDefaults') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('InputObject')) { [object]$__cmdletization_value = ${InputObject} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ProvisioningTypeDefault')) { [object]$__cmdletization_value = ${ProvisioningTypeDefault} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ProvisioningTypeDefault'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.ProvisioningType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ProvisioningTy ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905131 Keywords=None Message=Creating Scriptblock text (15 of 35): ct]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ClearOnDeallocate')) { [object]$__cmdletization_value = ${ClearOnDeallocate} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ClearOnDeallocate'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ClearOnDeallocate'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsPowerProtected')) { [object]$__cmdletization_value = ${IsPowerProtected} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsPowerProtected'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsPowerProtected'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('RepairPolicy')) { [object]$__cmdletization_value = ${RepairPolicy} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'RepairPolicy'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.RepairPolicy'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'RepairPolicy'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.RepairPolicy'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('RetireMissingPhysicalDisks')) { [object]$__cmdletization_value = ${RetireMissingPhysicalDisks} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'RetireMissingPhysicalDisks'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.RetireMissingPhysicalDisks'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'RetireMissingPhysicalDisks'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.RetireMissingPhysicalDisks'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Usage')) { [object]$__cmdletization_value = ${Usage} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.Usage'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.Usage'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('OtherUsageDescription')) { [object]$__cmdletization_value = ${OtherUsageDescription} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'OtherUsageDescription'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'OtherUsageDescription'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ThinProvisioningAlertThresholds')) { [object]$__cmdletization_value = ${ThinProvisioningAlertThresholds} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ThinProvisioningAlertThresholds'; ParameterType = 'System.UInt16[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ThinProvisioningAlertThresholds'; ParameterType = 'System.UInt16[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetStoragePool', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByName') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Name')) { [object]$__cmdletization_value = ${Name} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Name'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Name'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NewFriendlyName')) { [object]$__cmdletization_value = ${NewFriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ClearOnDeallocate')) { [object]$__cmdletization_value = ${ClearOnDeallocate} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ClearOnDeallocate'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ClearOnDeallocate'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsPowerProtected')) { [object]$__cmdletization_value = ${IsPowerProtected} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsPowerProtected'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsPowerProtected'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('RepairPolicy')) { [object]$__cmdletization_value = ${RepairPolicy} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'RepairPolicy'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.RepairPolicy'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'RepairPolicy'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.RepairPolicy'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('RetireMissingPhysicalDisks')) { [object]$__cmdletization_value = ${RetireMissingPhysicalDisks} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'RetireMissingPhysicalDisks'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.RetireMissingPhysicalDisks'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'RetireMissingPhysicalDisks'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.RetireMissingPhysicalDisks'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Usage')) { [object]$__cmdletization_value = ${Usage} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.Usage'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.Usage'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905130 Keywords=None Message=Creating Scriptblock text (14 of 35): ctDefaults')] [Parameter(ParameterSetName='ByUniqueIdDefaults')] [Parameter(ParameterSetName='ByNameDefaults')] [Parameter(ParameterSetName='ByFriendlyNameDefaults')] [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByUniqueIdAttributes')] [Parameter(ParameterSetName='ByNameAttributes')] [Parameter(ParameterSetName='ByFriendlyNameAttributes')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByObjectDefaults')] [Parameter(ParameterSetName='ByUniqueIdDefaults')] [Parameter(ParameterSetName='ByNameDefaults')] [Parameter(ParameterSetName='ByFriendlyNameDefaults')] [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByUniqueIdAttributes')] [Parameter(ParameterSetName='ByNameAttributes')] [Parameter(ParameterSetName='ByFriendlyNameAttributes')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByObject') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('InputObject')) { [object]$__cmdletization_value = ${InputObject} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NewFriendlyName')) { [object]$__cmdletization_value = ${NewFriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ClearOnDeallocate')) { [object]$__cmdletization_value = ${ClearOnDeallocate} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ClearOnDeallocate'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ClearOnDeallocate'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsPowerProtected')) { [object]$__cmdletization_value = ${IsPowerProtected} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsPowerProtected'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsPowerProtected'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('RepairPolicy')) { [object]$__cmdletization_value = ${RepairPolicy} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'RepairPolicy'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.RepairPolicy'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'RepairPolicy'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.RepairPolicy'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('RetireMissingPhysicalDisks')) { [object]$__cmdletization_value = ${RetireMissingPhysicalDisks} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'RetireMissingPhysicalDisks'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.RetireMissingPhysicalDisks'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'RetireMissingPhysicalDisks'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.RetireMissingPhysicalDisks'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Usage')) { [object]$__cmdletization_value = ${Usage} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.Usage'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.Usage'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('OtherUsageDescription')) { [object]$__cmdletization_value = ${OtherUsageDescription} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'OtherUsageDescription'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'OtherUsageDescription'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('ThinProvisioningAlertThresholds')) { [object]$__cmdletization_value = ${ThinProvisioningAlertThresholds} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ThinProvisioningAlertThresholds'; ParameterType = 'System.UInt16[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'ThinProvisioningAlertThresholds'; ParameterType = 'System.UInt16[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetStoragePool', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByUniqueId') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('UniqueId')) { [object]$__cmdletization_value = ${UniqueId} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NewFriendlyName')) { [object]$__cmdletization_value = ${NewFriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [obje ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905129 Keywords=None Message=Creating Scriptblock text (13 of 35): luePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetPhysicalDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByFriendlyName') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FriendlyName')) { [object]$__cmdletization_value = ${FriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NewFriendlyName')) { [object]$__cmdletization_value = ${NewFriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Description')) { [object]$__cmdletization_value = ${Description} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Description'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Description'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Usage')) { [object]$__cmdletization_value = ${Usage} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetPhysicalDisk.Usage'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetPhysicalDisk.Usage'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('MediaType')) { [object]$__cmdletization_value = ${MediaType} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MediaType'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetPhysicalDisk.MediaType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MediaType'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetPhysicalDisk.MediaType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetPhysicalDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageCmdlets.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Set-PhysicalDisk' -Alias '*' function Set-StoragePool { [CmdletBinding(DefaultParameterSetName='ByUniqueId', PositionalBinding=$false)] param( [Parameter(ParameterSetName='ByObject', Mandatory=$true, Position=0, ValueFromPipeline=$true)] [Parameter(ParameterSetName='ByObjectDefaults', Mandatory=$true, Position=0, ValueFromPipeline=$true)] [Parameter(ParameterSetName='ByObjectAttributes', Mandatory=$true, Position=0, ValueFromPipeline=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByFriendlyName')] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [string] ${NewFriendlyName}, [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByFriendlyName')] [bool] ${ClearOnDeallocate}, [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByFriendlyName')] [bool] ${IsPowerProtected}, [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByFriendlyName')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.RepairPolicy] ${RepairPolicy}, [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByFriendlyName')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.RetireMissingPhysicalDisks] ${RetireMissingPhysicalDisks}, [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByFriendlyName')] [Alias('NewUsage')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.Usage] ${Usage}, [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByFriendlyName')] [Alias('NewOtherUsageDescription')] [string] ${OtherUsageDescription}, [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByFriendlyName')] [uint16[]] ${ThinProvisioningAlertThresholds}, [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByUniqueIdDefaults', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByUniqueIdAttributes', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [string] ${UniqueId}, [Parameter(ParameterSetName='ByName', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByNameDefaults', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByNameAttributes', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [string] ${Name}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByFriendlyNameDefaults', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByFriendlyNameAttributes', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [string] ${FriendlyName}, [Parameter(ParameterSetName='ByObjectDefaults')] [Parameter(ParameterSetName='ByUniqueIdDefaults')] [Parameter(ParameterSetName='ByNameDefaults')] [Parameter(ParameterSetName='ByFriendlyNameDefaults')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.ProvisioningType] ${ProvisioningTypeDefault}, [Parameter(ParameterSetName='ByObjectDefaults')] [Parameter(ParameterSetName='ByUniqueIdDefaults')] [Parameter(ParameterSetName='ByNameDefaults')] [Parameter(ParameterSetName='ByFriendlyNameDefaults')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.MediaType] ${MediaTypeDefault}, [Parameter(ParameterSetName='ByObjectDefaults')] [Parameter(ParameterSetName='ByUniqueIdDefaults')] [Parameter(ParameterSetName='ByNameDefaults')] [Parameter(ParameterSetName='ByFriendlyNameDefaults')] [string] ${ResiliencySettingNameDefault}, [Parameter(ParameterSetName='ByObjectDefaults')] [Parameter(ParameterSetName='ByUniqueIdDefaults')] [Parameter(ParameterSetName='ByNameDefaults')] [Parameter(ParameterSetName='ByFriendlyNameDefaults')] [bool] ${EnclosureAwareDefault}, [Parameter(ParameterSetName='ByObjectDefaults')] [Parameter(ParameterSetName='ByUniqueIdDefaults')] [Parameter(ParameterSetName='ByNameDefaults')] [Parameter(ParameterSetName='ByFriendlyNameDefaults')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.Set.FaultDomainType] ${FaultDomainAwarenessDefault}, [Parameter(ParameterSetName='ByObjectDefaults')] [Parameter(ParameterSetName='ByUniqueIdDefaults')] [Parameter(ParameterSetName='ByNameDefaults')] [Parameter(ParameterSetName='ByFriendlyNameDefaults')] [uint64] ${WriteCacheSizeDefault}, [Parameter(ParameterSetName='ByObjectDefaults')] [Parameter(ParameterSetName='ByUniqueIdDefaults')] [Parameter(ParameterSetName='ByNameDefaults')] [Parameter(ParameterSetName='ByFriendlyNameDefaults')] [bool] ${AutoWriteCacheSize}, [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByUniqueIdAttributes')] [Parameter(ParameterSetName='ByNameAttributes')] [Parameter(ParameterSetName='ByFriendlyNameAttributes')] [bool] ${IsReadOnly}, [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByObjectDefaults')] [Parameter(ParameterSetName='ByUniqueIdDefaults')] [Parameter(ParameterSetName='ByNameDefaults')] [Parameter(ParameterSetName='ByFriendlyNameDefaults')] [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByUniqueIdAttributes')] [Parameter(ParameterSetName='ByNameAttributes')] [Parameter(ParameterSetName='ByFriendlyNameAttributes')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByName')] [Parameter(ParameterSetName='ByFriendlyName')] [Parameter(ParameterSetName='ByObje ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905128 Keywords=None Message=Creating Scriptblock text (12 of 35): [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [string] ${NewFriendlyName}, [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [string] ${Description}, [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetPhysicalDisk.Usage] ${Usage}, [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetPhysicalDisk.MediaType] ${MediaType}, [Parameter(ParameterSetName='ByUniqueId', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Id')] [string] ${UniqueId}, [Parameter(ParameterSetName='ByFriendlyName', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [string] ${FriendlyName}, [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ByUniqueId')] [Parameter(ParameterSetName='ByFriendlyName')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByObject') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('InputObject')) { [object]$__cmdletization_value = ${InputObject} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NewFriendlyName')) { [object]$__cmdletization_value = ${NewFriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Description')) { [object]$__cmdletization_value = ${Description} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Description'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Description'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Usage')) { [object]$__cmdletization_value = ${Usage} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetPhysicalDisk.Usage'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetPhysicalDisk.Usage'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('MediaType')) { [object]$__cmdletization_value = ${MediaType} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MediaType'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetPhysicalDisk.MediaType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MediaType'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetPhysicalDisk.MediaType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetPhysicalDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByUniqueId') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('UniqueId')) { [object]$__cmdletization_value = ${UniqueId} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NewFriendlyName')) { [object]$__cmdletization_value = ${NewFriendlyName} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFriendlyName'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Description')) { [object]$__cmdletization_value = ${Description} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Description'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Description'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Usage')) { [object]$__cmdletization_value = ${Usage} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetPhysicalDisk.Usage'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Usage'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetPhysicalDisk.Usage'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('MediaType')) { [object]$__cmdletization_value = ${MediaType} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MediaType'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetPhysicalDisk.MediaType'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MediaType'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetPhysicalDisk.MediaType'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsVa ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905127 Keywords=None Message=Creating Scriptblock text (11 of 35): ization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetPartition', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByObjectAccessPath') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('InputObject')) { [object]$__cmdletization_value = ${InputObject} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NewDriveLetter')) { [object]$__cmdletization_value = ${NewDriveLetter} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewDriveLetter'; ParameterType = 'System.Char'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewDriveLetter'; ParameterType = 'System.Char'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetPartition', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByIdAccessPath') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('DiskId')) { [object]$__cmdletization_value = ${DiskId} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DiskId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DiskId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Offset')) { [object]$__cmdletization_value = ${Offset} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Offset'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Offset'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NewDriveLetter')) { [object]$__cmdletization_value = ${NewDriveLetter} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewDriveLetter'; ParameterType = 'System.Char'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewDriveLetter'; ParameterType = 'System.Char'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetPartition', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByDriveLetterAccessPath') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('DriveLetter')) { [object]$__cmdletization_value = ${DriveLetter} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DriveLetter'; ParameterType = 'System.Char'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DriveLetter'; ParameterType = 'System.Char'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NewDriveLetter')) { [object]$__cmdletization_value = ${NewDriveLetter} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewDriveLetter'; ParameterType = 'System.Char'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewDriveLetter'; ParameterType = 'System.Char'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetPartition', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByNumberAccessPath') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('DiskNumber')) { [object]$__cmdletization_value = ${DiskNumber} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DiskNumber'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DiskNumber'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PartitionNumber')) { [object]$__cmdletization_value = ${PartitionNumber} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PartitionNumber'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PartitionNumber'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NewDriveLetter')) { [object]$__cmdletization_value = ${NewDriveLetter} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewDriveLetter'; ParameterType = 'System.Char'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewDriveLetter'; ParameterType = 'System.Char'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetPartition', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageCmdlets.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Set-Partition' -Alias '*' function Set-PhysicalDisk { [CmdletBinding(DefaultParameterSetName='ByUniqueId', PositionalBinding=$false)] param( [Parameter(ParameterSetName='ByObject', Mandatory=$true, ValueFromPipeline=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ciminstance[]] ${InputObject}, ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905126 Keywords=None Message=Creating Scriptblock text (10 of 35): [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('GptType')) { [object]$__cmdletization_value = ${GptType} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'GptType'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'GptType'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetPartition', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByObject') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('InputObject')) { [object]$__cmdletization_value = ${InputObject} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsOffline')) { [object]$__cmdletization_value = ${IsOffline} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsOffline'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsOffline'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetPartition', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ById') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('DiskId')) { [object]$__cmdletization_value = ${DiskId} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DiskId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DiskId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Offset')) { [object]$__cmdletization_value = ${Offset} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Offset'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Offset'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsOffline')) { [object]$__cmdletization_value = ${IsOffline} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsOffline'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsOffline'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetPartition', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByDriveLetter') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('DriveLetter')) { [object]$__cmdletization_value = ${DriveLetter} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DriveLetter'; ParameterType = 'System.Char'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DriveLetter'; ParameterType = 'System.Char'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsOffline')) { [object]$__cmdletization_value = ${IsOffline} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsOffline'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsOffline'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetPartition', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByNumber') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('DiskNumber')) { [object]$__cmdletization_value = ${DiskNumber} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DiskNumber'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DiskNumber'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PartitionNumber')) { [object]$__cmdletization_value = ${PartitionNumber} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PartitionNumber'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PartitionNumber'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsOffline')) { [object]$__cmdletization_value = ${IsOffline} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsOffline'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsOffline'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdlet ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905125 Keywords=None Message=Creating Scriptblock text (9 of 35): $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsActive')) { [object]$__cmdletization_value = ${IsActive} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsActive'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsActive'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsHidden')) { [object]$__cmdletization_value = ${IsHidden} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsHidden'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsHidden'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsShadowCopy')) { [object]$__cmdletization_value = ${IsShadowCopy} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsShadowCopy'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsShadowCopy'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsDAX')) { [object]$__cmdletization_value = ${IsDAX} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsDAX'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsDAX'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('MbrType')) { [object]$__cmdletization_value = ${MbrType} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MbrType'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MbrType'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('GptType')) { [object]$__cmdletization_value = ${GptType} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'GptType'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'GptType'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetPartition', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByNumberAttributes') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('DiskNumber')) { [object]$__cmdletization_value = ${DiskNumber} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DiskNumber'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DiskNumber'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PartitionNumber')) { [object]$__cmdletization_value = ${PartitionNumber} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PartitionNumber'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PartitionNumber'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsReadOnly')) { [object]$__cmdletization_value = ${IsReadOnly} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsReadOnly'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsReadOnly'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NoDefaultDriveLetter')) { [object]$__cmdletization_value = ${NoDefaultDriveLetter} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NoDefaultDriveLetter'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NoDefaultDriveLetter'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsActive')) { [object]$__cmdletization_value = ${IsActive} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsActive'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsActive'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsHidden')) { [object]$__cmdletization_value = ${IsHidden} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsHidden'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsHidden'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsShadowCopy')) { [object]$__cmdletization_value = ${IsShadowCopy} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsShadowCopy'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsShadowCopy'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsDAX')) { [object]$__cmdletization_value = ${IsDAX} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsDAX'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsDAX'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('MbrType')) { [object]$__cmdletization_value = ${MbrType} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MbrType'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MbrType'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905124 Keywords=None Message=Creating Scriptblock text (8 of 35): ion_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('GptType')) { [object]$__cmdletization_value = ${GptType} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'GptType'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'GptType'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetPartition', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByIdAttributes') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('DiskId')) { [object]$__cmdletization_value = ${DiskId} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DiskId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DiskId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Offset')) { [object]$__cmdletization_value = ${Offset} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Offset'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Offset'; ParameterType = 'System.UInt64'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsReadOnly')) { [object]$__cmdletization_value = ${IsReadOnly} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsReadOnly'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsReadOnly'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NoDefaultDriveLetter')) { [object]$__cmdletization_value = ${NoDefaultDriveLetter} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NoDefaultDriveLetter'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NoDefaultDriveLetter'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsActive')) { [object]$__cmdletization_value = ${IsActive} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsActive'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsActive'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsHidden')) { [object]$__cmdletization_value = ${IsHidden} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsHidden'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsHidden'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsShadowCopy')) { [object]$__cmdletization_value = ${IsShadowCopy} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsShadowCopy'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsShadowCopy'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsDAX')) { [object]$__cmdletization_value = ${IsDAX} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsDAX'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsDAX'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('MbrType')) { [object]$__cmdletization_value = ${MbrType} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MbrType'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MbrType'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('GptType')) { [object]$__cmdletization_value = ${GptType} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'GptType'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'GptType'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetPartition', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByDriveLetterAttributes') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('DriveLetter')) { [object]$__cmdletization_value = ${DriveLetter} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DriveLetter'; ParameterType = 'System.Char'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DriveLetter'; ParameterType = 'System.Char'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsReadOnly')) { [object]$__cmdletization_value = ${IsReadOnly} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsReadOnly'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsReadOnly'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NoDefaultDriveLetter')) { [object]$__cmdletization_value = ${NoDefaultDriveLetter} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NoDefaultDriveLetter'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NoDefaultDriveLetter'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905123 Keywords=None Message=Creating Scriptblock text (7 of 35): iveLetterAttributes')] [Parameter(ParameterSetName='ByNumberAttributes')] [bool] ${IsHidden}, [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByIdAttributes')] [Parameter(ParameterSetName='ByDriveLetterAttributes')] [Parameter(ParameterSetName='ByNumberAttributes')] [bool] ${IsShadowCopy}, [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByIdAttributes')] [Parameter(ParameterSetName='ByDriveLetterAttributes')] [Parameter(ParameterSetName='ByNumberAttributes')] [bool] ${IsDAX}, [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByIdAttributes')] [Parameter(ParameterSetName='ByDriveLetterAttributes')] [Parameter(ParameterSetName='ByNumberAttributes')] [uint16] ${MbrType}, [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByIdAttributes')] [Parameter(ParameterSetName='ByDriveLetterAttributes')] [Parameter(ParameterSetName='ByNumberAttributes')] [string] ${GptType}, [Parameter(ParameterSetName='ByIdAttributes', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ById', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByIdAccessPath', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [string] ${DiskId}, [Parameter(ParameterSetName='ByIdAttributes', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ById', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByIdAccessPath', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [uint64] ${Offset}, [Parameter(ParameterSetName='ByDriveLetterAttributes', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByDriveLetter', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByDriveLetterAccessPath', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [char] ${DriveLetter}, [Parameter(ParameterSetName='ByNumberAttributes', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByNumber', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByNumberAccessPath', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [uint32] ${DiskNumber}, [Parameter(ParameterSetName='ByNumberAttributes', Mandatory=$true, Position=1)] [Parameter(ParameterSetName='ByNumber', Mandatory=$true, Position=1)] [Parameter(ParameterSetName='ByNumberAccessPath', Mandatory=$true, Position=1)] [Alias('Number')] [uint32] ${PartitionNumber}, [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='ByNumber')] [bool] ${IsOffline}, [Parameter(ParameterSetName='ByObjectAccessPath')] [Parameter(ParameterSetName='ByIdAccessPath')] [Parameter(ParameterSetName='ByDriveLetterAccessPath')] [Parameter(ParameterSetName='ByNumberAccessPath')] [char] ${NewDriveLetter}, [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByIdAttributes')] [Parameter(ParameterSetName='ByDriveLetterAttributes')] [Parameter(ParameterSetName='ByNumberAttributes')] [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByObjectAccessPath')] [Parameter(ParameterSetName='ByIdAccessPath')] [Parameter(ParameterSetName='ByDriveLetterAccessPath')] [Parameter(ParameterSetName='ByNumberAccessPath')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByIdAttributes')] [Parameter(ParameterSetName='ByDriveLetterAttributes')] [Parameter(ParameterSetName='ByNumberAttributes')] [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByObjectAccessPath')] [Parameter(ParameterSetName='ByIdAccessPath')] [Parameter(ParameterSetName='ByDriveLetterAccessPath')] [Parameter(ParameterSetName='ByNumberAccessPath')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByIdAttributes')] [Parameter(ParameterSetName='ByDriveLetterAttributes')] [Parameter(ParameterSetName='ByNumberAttributes')] [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByDriveLetter')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByObjectAccessPath')] [Parameter(ParameterSetName='ByIdAccessPath')] [Parameter(ParameterSetName='ByDriveLetterAccessPath')] [Parameter(ParameterSetName='ByNumberAccessPath')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByObjectAttributes') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('InputObject')) { [object]$__cmdletization_value = ${InputObject} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsReadOnly')) { [object]$__cmdletization_value = ${IsReadOnly} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsReadOnly'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsReadOnly'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NoDefaultDriveLetter')) { [object]$__cmdletization_value = ${NoDefaultDriveLetter} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NoDefaultDriveLetter'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NoDefaultDriveLetter'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsActive')) { [object]$__cmdletization_value = ${IsActive} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsActive'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsActive'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsHidden')) { [object]$__cmdletization_value = ${IsHidden} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsHidden'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsHidden'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsShadowCopy')) { [object]$__cmdletization_value = ${IsShadowCopy} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsShadowCopy'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsShadowCopy'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsDAX')) { [object]$__cmdletization_value = ${IsDAX} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsDAX'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsDAX'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('MbrType')) { [object]$__cmdletization_value = ${MbrType} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MbrType'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'MbrType'; ParameterType = 'System.UInt16'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletizat ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905122 Keywords=None Message=Creating Scriptblock text (6 of 35): ion:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetVolume', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByUniqueIdSetDedup') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('UniqueId')) { [object]$__cmdletization_value = ${UniqueId} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('DedupMode')) { [object]$__cmdletization_value = ${DedupMode} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DedupMode'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetVolume.DedupMode'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DedupMode'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetVolume.DedupMode'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetVolume', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByPathSetDedup') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Path')) { [object]$__cmdletization_value = ${Path} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Path'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Path'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('DedupMode')) { [object]$__cmdletization_value = ${DedupMode} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DedupMode'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetVolume.DedupMode'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DedupMode'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetVolume.DedupMode'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetVolume', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByLabelSetDedup') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FileSystemLabel')) { [object]$__cmdletization_value = ${FileSystemLabel} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FileSystemLabel'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FileSystemLabel'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('DedupMode')) { [object]$__cmdletization_value = ${DedupMode} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DedupMode'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetVolume.DedupMode'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DedupMode'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetVolume.DedupMode'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetVolume', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByDriveLetterSetDedup') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('DriveLetter')) { [object]$__cmdletization_value = ${DriveLetter} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DriveLetter'; ParameterType = 'System.Char'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DriveLetter'; ParameterType = 'System.Char'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('DedupMode')) { [object]$__cmdletization_value = ${DedupMode} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DedupMode'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetVolume.DedupMode'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DedupMode'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetVolume.DedupMode'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetVolume', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageCmdlets.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Set-Volume' -Alias '*' function Set-Partition { [CmdletBinding(DefaultParameterSetName='ByNumberAttributes', SupportsShouldProcess=$true, ConfirmImpact='High', PositionalBinding=$false)] param( [Parameter(ParameterSetName='ByObjectAttributes', Mandatory=$true, ValueFromPipeline=$true)] [Parameter(ParameterSetName='ByObject', Mandatory=$true, ValueFromPipeline=$true)] [Parameter(ParameterSetName='ByObjectAccessPath', Mandatory=$true, ValueFromPipeline=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByIdAttributes')] [Parameter(ParameterSetName='ByDriveLetterAttributes')] [Parameter(ParameterSetName='ByNumberAttributes')] [bool] ${IsReadOnly}, [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByIdAttributes')] [Parameter(ParameterSetName='ByDriveLetterAttributes')] [Parameter(ParameterSetName='ByNumberAttributes')] [bool] ${NoDefaultDriveLetter}, [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByIdAttributes')] [Parameter(ParameterSetName='ByDriveLetterAttributes')] [Parameter(ParameterSetName='ByNumberAttributes')] [bool] ${IsActive}, [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByIdAttributes')] [Parameter(ParameterSetName='ByDr ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905121 Keywords=None Message=Creating Scriptblock text (5 of 35): ltValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetVolume', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByUniqueIdSetLabel') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('UniqueId')) { [object]$__cmdletization_value = ${UniqueId} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NewFileSystemLabel')) { [object]$__cmdletization_value = ${NewFileSystemLabel} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFileSystemLabel'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFileSystemLabel'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetVolume', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByPathSetLabel') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Path')) { [object]$__cmdletization_value = ${Path} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Path'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Path'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NewFileSystemLabel')) { [object]$__cmdletization_value = ${NewFileSystemLabel} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFileSystemLabel'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFileSystemLabel'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetVolume', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByLabelSetLabel') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('FileSystemLabel')) { [object]$__cmdletization_value = ${FileSystemLabel} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FileSystemLabel'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'FileSystemLabel'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NewFileSystemLabel')) { [object]$__cmdletization_value = ${NewFileSystemLabel} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFileSystemLabel'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFileSystemLabel'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetVolume', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByDriveLetterSetLabel') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('DriveLetter')) { [object]$__cmdletization_value = ${DriveLetter} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DriveLetter'; ParameterType = 'System.Char'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DriveLetter'; ParameterType = 'System.Char'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NewFileSystemLabel')) { [object]$__cmdletization_value = ${NewFileSystemLabel} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFileSystemLabel'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFileSystemLabel'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetVolume', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByObjectSetDedup') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('InputObject')) { [object]$__cmdletization_value = ${InputObject} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('DedupMode')) { [object]$__cmdletization_value = ${DedupMode} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DedupMode'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetVolume.DedupMode'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'DedupMode'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetVolume.DedupMode'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOpt ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905120 Keywords=None Message=Creating Scriptblock text (4 of 35): Cmdletization.MethodParameter]@{Name = 'Guid'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Guid'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByNumberAttributes') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Number')) { [object]$__cmdletization_value = ${Number} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Number'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Number'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsReadOnly')) { [object]$__cmdletization_value = ${IsReadOnly} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsReadOnly'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsReadOnly'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Signature')) { [object]$__cmdletization_value = ${Signature} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Signature'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Signature'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Guid')) { [object]$__cmdletization_value = ${Guid} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Guid'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Guid'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } End { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper.EndProcessing() } } catch { throw } } # .EXTERNALHELP StorageCmdlets.cdxml-Help.xml } Microsoft.PowerShell.Core\Export-ModuleMember -Function 'Set-Disk' -Alias '*' function Set-Volume { [CmdletBinding(DefaultParameterSetName='ByDriveLetterSetLabel', PositionalBinding=$false)] param( [Parameter(ParameterSetName='ByObjectSetLabel', Mandatory=$true, ValueFromPipeline=$true)] [Parameter(ParameterSetName='ByObjectSetDedup', Mandatory=$true, ValueFromPipeline=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByObjectSetLabel')] [Parameter(ParameterSetName='ByUniqueIdSetLabel')] [Parameter(ParameterSetName='ByPathSetLabel')] [Parameter(ParameterSetName='ByLabelSetLabel')] [Parameter(ParameterSetName='ByDriveLetterSetLabel')] [string] ${NewFileSystemLabel}, [Parameter(ParameterSetName='ByUniqueIdSetLabel', Mandatory=$true, ValueFromPipeline=$true)] [Parameter(ParameterSetName='ByUniqueIdSetDedup', Mandatory=$true, ValueFromPipeline=$true)] [string] ${UniqueId}, [Parameter(ParameterSetName='ByPathSetLabel', Mandatory=$true, ValueFromPipeline=$true)] [Parameter(ParameterSetName='ByPathSetDedup', Mandatory=$true, ValueFromPipeline=$true)] [string] ${Path}, [Parameter(ParameterSetName='ByLabelSetLabel', Mandatory=$true, ValueFromPipeline=$true)] [Parameter(ParameterSetName='ByLabelSetDedup', Mandatory=$true, ValueFromPipeline=$true)] [string] ${FileSystemLabel}, [Parameter(ParameterSetName='ByDriveLetterSetLabel', Mandatory=$true, ValueFromPipeline=$true)] [Parameter(ParameterSetName='ByDriveLetterSetDedup', Mandatory=$true, ValueFromPipeline=$true)] [char] ${DriveLetter}, [Parameter(ParameterSetName='ByObjectSetDedup')] [Parameter(ParameterSetName='ByUniqueIdSetDedup')] [Parameter(ParameterSetName='ByPathSetDedup')] [Parameter(ParameterSetName='ByLabelSetDedup')] [Parameter(ParameterSetName='ByDriveLetterSetDedup')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetVolume.DedupMode] ${DedupMode}, [Parameter(ParameterSetName='ByObjectSetLabel')] [Parameter(ParameterSetName='ByUniqueIdSetLabel')] [Parameter(ParameterSetName='ByPathSetLabel')] [Parameter(ParameterSetName='ByLabelSetLabel')] [Parameter(ParameterSetName='ByDriveLetterSetLabel')] [Parameter(ParameterSetName='ByObjectSetDedup')] [Parameter(ParameterSetName='ByUniqueIdSetDedup')] [Parameter(ParameterSetName='ByPathSetDedup')] [Parameter(ParameterSetName='ByLabelSetDedup')] [Parameter(ParameterSetName='ByDriveLetterSetDedup')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByObjectSetLabel')] [Parameter(ParameterSetName='ByUniqueIdSetLabel')] [Parameter(ParameterSetName='ByPathSetLabel')] [Parameter(ParameterSetName='ByLabelSetLabel')] [Parameter(ParameterSetName='ByDriveLetterSetLabel')] [Parameter(ParameterSetName='ByObjectSetDedup')] [Parameter(ParameterSetName='ByUniqueIdSetDedup')] [Parameter(ParameterSetName='ByPathSetDedup')] [Parameter(ParameterSetName='ByLabelSetDedup')] [Parameter(ParameterSetName='ByDriveLetterSetDedup')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByObjectSetLabel')] [Parameter(ParameterSetName='ByUniqueIdSetLabel')] [Parameter(ParameterSetName='ByPathSetLabel')] [Parameter(ParameterSetName='ByLabelSetLabel')] [Parameter(ParameterSetName='ByDriveLetterSetLabel')] [Parameter(ParameterSetName='ByObjectSetDedup')] [Parameter(ParameterSetName='ByUniqueIdSetDedup')] [Parameter(ParameterSetName='ByPathSetDedup')] [Parameter(ParameterSetName='ByLabelSetDedup')] [Parameter(ParameterSetName='ByDriveLetterSetDedup')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByObjectSetLabel') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('InputObject')) { [object]$__cmdletization_value = ${InputObject} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('NewFileSystemLabel')) { [object]$__cmdletization_value = ${NewFileSystemLabel} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFileSystemLabel'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'NewFileSystemLabel'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defau ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905119 Keywords=None Message=Creating Scriptblock text (3 of 35): In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Number'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsOffline')) { [object]$__cmdletization_value = ${IsOffline} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsOffline'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsOffline'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByObjectAttributes') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('InputObject')) { [object]$__cmdletization_value = ${InputObject} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsReadOnly')) { [object]$__cmdletization_value = ${IsReadOnly} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsReadOnly'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsReadOnly'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Signature')) { [object]$__cmdletization_value = ${Signature} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Signature'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Signature'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Guid')) { [object]$__cmdletization_value = ${Guid} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Guid'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Guid'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByIdAttributes') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('UniqueId')) { [object]$__cmdletization_value = ${UniqueId} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsReadOnly')) { [object]$__cmdletization_value = ${IsReadOnly} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsReadOnly'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsReadOnly'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Signature')) { [object]$__cmdletization_value = ${Signature} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Signature'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Signature'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Guid')) { [object]$__cmdletization_value = ${Guid} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Guid'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Guid'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByPathAttributes') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Path')) { [object]$__cmdletization_value = ${Path} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Path'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Path'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsReadOnly')) { [object]$__cmdletization_value = ${IsReadOnly} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsReadOnly'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsReadOnly'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Signature')) { [object]$__cmdletization_value = ${Signature} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Signature'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Signature'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Guid')) { [object]$__cmdletization_value = ${Guid} $__cmdletization_methodParameter = [Microsoft.PowerShell. ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905118 Keywords=None Message=Creating Scriptblock text (2 of 35): y('Path')) { [object]$__cmdletization_value = ${Path} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Path'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Path'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PartitionStyle')) { [object]$__cmdletization_value = ${PartitionStyle} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PartitionStyle'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetDisk.PartitionStyle'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PartitionStyle'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetDisk.PartitionStyle'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByNumberConvertStyle') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Number')) { [object]$__cmdletization_value = ${Number} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Number'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Number'; ParameterType = 'System.UInt32'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PartitionStyle')) { [object]$__cmdletization_value = ${PartitionStyle} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PartitionStyle'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetDisk.PartitionStyle'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PartitionStyle'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetDisk.PartitionStyle'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByObject') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('InputObject')) { [object]$__cmdletization_value = ${InputObject} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsOffline')) { [object]$__cmdletization_value = ${IsOffline} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsOffline'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsOffline'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ById') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('UniqueId')) { [object]$__cmdletization_value = ${UniqueId} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsOffline')) { [object]$__cmdletization_value = ${IsOffline} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsOffline'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsOffline'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByPath') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Path')) { [object]$__cmdletization_value = ${Path} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Path'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Path'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('IsOffline')) { [object]$__cmdletization_value = ${IsOffline} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsOffline'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'IsOffline'; ParameterType = 'System.Boolean'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByNumber') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('Number')) { [object]$__cmdletization_value = ${Number} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'Number'; ParameterType = 'System.UInt32'; Bindings = ' ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:55 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=3 Type=Warning ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905117 Keywords=None Message=Creating Scriptblock text (1 of 35): #requires -version 3.0 try { Microsoft.PowerShell.Core\Set-StrictMode -Off } catch { } $script:MyModule = $MyInvocation.MyCommand.ScriptBlock.Module $script:ClassName = 'ROOT/Microsoft/Windows/Storage/PS_StorageCmdlets' $script:ClassVersion = '' $script:ModuleVersion = '1.0.0.0' $script:ObjectModelWrapper = [Microsoft.PowerShell.Cmdletization.Cim.CimCmdletAdapter] $script:PrivateData = [System.Collections.Generic.Dictionary[string,string]]::new() Microsoft.PowerShell.Core\Export-ModuleMember -Function @() function __cmdletization_BindCommonParameters { param( $__cmdletization_objectModelWrapper, $myPSBoundParameters ) if ($myPSBoundParameters.ContainsKey('CimSession')) { $__cmdletization_objectModelWrapper.PSObject.Properties['CimSession'].Value = $myPSBoundParameters['CimSession'] } if ($myPSBoundParameters.ContainsKey('ThrottleLimit')) { $__cmdletization_objectModelWrapper.PSObject.Properties['ThrottleLimit'].Value = $myPSBoundParameters['ThrottleLimit'] } if ($myPSBoundParameters.ContainsKey('AsJob')) { $__cmdletization_objectModelWrapper.PSObject.Properties['AsJob'].Value = $myPSBoundParameters['AsJob'] } } function Set-Disk { [CmdletBinding(DefaultParameterSetName='ByNumberAttributes', PositionalBinding=$false)] param( [Parameter(ParameterSetName='ByObjectConvertStyle', Mandatory=$true, ValueFromPipeline=$true)] [Parameter(ParameterSetName='ByObject', Mandatory=$true, ValueFromPipeline=$true)] [Parameter(ParameterSetName='ByObjectAttributes', Mandatory=$true, ValueFromPipeline=$true)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [ciminstance[]] ${InputObject}, [Parameter(ParameterSetName='ByObjectConvertStyle')] [Parameter(ParameterSetName='ByIdConvertStyle')] [Parameter(ParameterSetName='ByPathConvertStyle')] [Parameter(ParameterSetName='ByNumberConvertStyle')] [Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetDisk.PartitionStyle] ${PartitionStyle}, [Parameter(ParameterSetName='ByIdConvertStyle', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ById', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByIdAttributes', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [string] ${UniqueId}, [Parameter(ParameterSetName='ByPathConvertStyle', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByPath', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByPathAttributes', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [string] ${Path}, [Parameter(ParameterSetName='ByNumberConvertStyle', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByNumber', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [Parameter(ParameterSetName='ByNumberAttributes', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)] [uint32] ${Number}, [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [bool] ${IsOffline}, [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByIdAttributes')] [Parameter(ParameterSetName='ByPathAttributes')] [Parameter(ParameterSetName='ByNumberAttributes')] [bool] ${IsReadOnly}, [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByIdAttributes')] [Parameter(ParameterSetName='ByPathAttributes')] [Parameter(ParameterSetName='ByNumberAttributes')] [uint32] ${Signature}, [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByIdAttributes')] [Parameter(ParameterSetName='ByPathAttributes')] [Parameter(ParameterSetName='ByNumberAttributes')] [string] ${Guid}, [Parameter(ParameterSetName='ByObjectConvertStyle')] [Parameter(ParameterSetName='ByIdConvertStyle')] [Parameter(ParameterSetName='ByPathConvertStyle')] [Parameter(ParameterSetName='ByNumberConvertStyle')] [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByIdAttributes')] [Parameter(ParameterSetName='ByPathAttributes')] [Parameter(ParameterSetName='ByNumberAttributes')] [Alias('Session')] [ValidateNotNullOrEmpty()] [CimSession[]] ${CimSession}, [Parameter(ParameterSetName='ByObjectConvertStyle')] [Parameter(ParameterSetName='ByIdConvertStyle')] [Parameter(ParameterSetName='ByPathConvertStyle')] [Parameter(ParameterSetName='ByNumberConvertStyle')] [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByIdAttributes')] [Parameter(ParameterSetName='ByPathAttributes')] [Parameter(ParameterSetName='ByNumberAttributes')] [int] ${ThrottleLimit}, [Parameter(ParameterSetName='ByObjectConvertStyle')] [Parameter(ParameterSetName='ByIdConvertStyle')] [Parameter(ParameterSetName='ByPathConvertStyle')] [Parameter(ParameterSetName='ByNumberConvertStyle')] [Parameter(ParameterSetName='ByObject')] [Parameter(ParameterSetName='ById')] [Parameter(ParameterSetName='ByPath')] [Parameter(ParameterSetName='ByNumber')] [Parameter(ParameterSetName='ByObjectAttributes')] [Parameter(ParameterSetName='ByIdAttributes')] [Parameter(ParameterSetName='ByPathAttributes')] [Parameter(ParameterSetName='ByNumberAttributes')] [switch] ${AsJob}) DynamicParam { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_objectModelWrapper = $script:ObjectModelWrapper::new() $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $script:ClassName, $script:ClassVersion, $script:ModuleVersion, $script:PrivateData) if ($__cmdletization_objectModelWrapper -is [System.Management.Automation.IDynamicParameters]) { ([System.Management.Automation.IDynamicParameters]$__cmdletization_objectModelWrapper).GetDynamicParameters() } } } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Begin { $__cmdletization_exceptionHasBeenThrown = $false try { __cmdletization_BindCommonParameters $__cmdletization_objectModelWrapper $PSBoundParameters $__cmdletization_objectModelWrapper.BeginProcessing() } catch { $__cmdletization_exceptionHasBeenThrown = $true throw } } Process { try { if (-not $__cmdletization_exceptionHasBeenThrown) { $__cmdletization_methodParameters = [System.Collections.Generic.List[Microsoft.PowerShell.Cmdletization.MethodParameter]]::new() switch -exact ($PSCmdlet.ParameterSetName) { { @('ByObjectConvertStyle') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('InputObject')) { [object]$__cmdletization_value = ${InputObject} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'InputObject'; ParameterType = 'Microsoft.Management.Infrastructure.CimInstance[]'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PartitionStyle')) { [object]$__cmdletization_value = ${PartitionStyle} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PartitionStyle'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetDisk.PartitionStyle'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PartitionStyle'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetDisk.PartitionStyle'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByIdConvertStyle') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('UniqueId')) { [object]$__cmdletization_value = ${UniqueId} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'UniqueId'; ParameterType = 'System.String'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKey('PartitionStyle')) { [object]$__cmdletization_value = ${PartitionStyle} $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PartitionStyle'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetDisk.PartitionStyle'; Bindings = 'In'; Value = $__cmdletization_value; IsValuePresent = $true} } else { $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'PartitionStyle'; ParameterType = 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetDisk.PartitionStyle'; Bindings = 'In'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} } $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) [object]$__cmdletization_defaultValue = [System.Management.Automation.LanguagePrimitives]::ConvertTo('Microsoft.PowerShell', 'System.String') [object]$__cmdletization_defaultValueIsPresent = $true $__cmdletization_methodParameter = [Microsoft.PowerShell.Cmdletization.MethodParameter]@{Name = 'cim:operationOption:SourceCaller'; ParameterType = 'System.String'; Bindings = '0'; Value = $__cmdletization_defaultValue; IsValuePresent = $__cmdletization_defaultValueIsPresent} $__cmdletization_methodParameters.Add($__cmdletization_methodParameter) $__cmdletization_returnValue = $null $__cmdletization_methodInvocationInfo = [Microsoft.PowerShell.Cmdletization.MethodInvocationInfo]::new('SetDisk', $__cmdletization_methodParameters, $__cmdletization_returnValue) $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletization_methodInvocationInfo) } { @('ByPathConvertStyle') -contains $_ } { [object]$__cmdletization_defaultValue = $null [object]$__cmdletization_defaultValueIsPresent = $false if ($PSBoundParameters.ContainsKe ScriptBlock ID: cfd966c4-59ef-408a-b077-1e789ba9e4bb Path: 08/24/2021 08:33:56 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905237 Keywords=None Message=Started invocation of ScriptBlock ID: abfb964d-7dd6-4f93-a45a-c1e7ff9cddd4 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:56 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905236 Keywords=None Message=Completed invocation of ScriptBlock ID: 0fb9d284-444a-4962-9155-2847c5dca273 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:56 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905235 Keywords=None Message=Completed invocation of ScriptBlock ID: 91457d17-2b24-4b61-8af3-8dbccf27f8d2 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:56 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905234 Keywords=None Message=Started invocation of ScriptBlock ID: 91457d17-2b24-4b61-8af3-8dbccf27f8d2 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:56 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905233 Keywords=None Message=Started invocation of ScriptBlock ID: 0fb9d284-444a-4962-9155-2847c5dca273 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:56 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905232 Keywords=None Message=Creating Scriptblock text (1 of 1): prompt ScriptBlock ID: 0fb9d284-444a-4962-9155-2847c5dca273 Path: 08/24/2021 08:33:56 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905231 Keywords=None Message=Completed invocation of ScriptBlock ID: 821cd082-0efa-4358-ba61-71afe869923b Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:56 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905230 Keywords=None Message=Started invocation of ScriptBlock ID: 821cd082-0efa-4358-ba61-71afe869923b Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:33:56 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905229 Keywords=None Message=Completed invocation of ScriptBlock ID: 1eb43eb6-d6d2-4b5a-add5-1549747e4e94 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:34:04 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905249 Keywords=None Message=Started invocation of ScriptBlock ID: abfb964d-7dd6-4f93-a45a-c1e7ff9cddd4 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:34:04 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905248 Keywords=None Message=Completed invocation of ScriptBlock ID: be49fa02-51ad-4173-900a-0c38096664bb Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:34:04 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905247 Keywords=None Message=Completed invocation of ScriptBlock ID: 91457d17-2b24-4b61-8af3-8dbccf27f8d2 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:34:04 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905246 Keywords=None Message=Started invocation of ScriptBlock ID: 91457d17-2b24-4b61-8af3-8dbccf27f8d2 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:34:04 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905245 Keywords=None Message=Started invocation of ScriptBlock ID: be49fa02-51ad-4173-900a-0c38096664bb Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:34:04 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905244 Keywords=None Message=Creating Scriptblock text (1 of 1): prompt ScriptBlock ID: be49fa02-51ad-4173-900a-0c38096664bb Path: 08/24/2021 08:34:04 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905243 Keywords=None Message=Completed invocation of ScriptBlock ID: 821cd082-0efa-4358-ba61-71afe869923b Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:34:04 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905242 Keywords=None Message=Started invocation of ScriptBlock ID: 821cd082-0efa-4358-ba61-71afe869923b Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:34:04 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905241 Keywords=None Message=Completed invocation of ScriptBlock ID: 18c5dd63-55ae-4c7a-9b8e-91ddfedd02c8 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:34:04 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905240 Keywords=None Message=Started invocation of ScriptBlock ID: 18c5dd63-55ae-4c7a-9b8e-91ddfedd02c8 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:34:04 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905239 Keywords=None Message=Creating Scriptblock text (1 of 1): Get-LocalUser ScriptBlock ID: 18c5dd63-55ae-4c7a-9b8e-91ddfedd02c8 Path: 08/24/2021 08:34:04 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905238 Keywords=None Message=Completed invocation of ScriptBlock ID: abfb964d-7dd6-4f93-a45a-c1e7ff9cddd4 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:34:16 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905252 Keywords=None Message=Started invocation of ScriptBlock ID: 4a6560f2-1866-4c58-8a90-0e6ba8920ac8 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:34:16 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905251 Keywords=None Message=Creating Scriptblock text (1 of 1): Get-WmiObject Win32_UserAccount ScriptBlock ID: 4a6560f2-1866-4c58-8a90-0e6ba8920ac8 Path: 08/24/2021 08:34:16 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905250 Keywords=None Message=Completed invocation of ScriptBlock ID: abfb964d-7dd6-4f93-a45a-c1e7ff9cddd4 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:34:18 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905261 Keywords=None Message=Started invocation of ScriptBlock ID: abfb964d-7dd6-4f93-a45a-c1e7ff9cddd4 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:34:18 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905260 Keywords=None Message=Completed invocation of ScriptBlock ID: d510c174-e0a8-4806-b08c-f3e08af96449 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:34:18 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905259 Keywords=None Message=Completed invocation of ScriptBlock ID: 91457d17-2b24-4b61-8af3-8dbccf27f8d2 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:34:18 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905258 Keywords=None Message=Started invocation of ScriptBlock ID: 91457d17-2b24-4b61-8af3-8dbccf27f8d2 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:34:18 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905257 Keywords=None Message=Started invocation of ScriptBlock ID: d510c174-e0a8-4806-b08c-f3e08af96449 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:34:18 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905256 Keywords=None Message=Creating Scriptblock text (1 of 1): prompt ScriptBlock ID: d510c174-e0a8-4806-b08c-f3e08af96449 Path: 08/24/2021 08:34:18 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905255 Keywords=None Message=Completed invocation of ScriptBlock ID: 821cd082-0efa-4358-ba61-71afe869923b Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:34:18 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905254 Keywords=None Message=Started invocation of ScriptBlock ID: 821cd082-0efa-4358-ba61-71afe869923b Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:34:18 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905253 Keywords=None Message=Completed invocation of ScriptBlock ID: 4a6560f2-1866-4c58-8a90-0e6ba8920ac8 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:34:29 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905273 Keywords=None Message=Started invocation of ScriptBlock ID: abfb964d-7dd6-4f93-a45a-c1e7ff9cddd4 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:34:29 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905272 Keywords=None Message=Completed invocation of ScriptBlock ID: 088cbde5-304e-4e75-a132-660e02368d8c Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:34:29 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905271 Keywords=None Message=Completed invocation of ScriptBlock ID: 91457d17-2b24-4b61-8af3-8dbccf27f8d2 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:34:29 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905270 Keywords=None Message=Started invocation of ScriptBlock ID: 91457d17-2b24-4b61-8af3-8dbccf27f8d2 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:34:29 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905269 Keywords=None Message=Started invocation of ScriptBlock ID: 088cbde5-304e-4e75-a132-660e02368d8c Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:34:29 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905268 Keywords=None Message=Creating Scriptblock text (1 of 1): prompt ScriptBlock ID: 088cbde5-304e-4e75-a132-660e02368d8c Path: 08/24/2021 08:34:29 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905267 Keywords=None Message=Completed invocation of ScriptBlock ID: 821cd082-0efa-4358-ba61-71afe869923b Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:34:29 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905266 Keywords=None Message=Started invocation of ScriptBlock ID: 821cd082-0efa-4358-ba61-71afe869923b Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:34:29 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905265 Keywords=None Message=Completed invocation of ScriptBlock ID: f6c35174-88ee-4859-aba9-aa3b7cf9139f Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:34:29 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4105 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Starting Command OpCode=On create calls RecordNumber=1905264 Keywords=None Message=Started invocation of ScriptBlock ID: f6c35174-88ee-4859-aba9-aa3b7cf9139f Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d 08/24/2021 08:34:29 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4104 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Execute a Remote Command OpCode=On create calls RecordNumber=1905263 Keywords=None Message=Creating Scriptblock text (1 of 1): Get-WmiObject Win32_UserAccount | Select-Object NAme ScriptBlock ID: f6c35174-88ee-4859-aba9-aa3b7cf9139f Path: 08/24/2021 08:34:29 PM LogName=Microsoft-Windows-PowerShell/Operational SourceName=Microsoft-Windows-PowerShell EventCode=4106 EventType=5 Type=Verbose ComputerName=win-host-987.attackrange.local User=NOT_TRANSLATED Sid=S-1-5-21-1166625382-1442148322-2337405042-2397 SidType=0 TaskCategory=Stopping Command OpCode=On create calls RecordNumber=1905262 Keywords=None Message=Completed invocation of ScriptBlock ID: abfb964d-7dd6-4f93-a45a-c1e7ff9cddd4 Runspace ID: 40998cf1-023c-4b5c-a8da-7449ec4f0c4d