Subscribe: Comments for 4sysops
http://4sysops.com/comments/feed/
Added By: Feedage Forager Feedage Grade A rated
Language: English
Tags:
comment  computername  container  crayon crayon  crayon  editor  expand  powershell  searcher  select expand  select  server  windows 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Comments for 4sysops

Comments for 4sysops



For SysAdmins and DevOps



Last Build Date: Fri, 17 Nov 2017 14:59:20 +0000

 



Comment on Configuring logon PowerShell scripts with Group Policy by Mikael Dyreborg Hansen

Fri, 17 Nov 2017 14:59:20 +0000

Yes: $ComputerName = $env:Computername $CurrentUser = $Env:Username $ComputerModel = Get-WMIObject -Class Win32_computersystem | select -expand Model $ComputerSerialNumber = Get-WMIObject -Class Win32_BIOS | select -expand SerialNumber $ComputerDescription = "User: $($CurrentUser) "+"/ "+"Hostname: $($ComputerName) "+"/ "+"Model: $($ComputerModel) "+"/ "+"Serialnumber: $($ComputerSerialNumber)" $Searcher = New-Object DirectoryServices.DirectorySearcher $Searcher.Filter = "(&(objectCategory=computer)(anr=$($ComputerName)))" $Searcher.SearchRoot = 'LDAP://DC=Domain,DC=Local' $GetProperties = $Searcher.FindAll() $EditDescription = $GetProperties | select -expand path [ADSI]$Editor = "$EditDescription" $Editor.description = "$ComputerDescription" $Editor.setInfo()



Comment on Configuring logon PowerShell scripts with Group Policy by Mikael Dyreborg Hansen

Fri, 17 Nov 2017 14:58:03 +0000

This also requires the user to have RSAT tools installed (or at least the activedirectory module installed). Further it doesn't autoload on older versions. You should utilize ADSI instead in the powershell script: $ComputerName = $env:Computername $CurrentUser = $Env:Username $ComputerModel = Get-WMIObject -Class Win32_computersystem | select -expand Model $ComputerSerialNumber = Get-WMIObject -Class Win32_BIOS | select -expand SerialNumber $ComputerDescription = "User: $($CurrentUser) "+"/ "+"Hostname: $($ComputerName) "+"/ "+"Model: $($ComputerModel) "+"/ "+"Serialnumber: $($ComputerSerialNumber)" $Searcher = New-Object DirectoryServices.DirectorySearcher $Searcher.Filter = "(&(objectCategory=computer)(anr=$($ComputerName)))" $Searcher.SearchRoot = 'LDAP://DC=Domain,DC=Local' $GetProperties = $Searcher.FindAll() $EditDescription = $GetProperties | select -expand path [ADSI]$Editor = "$EditDescription" $Editor.description = "$ComputerDescription" $Editor.setInfo()



Comment on Windows 10 Fall Creators Update installation and features by George

Fri, 17 Nov 2017 13:53:04 +0000

I updated to the Fall Creators Update a couple of weeks ago I think. So far, so good.



Comment on How to configure ESXi 6.5 for iSCSI Shared Storage by Vijay

Fri, 17 Nov 2017 12:40:44 +0000

I have done as per the article and i am perfectly see the iscsi working on the esxi and i did the same on the second host for the same iscsi target but not working on the second host. Please advise.



Comment on Strings in PowerShell - Replace, compare, concatenate, split, substring by Michael Pietroforte

Fri, 17 Nov 2017 09:14:02 +0000

Thanks for the hint! The text is now correct.



Comment on Strings in PowerShell - Replace, compare, concatenate, split, substring by Sanjeev

Thu, 16 Nov 2017 22:42:44 +0000

("Hello world").Remove(2,3) removes 'llo' and not 'ell' as mentioned in the article. Output: He world Thanks.



Comment on FAQs for Microsoft Local Administrator Password Solution (LAPS) - Part 1 by Angie

Thu, 16 Nov 2017 21:46:11 +0000

Hi, Does anyone understand exactly what the following GPO setting means?  Do not allow password expiration time longer than required by policy?



Comment on Windows 10 Fall Creators Update installation and features by Eddie Tan

Thu, 16 Nov 2017 20:23:16 +0000

This update took a few hours, I went to bed and let the laptop pleases itself. When I woke up, my Asus laptop lost its Asus Smart Gestures, I have to reinstate it from the installation software folder, then when I tried to launch paint shop pro 8, it was asking for the cdrom so that windows can be configured to run it. Put in the cdrom and it is now running PSP correctly.Then I have to run disk cleanup to get rid of that windows.old folder which took 45 minutes to complete. In conclusion, I am not pleased with his update



Comment on When roaming profiles are not working in Windows 10 by Walter

Thu, 16 Nov 2017 18:40:49 +0000

Dear James, Since we work with Server2016 and Windows 10 on the clients, we have serious problems with roaming profiles; in earlier versions, server2012 and Windows8.1 never had problems. Our problem: after logging on with the romaing profile, sometimes (50%!) the pc 'hangs' or 'freezes'; all we can do is Ctrl+Alt+Delete and log off and log on again. We work in school environment, about 80 pc's for 250 children and their teachers (Primary school). I know there are many parameters to search this out, but as i said, we never had such problems in earlier versions. On the clients we have Windows10 (32bit) version 1703 with all updates. Will it be helpful to send logfiles in eventviewer? What could be (the problem) the solution to this problem? Thanks for helping!



