Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1934
  • Last Modified:

problem using in ingroup command from kixtart

hi,
i created a global group "HR" containing the administrator (for testing)
when i run the command

IF INGROUP("Domain Admins") RUN "net use q: \\server\share"  <= the command will be executed

IF INGROUP("DOMAIN\HR") RUN "net use q: \\server\share"  <= the command will NOT BE executed

DOMAIN\HR
HR
..
dont work

does anyone has any idea

tks a lot
karel

0
karel_jespers
Asked:
karel_jespers
  • 6
  • 4
1 Solution
 
Chris DentPowerShell DeveloperCommented:

The syntax is wrong for the If Statement.

If InGroup("Domain Admins")
    Use "Q:" "\\server\share"
EndIf

If InGroup("HR")
    Use "Q:" "\\Server\share"
EndIf

I replaced your Run call with the built-in function for drive mapping that Kix uses (Use <drive> <share>). If you prefer you can use the original run command:

If InGroup("Domain Admins")
    Run "net use Q: \\server\share"
EndIf

If InGroup("HR")
    Run "net use Q: \\server\share"
EndIf
0
 
karel_jespersAuthor Commented:
hi chris,
the source i use works for the Domain Admins
but not for the HR group

any ideay why
karel
0
 
Chris DentPowerShell DeveloperCommented:

Is HR a distribution group?

The InGroup function only works for security groups.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
karel_jespersAuthor Commented:
HR is a distribution group
0
 
karel_jespersAuthor Commented:
sorry i mean HR is a security group
0
 
karel_jespersAuthor Commented:
i tried it already with a security group and a distribution group

HR=global security group
0
 
Chris DentPowerShell DeveloperCommented:

Which version of Kix are you working with? There shouldn't be any problems with that command, but some of the older versions had bugs with the InGroup command.
0
 
karel_jespersAuthor Commented:
KiX2001_422 is the version
0
 
Chris DentPowerShell DeveloperCommented:

Sorry for the late response Karel, had to sleep ;)

Since it works against the Domain Admins group it doesn't look like it's having any problems querying group membership. Do you have any other groups (not builtin) that you can try it with?
0
 
karel_jespersAuthor Commented:
tks chris dent, things are working now using kixart
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now