Home

Reviews

Blog Posts

IT News (sign in to comment or post)

Site Activity

  • That output looks right. The device profile should appear if you run Get-VPNConnection -AllUserConnection . You should also see it as a network adapter in Control Panel.

    0
  • This should be the default behavior. In the XML, do you have <AlwaysOn>true</AlwaysOn> ?

    0
  • Change this line in the XML: <RoutingPolicyType>SplitTunnel</RoutingPolicyType>

    0
  • Joseph Moody liked the comment of TheWizard1002 on Configuring and deploying Always On VPN device tunnels. (So far, TheWizard1002 has 1 likes for this comment) 2 hours, 13 minutes ago

    0
  • V-locity is is for Windows servers. We have been letting product development know that there are requests for Linux.

    0
  • Matthew Koundakjian became a registered member 8 hours, 37 minutes ago

    0
  • Greetings all,

    I have been working this issue for well over a month now. I didn’t want to post, because I didn’t want to appear too dumb on this forum. You are all so smart and experienced. I thought I could figure this out on my own. I was wrong.
    Additionally, I would like to thank you all. Your experience published here has helped me very much in furthering my PS understanding.

    My question follows from the following facts:

    <initial script received from on-high>

    # Root-Ordner in dem die Userordner liegen
    $userroot = 'wffs01profile_old'
    # alle User aus dem AD lesen
    $users = get-aduser -Filter * | select -Expand SamAccountName
    gci $userroot | ?{$_.PSIsContainer -and ($_.Name -replace '.(V2|V5|V6)$','') -notin $users}

    I have two directories:

    • A) old AD Users
    • B) current AD Users
    • Each of the subdirectories in A has an extension of .V2.
    • None of the subdirectories in B has an extension of .V2.
    • I have assumed from the beginning that I need to remove the .V2 extension before I can do a compare (not sure if this is the best solution).

    This is the main issue.

    The files / profile directories as seen in Windows Explorer:

    Files as seen in Explorer

    I read that directory contents into $oldADUsers:

    PS C:WINDOWSsystem32> $oldADUsers =gci $userroot | % basename
    PS C:WINDOWSsystem32> $oldADUsers

    AfsgrA.V2
    afsgrb.V2
    afsgrC.V2
    AfsGrD.V2
    afsgre.V2
    afsgrf.V2
    afsgrg.V2
    afsgrh.V2
    afstelgte.V2

     

    I have a list of current AD users, read into $currentrADUsers:

    PS C:WINDOWSsystem32> $currentADUsers = get-aduser -filter * | sort-object | select samaccountname

    afsgra
    afsgrb
    afsgrc
    afsgrd
    afsgre
    afsgrf
    afsgrg
    afstelgte


    <h2>I am stuck here.</h2>
    VARIABLES:

    • $userroot:     fileserverprofile_testprofile_old$ -- Directory which holds old profile directories.
    • $oldADUsers  --  PS Variable which holds list of names of old AD users’ profile directories.
    • $currentADUsers  --  PS Variable which holds list of names of current AD users’ profile directories.

    I am stuck here.

    Here is my logic:

    1.       Read the names of the contents of the profile_test directory into the variable $oldADUsers.

    2.       Read the names of the current AD Users into the variable $currentADUsers.

    3.       If there exists a profile directory name in $oldADusers which matches a profile directory name in $currentADUsers, then leave it be with no changes.

    4.       If there exists NO profile directory name in $oldADUsers which matches a profile directory name in $currentADUsers, then delete the profile directory recursively from $oldADUsers.

    5.       If there exists a profile directory name in $oldADUsers for which there is NO match in $currentADUsers, then take ownership of that user’s old profile, and then delete recursively the user’s old profile directory from profile_test.

    PS C:WINDOWSsystem32> $userroot = 'fileserverprofile_test$'
    PS C:WINDOWSsystem32> $currentADUsers = get-aduser -filter * | select samaccountname
    PS C:WINDOWSsystem32> $oldADUsers = gci $userroot | % basename

    At this point, I have two lists of profile directory names:

    • $oldADUsers
    • $currentADUsers

    <p class="crayon-selected">where the individual entries in the $oldADUsers list have an extension of .V2, whereas the entries in the $currentADUsers list have no extensions.</p>
    *****

    What I believe I need to do:

    1. Remove the extensions from the directory names in $oldADUsers,
    2. compare the directory names to those in $currentADUsers,
    3. take ownership of the selected directory and
    4. perform the recursive delete.

    I believe I will need a for-loop similar to:

    Foreach-Object {$_.Name -replace ".(V2)",""}

    …but that won’t work, because I can’t replace with a null value.

     

    I am stuck here.

     

    Following is the code which I have used to get this far…..

    PS C:WINDOWSsystem32> $userroot = 'fileserverprofile_old$'
    PS C:WINDOWSsystem32> $currentADUsers = get-aduser -filter * | select samaccountname
    PS C:WINDOWSsystem32> $oldADUsers =gci $userroot | % basename

     

    I have tried separating the values in the $oldADUsers list:

    $oldadv = $oldADUsers.split(".")

    …but then I have array indices to worry about, which I think only makes things more complicated than they need to be.

    I have tried the following, but it will break on other lists:

    PS C:> $newADName = $oldADName.split(".")
    PS C:> $ADNamesingle = $newADName[0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40]
    PS C:> write $ADNamesingle

    ...

    AfsgrA
    afsgrb
    afsgrC
    AfsGrD
    afsgre
    afsgrf
    afsgrg
    afsgrh
    afstelgte

    ...

    OTHER CODE WHICH I'VE USED in this script WITHOUT SUCCESS:

    $cool = gci $userroot | ?{$_.PSIsContainer -and ($_.Name -remove '.(V2|V5|V6)$','')} ===> problem: -remove not recognised.
    $cool = gci $userroot | ?{$_.PSIsContainer -and ($_.Name -replace ".(V2|V5|V6)","")} ===> does not remove extension.
    $Files = $oldadv
    ForEach ($File in $Files)
    {
    $File.FullName | Copy-Item -Destination ("Drive:Path" + ($File.Name -replace '(.V2)','') )
    }
    Compare-Object -ReferenceObject (Get-Content -Path 'C:jctempmyusers.txt') -DifferenceObject (Get-Content -Path 'C:jctempoldadname.txt')
    
    get-childitem 'wffs02profile_testjc' -include *.V2 | foreach ($_) {remove-item $_.name}
    
    foreach-object in c:jctempmyusers.txt [io.path]::GetFileNameWithoutExtension("c:jctempmyusers.txt")
    
    foreach ($file in gci -literalpath "C:Temp") { rni $file.FullName $file.Name.Replace("A","B") }
    
    foreach ($file in gci -literalpath "wffs02profile_testjc$") { rni $file.FullName $file.Name.Replace("V2","Shit") -credential $credentials }

    I need help.

    Thank you in advance to any of you out there who take a look at this.

    I wish you all a nice start into your week.

     

    Best regards,

    -.-johnc

    0
  • carp liked the comment of carp (Rank: Level 2)
    on Introducing the 4sysops IT pro network. (So far, carp (Rank: Level 2)
    has 2 likes for this comment) 1 day, 3 hours ago

    0
  • I followed this and then found out there's a missing step. After you have moved the SUSDB and LogFile, you need to make sure this account has read and write permissions to both or your WSUS will not sync because it will be in READONLY mode: NT ServiceMSSQL$MICROSOFT##WID

    Source: https://mivilisnet.wordpress.com/2018/01/30/relocating-the-wsus-databases/

    0
  • How is it possible to autoconnect Always on vpn client when windows startup? So the user does not have todo anything.

    0
  • Prakash Singh became a registered member 2 days, 2 hours ago

    1+
    avatar
  • I cleaned the local cache and forced a page reload, now I am able to edit the update. This issue was  a local problem in my browser.

    Thanks,

    Paolo

    0
  • Hi Paolo,

    I can't replicate the issue with a standard user. What exactly was the problem? Did you try to empty your cache and did you try another browser?

    Cheers,
    Michael

    0
  • Hi Michael,

    the edit button in update posts doesn't work today. Can you check if there is some problem?

    Thanks

    Paolo

    0
  • Admin became a registered member 3 days, 8 hours ago

    0
  • Hello.  We use a tool ADAxes to configure the security on OUs.  This tool uses powershell to modify rights and can use PowerShell cmdlets as needed.  This tool exists in a different forest from the forest where the computers/OUs are located.

    The AdmPwd,PS cmdlets to set security does not seem to function with the target in a different forest (there is a forest-level trust between the two).

    Is there a work-around?  For simplicity, we prefer to use the cmdlets to modify our 200 OUs rather than translate the security into pure PowerShell commands to modify ACLs.

    0
  • Hi user624234,

    as far I know, pasting password to Secure Desktop is not possible by design.

    Anyway, you can still take users desktop without knowing the users password via TightVNC which I guess was the point of your question and this post.

    If you need further help I suggest to open a topic in IT admin forum.

    0
  • Thanks Adam, I was in the  'PSRabbitHole'  for a long while in the early days trying to figure this one out, to no avail, so I left it alone until now. Very useful especially when copying data from one endpoint to another and you need for the  processing to happen on the remote machine and not yours... 

    0
  • I have a problem with TightVNC. When I login to user using this method over VNC, and I want to install something, o run an application from the user then I can't paste the password to the UAC-promt. With the other programs installed as service, like Teamviewer or Anydesk I can use the copy-paste.

    0

© 4sysops 2006 - 2020

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account