×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Granting View Object Permissions via SQL PowerShell

Granting View Object Permissions via SQL PowerShell

Granting View Object Permissions via SQL PowerShell

(OP)
Can you please tell me how to set with Powershell the PermissionType : SELECT to ALTER? I'm attempting to use the:

Grant(ObjectPermissionSet, String, Boolean) - Grants access to the specified permission and the ability to grant access to other users for the specified View Class (object) I've setup - $vwobject.Grant(ALTER, Grantee, $TRUE) Would it be an ADD or GRANT and how does the syntax look?

Below is the result of a query of the permissions assigned to the View = TestView2 which I'd like to have multiple users assigned the same permission set - but for now, I'm just trying to Change SELECT to ALTER just to understand how to change or add to one property. Not understanding how the View.Grant method works syntactically - your help please?

$vwObject.EnumObjectPermissions()
PermissionType : SELECT
Grantee : SUTTER-CHS\InfaDev_service
GranteeType : User
Grantor : dbo
GrantorType : User
PermissionState : Grant
ColumnName :
ObjectClass : ObjectOrColumn
ObjectName : TestView2
ObjectSchema : dbo
ObjectID : 1510683327

RE: Granting View Object Permissions via SQL PowerShell

hello, how is $vwobject defined / declared and set?

I Hear, I Forget
I See, I Remember
I Do, I Understand

Ronald McDonald

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close