Skip to content

Commit

Permalink
Merge pull request Mayyhem#44 from Mayyhem/2.0.3
Browse files Browse the repository at this point in the history
SharpSCCM 2.0.3 - Fix exec default wait-time
  • Loading branch information
Mayyhem authored Nov 7, 2023
2 parents 14d6be0 + f873b56 commit 836b67a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ static void Main(string[] args)
ManagementScope wmiConnection = MgmtUtil.NewWmiConnection(smsProvider, null, siteCode);
if (wmiConnection != null && wmiConnection.IsConnected)
{
SmsProviderWmi.Exec(wmiConnection, collectionId, collectionName, device, path, relayServer, resourceId, !runAsSystem, collectionType, user, waitTime);
SmsProviderWmi.Exec(wmiConnection, collectionId, collectionName, device, path, relayServer, resourceId, !runAsSystem, collectionType, user, waitTime = 120);
}
}
});
Expand Down
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@
// Minor Version
// Revision
//
[assembly: AssemblyVersion("2.0.2")]
[assembly: AssemblyFileVersion("2.0.2")]
[assembly: AssemblyVersion("2.0.3")]
[assembly: AssemblyFileVersion("2.0.3")]
5 changes: 5 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# SharpSCCM Release Notes

### Version 2.0.3 (November 7, 2023)
##### Changes
- Fixed SCCM site system role name
- Fixed default wait-time for exec

### Version 2.0.2 (October 26, 2023)
##### Changes
- Replaced ILMerge with dnMerge for Release builds, merged size down to ~1MB
Expand Down
4 changes: 2 additions & 2 deletions lib/MgmtUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public static ManagementScope NewWmiConnection(string server = null, string wmiN
// siteCode should now be populated
if (!string.IsNullOrEmpty(siteCode))
{
Console.WriteLine($"[+] Using provided management point: {server}");
Console.WriteLine($"[+] Using WMI provider: {server}");
}
}
// server and sitecode should now be populated unless there are errors querying the local WMI repository
Expand Down Expand Up @@ -211,7 +211,7 @@ public static ManagementScope NewWmiConnection(string server = null, string wmiN
{
Console.WriteLine(
"[!] The SCCM client may not be installed on this machine\n" +
"[!] Try specifying a management point (-mp) and site code (-sc)"
"[!] Try specifying an SMS Provider (-sms) and site code (-sc)"
);
}
}
Expand Down

0 comments on commit 836b67a

Please sign in to comment.