Comment on Managing inactive clients in SCCM 2012 by Bruno

Thu, 16 Nov 2017 18:32:37 +0000

Thnks man, help me a lot!!



Comment on Forgot the administrator password? The Sticky Keys trick by Michael Pietroforte

Thu, 16 Nov 2017 09:21:33 +0000

Maybe you are on the wrong drive and searched in the Windows PE folder.



Comment on Forgot the administrator password? The Sticky Keys trick by JS

Thu, 16 Nov 2017 07:08:12 +0000

I apparently don't have a sethc.exe file in my System32 folder. Is it possible for this to have another name? Just for the record, the StickyKeys function works.



Comment on Interacting with the Registry in PowerShell by Lawrence Knowlton

Thu, 16 Nov 2017 05:34:41 +0000

I was unable to get this to work, though I had high hopes.  The script runs without error, but no changes appear to have occurred in the registry.  Any ideas?



Comment on How to add holidays to the Exchange calendar with PowerShell by heckmanz

Wed, 15 Nov 2017 20:46:41 +0000

The same happened to me, stupid of me to test and use me or another IT person as a test.. should have tested outside my bubble.  All permissions stripped the past apts on the helpdesk calendar all showed up with invites that had to be dismissed for all 800+ users.  All permissions were removed for shared users and had to be scripted or granted access all over again, augh.  Today I found that the permissions for the Calendar that I had on the calendar overwrote everyone else's.  So by default we only saw free or busy on everyone's calendar unless granted more access, well now everyone can see everyone's information across the board.  Nothing like making a leap of faith and falling face first.  Lesson learned here.  Test environment goes up soon.



Comment on Increase PowerShell remoting security with two simple techniques by James O'Neill

Wed, 15 Nov 2017 09:28:01 +0000

I'd say this is really not good practice . In a large organization where the server which validates the logon to the remote is in a different site from the one where the group membership change was made the remote session may start before the AD update has propagated meaning the user will be not be seen as member of the elevated group. If multiple admins run the same script (and we don't want to have different admins using different scripts for the same task) each one logs on to remote server using the same proxy account. So auditing on that server won't show who made a change. If many admins use these scripts, it's quite possible which one that takes a long time to run and talks to many servers will find the password has changed because another admin ran it. You have a set of users who get full admin access to the remote machine.  Instead of doing this by giving their AD accounts access (as admin, or ideally to a constrained end point where they can a subset of commands in an account context whose credentials they don't see), you're giving them rights to add accounts to a group as a kind of back door and obfuscating the method of access but rather than limiting it. Unless you have some method for checking users haven't been left in the group  there is always a risk that some admins will add their accounts to it so they can quickly issue a one-liner.



Comment on Group Policy caching in Windows 8.1 by Nam Anh

Wed, 15 Nov 2017 03:15:58 +0000

Great post. This solved some of those problems. Thanks (image)



Comment on Add a signature to Office 365 emails with PowerShell by Luis

Tue, 14 Nov 2017 16:01:34 +0000

How can I create conditions? For example if $job_title or $phone is not empty.



Comment on Map VMware virtual disks and Windows drive volumes with a PowerShell script by Brian

Tue, 14 Nov 2017 02:06:44 +0000

Alex this is exactly what I've been looking for, so wish it worked for me!  Just spent over an hour with VMware support still with no good solution to match windows disk to VMware disk.  The first few drives in the .csv file are accurate, but then it isn't.  There are windows disks that are matched to VMware disks of smaller size.  For example a 100GB windows disk matched to a 61GB vmwaredisk.  Would really appreciate it if you could help get this working for us, Thanks!



Comment on Resolving "A connection to the deployment share could not be made"errors in MDT by Ro

Mon, 13 Nov 2017 21:41:37 +0000

Hi Kyle, I am trying to deploy Win10 Enterprise on a Surface Pro 4 and I am getting the "DHCP Lease was not obtained for any Networking device! Possible Cause: Check physical connection." However, when i'm opening the Device Manager I still see that there are plenty of yellow exclamation marks under "other devices" and the Ethernet Adapter is one of them. Am I looking at a missing driver issue or at my-hardware-is-too-new issue? Thanks!!!



Comment on Windows Container networking – Part 1: Configuring NAT by michael

Mon, 13 Nov 2017 21:33:13 +0000

I have a windows server 2016 datacenter VM where I turned on the container feature and hyper-v role as well as installed Docker. I see the 'nat' network and can access the containers successfully using the exec -it command. I ran my container with a -p port map (host-port:container-port) and it starts successfully. I got the IP of the container and use that IP to test the service running in my container, however, I cannot ping the container from this 2016 VM or hit my service in a browser or invoke-webrequest or curl call. The sample container prints to the powershell console - docker run microsoft/dotnet-samples:dotnetapp-nanoserver. However, no containers that require a call from the server 2016 host into the container, nor any call out of the container is successful. How do I get my service to communicate with the windows host and external apps/services that will call it?